diff --git a/src/feature/invoice-status-history/invoice-status-history.service.ts b/src/feature/invoice-status-history/invoice-status-history.service.ts index 37fb182..9129bd6 100644 --- a/src/feature/invoice-status-history/invoice-status-history.service.ts +++ b/src/feature/invoice-status-history/invoice-status-history.service.ts @@ -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) diff --git a/src/feature/order/order.service.ts b/src/feature/order/order.service.ts index 7a38bdb..da72e33 100644 --- a/src/feature/order/order.service.ts +++ b/src/feature/order/order.service.ts @@ -778,6 +778,7 @@ export class OrderService { deliveryOrderId = await this.createDeliveryRequest( undefined, + orderTotal, restaurant_id, restaurantAddress, customerAddress, @@ -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, @@ -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,