Mhamdans17 commited on
Commit
52fc9c2
·
1 Parent(s): d74f5f8

fix: include platform_fee in OrderResponse

Browse files
Files changed (1) hide show
  1. controllers/order_controller.go +2 -0
controllers/order_controller.go CHANGED
@@ -44,6 +44,7 @@ type OrderResponse struct {
44
  BranchID *uint `json:"branch_id"`
45
  BranchName string `json:"branch_name"`
46
  TotalAmount int `json:"total_amount"`
 
47
  PaidAmount int `json:"paid_amount"`
48
  ChangeAmount int `json:"change_amount"`
49
  PaymentMethod string `json:"payment_method"`
@@ -119,6 +120,7 @@ func toOrderResponse(order *models.Order) OrderResponse {
119
  BranchID: order.BranchID,
120
  BranchName: bName,
121
  TotalAmount: order.TotalAmount,
 
122
  PaidAmount: order.PaidAmount,
123
  ChangeAmount: order.ChangeAmount,
124
  PaymentMethod: order.PaymentMethod,
 
44
  BranchID *uint `json:"branch_id"`
45
  BranchName string `json:"branch_name"`
46
  TotalAmount int `json:"total_amount"`
47
+ PlatformFee int `json:"platform_fee"`
48
  PaidAmount int `json:"paid_amount"`
49
  ChangeAmount int `json:"change_amount"`
50
  PaymentMethod string `json:"payment_method"`
 
120
  BranchID: order.BranchID,
121
  BranchName: bName,
122
  TotalAmount: order.TotalAmount,
123
+ PlatformFee: order.PlatformFee,
124
  PaidAmount: order.PaidAmount,
125
  ChangeAmount: order.ChangeAmount,
126
  PaymentMethod: order.PaymentMethod,