Skip to content

Commit

Permalink
change the cod amount for delivery order (#84)
Browse files Browse the repository at this point in the history
Co-authored-by: NHT <[email protected]>
  • Loading branch information
nfesta2023 and hoangtuan910 authored Mar 20, 2024
1 parent 5b43472 commit d7c3f23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class InvoiceStatusHistoryService {
}
if (order.is_preorder == FALSE) {
const deliveryOrderId =
await this.orderService.createDeliveryRequest(order);
await this.orderService.createDeliveryRequest(order, 0);
await this.entityManager
.createQueryBuilder()
.update(Order)
Expand Down
4 changes: 3 additions & 1 deletion src/feature/order/order.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,7 @@ export class OrderService {

deliveryOrderId = await this.createDeliveryRequest(
undefined,
orderTotal,
restaurant_id,
restaurantAddress,
customerAddress,
Expand Down Expand Up @@ -1343,6 +1344,7 @@ export class OrderService {

async createDeliveryRequest(
order: Order = undefined,
cod_amount: number,
restaurant_id: number = undefined,
restaurant_address: Address = undefined,
customer_address: Address = undefined,
Expand Down Expand Up @@ -1556,7 +1558,7 @@ export class OrderService {
lng: Number(customerAddress.longitude),
name: customer.name,
mobile: customer.phone_number,
cod: orderTotal,
cod: cod_amount,
formatted_address: customerAddressString,
short_address: customerAddressString,
address_code: null,
Expand Down

0 comments on commit d7c3f23

Please sign in to comment.