CSR-2237
CSR-2237 move vaps and promos below deductible pricing to make sure it is added into the amount due and also avoid code duplication
This commit is contained in:
parent
2b69271d4d
commit
92e0e6e60d
1 changed files with 15 additions and 18 deletions
|
|
@ -145,24 +145,13 @@ export default {
|
|||
includeTax
|
||||
);
|
||||
}
|
||||
|
||||
if (lineItems.supportingItems) {
|
||||
amountDue += this.getTotalPriceOfAllLineItemsAndChildParts(
|
||||
lineItems.supportingItems,
|
||||
includeTax
|
||||
);
|
||||
}
|
||||
if (lineItems.vaps) {
|
||||
amountDue += this.getTotalPriceOfAllLineItemsAndChildParts(
|
||||
lineItems.vaps,
|
||||
includeTax
|
||||
);
|
||||
}
|
||||
if (lineItems.promos) {
|
||||
amountDue += this.getTotalPriceOfAllLineItemsAndChildParts(
|
||||
lineItems.promos,
|
||||
includeTax
|
||||
);
|
||||
}
|
||||
|
||||
const order = this.hasSubmittedOrder() ? this.getSubmittedOrder() : store.getters.order;
|
||||
if (
|
||||
|
|
@ -171,12 +160,20 @@ export default {
|
|||
!order.policy.isItac
|
||||
) {
|
||||
amountDue = order.policy.currentDeductible;
|
||||
if (lineItems.vaps) {
|
||||
amountDue += this.getTotalPriceOfAllLineItemsAndChildParts(
|
||||
lineItems.vaps,
|
||||
includeTax
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (lineItems.vaps) {
|
||||
amountDue += this.getTotalPriceOfAllLineItemsAndChildParts(
|
||||
lineItems.vaps,
|
||||
includeTax
|
||||
);
|
||||
}
|
||||
|
||||
if (lineItems.promos) {
|
||||
amountDue += this.getTotalPriceOfAllLineItemsAndChildParts(
|
||||
lineItems.promos,
|
||||
includeTax
|
||||
);
|
||||
}
|
||||
|
||||
return ((amountDue * 100) / 100).toFixed(2);
|
||||
|
|
|
|||
Loading…
Reference in a new issue