Update payment type

This commit is contained in:
aditya.siregar
2024-08-28 12:59:44 +07:00
parent 0b8c247045
commit 7aceb0488b
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -240,3 +240,11 @@ type OrderPrintDetail struct {
Total float64 `gorm:"column:total"` Total float64 `gorm:"column:total"`
Fee float64 `gorm:"column:fee"` Fee float64 `gorm:"column:fee"`
} }
func (o *OrderPrintDetail) GetPaymanetType() string {
if o.PaymentType == "CASH" {
return "TUNAI"
}
return o.PaymentType
}
+1 -1
View File
@@ -460,7 +460,7 @@ func MapOrderToPrintDetailResponse(order *entity.OrderPrintDetail, casherName st
OrderID: order.OrderID, OrderID: order.OrderID,
Total: order.Total, Total: order.Total,
Fee: order.Fee, Fee: order.Fee,
PaymentType: order.PaymentType, PaymentType: order.GetPaymanetType(),
Source: order.Source, Source: order.Source,
VisitDateAt: order.VisitDate.Format("2006-01-02"), VisitDateAt: order.VisitDate.Format("2006-01-02"),
VisitTime: time.Now().Format("15:04:05"), VisitTime: time.Now().Format("15:04:05"),