Merge remote-tracking branch 'origin/nation/CASH-2844' into nation/CASH-2844
This commit is contained in:
commit
9b62c63a32
1 changed files with 19 additions and 1 deletions
|
|
@ -605,8 +605,13 @@ export default {
|
|||
[part],
|
||||
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) {
|
||||
coupon += ",";
|
||||
}
|
||||
|
|
@ -617,6 +622,7 @@ export default {
|
|||
}
|
||||
|
||||
discount += productPrice * -1;
|
||||
subTotal += isQuotePageDiscount ? productPrice : 0;
|
||||
} else {
|
||||
products.push({
|
||||
productType: productType,
|
||||
|
|
@ -666,6 +672,12 @@ export default {
|
|||
var repairFee = supportingItems.filter(function (lineItem) {
|
||||
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 =
|
||||
submittedOrder.lineItems && submittedOrder.lineItems.vaps
|
||||
|
|
@ -704,6 +716,12 @@ export default {
|
|||
if (rainRepel) {
|
||||
combinedLineItems = combinedLineItems.concat(rainRepel);
|
||||
}
|
||||
if (replaceFee) {
|
||||
combinedLineItems = combinedLineItems.concat(replaceFee);
|
||||
}
|
||||
if (quotePageDiscount) {
|
||||
combinedLineItems = combinedLineItems.concat(quotePageDiscount);
|
||||
}
|
||||
|
||||
//Remove child Parts if any
|
||||
combinedLineItems.forEach((lineItem) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue