INSR-8913 | Ensure all items are priced before being taxed
This commit is contained in:
parent
2c488803bd
commit
706528b2f4
1 changed files with 7 additions and 1 deletions
|
|
@ -142,6 +142,10 @@ export default {
|
||||||
availableLineItems.push(...feeItems);
|
availableLineItems.push(...feeItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (resultMap?.supportingItems?.length > 0) {
|
||||||
|
availableLineItems.push(...resultMap.supportingItems);
|
||||||
|
}
|
||||||
|
|
||||||
let hasBailedOut = false;
|
let hasBailedOut = false;
|
||||||
const pricedItems = await store.getCombinedQuote(availableLineItems)
|
const pricedItems = await store.getCombinedQuote(availableLineItems)
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
@ -153,11 +157,13 @@ export default {
|
||||||
next(`/?issPage=${issPageValues.BAILOUT_PAGE}`);
|
next(`/?issPage=${issPageValues.BAILOUT_PAGE}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const pricedVaps = pricedItems.filter((item) => !resultMap.supportingItems.some((si) => si.partNumber === item.partNumber));
|
||||||
|
|
||||||
// Call the "next" function to complete the transition to this page.
|
// Call the "next" function to complete the transition to this page.
|
||||||
if (!hasBailedOut) {
|
if (!hasBailedOut) {
|
||||||
next((vm) => {
|
next((vm) => {
|
||||||
vm.setCmsContent(resultMap.cmsContent);
|
vm.setCmsContent(resultMap.cmsContent);
|
||||||
vm.setData(pricedItems);
|
vm.setData(pricedVaps);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue