enh
This commit is contained in:
parent
001dd62aa5
commit
38060e78ff
2 changed files with 19 additions and 9 deletions
|
|
@ -260,15 +260,25 @@ const placeOrderUtil = async (params: {
|
|||
);
|
||||
|
||||
const orderGroupProportion = orderTotal / totalAmount;
|
||||
const { finalOrderTotal } = applyDiscountToOrder(
|
||||
|
||||
const orderTotalAmount = isFirstOrder ? totalWithDelivery : totalAmount;
|
||||
|
||||
|
||||
|
||||
// const { finalOrderTotal } = applyDiscountToOrder(
|
||||
// orderTotal,
|
||||
// totalAmount,
|
||||
// appliedCoupon,
|
||||
// orderGroupProportion
|
||||
// );
|
||||
const { finalOrderTotal: finalOrderAmount } = applyDiscountToOrder(
|
||||
orderTotal,
|
||||
totalAmount,
|
||||
orderTotalAmount,
|
||||
appliedCoupon,
|
||||
orderGroupProportion
|
||||
);
|
||||
|
||||
// const orderGroupProportion = orderTotal / totalAmount;
|
||||
|
||||
console.log({orderTotalAmount, finalOrderAmount})
|
||||
// Create order record
|
||||
const [order] = await tx
|
||||
.insert(orders)
|
||||
|
|
@ -279,7 +289,7 @@ const placeOrderUtil = async (params: {
|
|||
isCod: paymentMethod === "cod",
|
||||
isOnlinePayment: paymentMethod === "online",
|
||||
paymentInfoId: sharedPaymentInfoId,
|
||||
totalAmount: isFirstOrder ? totalWithDelivery.toString() : finalOrderTotal.toString(),
|
||||
totalAmount: finalOrderAmount.toString(),
|
||||
deliveryCharge: isFirstOrder ? expectedDeliveryCharge.toString() : '0',
|
||||
readableId: currentReadableId++,
|
||||
userNotes: userNotes || null,
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ const isDevMode = Constants.executionEnvironment !== "standalone";
|
|||
// const BASE_API_URL = 'http://192.168.100.101:4000';
|
||||
// const BASE_API_URL = 'http://192.168.1.7:4000';
|
||||
let BASE_API_URL = "https://mf.freshyo.in";
|
||||
// let BASE_API_URL = 'http://192.168.100.103:4000';
|
||||
// let BASE_API_URL = 'http://192.168.100.104:4000';
|
||||
// let BASE_API_URL = 'http://192.168.29.176:4000';
|
||||
|
||||
// if(isDevMode) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue