Merge pull request #1990 from Safelite/feature/Digital/CSR-1629
CSR-1629
This commit is contained in:
commit
c9c651b7e5
1 changed files with 14 additions and 5 deletions
|
|
@ -583,6 +583,15 @@ export default {
|
|||
);
|
||||
coupons = promoString;
|
||||
}
|
||||
const serviceZipPackage = submittedOrder.lineItems?.supportingItems?.find(
|
||||
(x) => x.partType == "SERVICE PACKAGE DISCOUNT"
|
||||
);
|
||||
if (isDefined(serviceZipPackage)) {
|
||||
if (coupons) {
|
||||
coupons += ",";
|
||||
}
|
||||
coupons += serviceZipPackage.partNumber;
|
||||
}
|
||||
refSequenceNum = submittedOrder.referralSequenceNumber;
|
||||
|
||||
if (isDefined(submittedOrder.payment.isInsurance)) {
|
||||
|
|
@ -607,10 +616,10 @@ export default {
|
|||
isDefined(lineItem.sellingPrice)
|
||||
);
|
||||
if (accountType == "cash" && isPricingAvailable) {
|
||||
const quoteAmountWithDiscount = baseMixin.methods
|
||||
.getTotalPriceOfAllLineItemsAndChildParts(combinedLineItems, false)
|
||||
.toFixed(2);
|
||||
amount = parseFloat(quoteAmountWithDiscount);
|
||||
amount = baseMixin.methods.getTotalPriceOfAllLineItemsAndChildParts(
|
||||
combinedLineItems,
|
||||
false
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -619,7 +628,7 @@ export default {
|
|||
commissionJunctionGtmData: {
|
||||
cj_commission_junction_event: cjEvent,
|
||||
cj_referral_sequence_number: refSequenceNum,
|
||||
cj_amount: amount.toString(),
|
||||
cj_amount: amount.toFixed(2),
|
||||
cj_repair_replace: repairReplace,
|
||||
cj_coupon: coupons,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue