Update payment type
This commit is contained in:
parent
0b8c247045
commit
7aceb0488b
@ -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
|
||||||
|
}
|
||||||
|
|||||||
@ -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"),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user