Update payment type
This commit is contained in:
parent
0b8c247045
commit
7aceb0488b
@ -240,3 +240,11 @@ type OrderPrintDetail struct {
|
||||
Total float64 `gorm:"column:total"`
|
||||
Fee float64 `gorm:"column:fee"`
|
||||
}
|
||||
|
||||
func (o *OrderPrintDetail) GetPaymanetType() string {
|
||||
if o.PaymentType == "CASH" {
|
||||
return "TUNAI"
|
||||
}
|
||||
|
||||
return o.PaymentType
|
||||
}
|
||||
|
||||
@ -460,7 +460,7 @@ func MapOrderToPrintDetailResponse(order *entity.OrderPrintDetail, casherName st
|
||||
OrderID: order.OrderID,
|
||||
Total: order.Total,
|
||||
Fee: order.Fee,
|
||||
PaymentType: order.PaymentType,
|
||||
PaymentType: order.GetPaymanetType(),
|
||||
Source: order.Source,
|
||||
VisitDateAt: order.VisitDate.Format("2006-01-02"),
|
||||
VisitTime: time.Now().Format("15:04:05"),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user