Merge remote-tracking branch 'origin/nation/CASH-2844' into nation/CASH-2844

This commit is contained in:
Carl Nation 2026-06-16 06:06:36 -04:00
commit 9b62c63a32

View file

@ -605,8 +605,13 @@ export default {
[part], [part],
false false
); );
let isQuotePageDiscount = productType == partTypeStrings.QUOTE_PAGE_DISCOUNT;
if (productSku == "DISCOUNT" || productType == "SERVICE PACKAGE DISCOUNT") { if (
productSku == "DISCOUNT" ||
productType == "SERVICE PACKAGE DISCOUNT" ||
isQuotePageDiscount
) {
if (coupon) { if (coupon) {
coupon += ","; coupon += ",";
} }
@ -617,6 +622,7 @@ export default {
} }
discount += productPrice * -1; discount += productPrice * -1;
subTotal += isQuotePageDiscount ? productPrice : 0;
} else { } else {
products.push({ products.push({
productType: productType, productType: productType,
@ -666,6 +672,12 @@ export default {
var repairFee = supportingItems.filter(function (lineItem) { var repairFee = supportingItems.filter(function (lineItem) {
return lineItem.partType.indexOf("REPAIR FEE") !== -1; return lineItem.partType.indexOf("REPAIR FEE") !== -1;
}); });
var replaceFee = supportingItems.filter(function (lineItem) {
return lineItem.partType.indexOf("REPLACE FEE") !== -1;
});
var quotePageDiscount = supportingItems.filter(function (lineItem) {
return lineItem.partType.indexOf(partTypeStrings.QUOTE_PAGE_DISCOUNT) !== -1;
});
var vaps = var vaps =
submittedOrder.lineItems && submittedOrder.lineItems.vaps submittedOrder.lineItems && submittedOrder.lineItems.vaps
@ -704,6 +716,12 @@ export default {
if (rainRepel) { if (rainRepel) {
combinedLineItems = combinedLineItems.concat(rainRepel); combinedLineItems = combinedLineItems.concat(rainRepel);
} }
if (replaceFee) {
combinedLineItems = combinedLineItems.concat(replaceFee);
}
if (quotePageDiscount) {
combinedLineItems = combinedLineItems.concat(quotePageDiscount);
}
//Remove child Parts if any //Remove child Parts if any
combinedLineItems.forEach((lineItem) => { combinedLineItems.forEach((lineItem) => {