Service package discount for CJ
This commit is contained in:
hiteshkumar87 2024-09-20 13:15:02 +05:30
parent d7c3d64f7b
commit bf8cf2d8bb

View file

@ -416,11 +416,15 @@ export default {
.getTotalPriceOfAllLineItemsAndChildParts([part], false) .getTotalPriceOfAllLineItemsAndChildParts([part], false)
.toFixed(2); .toFixed(2);
if (productSku == "DISCOUNT") { if (productSku == "DISCOUNT" || productType == "SERVICE PACKAGE DISCOUNT") {
if (coupon) { if (coupon) {
coupon += ","; coupon += ",";
} }
coupon += productSku; if (productSku == "DISCOUNT") {
coupon += promoCode;
} else {
coupon += productSku;
}
discount = discount + parseFloat(productPrice) * -1; discount = discount + parseFloat(productPrice) * -1;
} else { } else {
products.push({ products.push({