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
|
includeTax
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lineItems.supportingItems) {
|
if (lineItems.supportingItems) {
|
||||||
amountDue += this.getTotalPriceOfAllLineItemsAndChildParts(
|
amountDue += this.getTotalPriceOfAllLineItemsAndChildParts(
|
||||||
lineItems.supportingItems,
|
lineItems.supportingItems,
|
||||||
includeTax
|
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;
|
const order = this.hasSubmittedOrder() ? this.getSubmittedOrder() : store.getters.order;
|
||||||
if (
|
if (
|
||||||
|
|
@ -171,12 +160,20 @@ export default {
|
||||||
!order.policy.isItac
|
!order.policy.isItac
|
||||||
) {
|
) {
|
||||||
amountDue = order.policy.currentDeductible;
|
amountDue = order.policy.currentDeductible;
|
||||||
if (lineItems.vaps) {
|
}
|
||||||
amountDue += this.getTotalPriceOfAllLineItemsAndChildParts(
|
|
||||||
lineItems.vaps,
|
if (lineItems.vaps) {
|
||||||
includeTax
|
amountDue += this.getTotalPriceOfAllLineItemsAndChildParts(
|
||||||
);
|
lineItems.vaps,
|
||||||
}
|
includeTax
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lineItems.promos) {
|
||||||
|
amountDue += this.getTotalPriceOfAllLineItemsAndChildParts(
|
||||||
|
lineItems.promos,
|
||||||
|
includeTax
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ((amountDue * 100) / 100).toFixed(2);
|
return ((amountDue * 100) / 100).toFixed(2);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue