CASH-1640 | Fix promo staying on order before tax call is made

This commit is contained in:
Scott Kiener 2025-10-14 08:13:05 -04:00
parent 1e19d6abe6
commit 1d603abbe2

View file

@ -35,7 +35,7 @@
:isNoComp="isNoComp"
:isExpandedOnLoad="false"
:isMSRFeeApplicable="isMSRFeeApplicable"
@itemRemoved="reTaxItemsOnOrder" />
@itemRemoved="evaluatePromosAndTaxItemsOnOrder" />
<afterpayBreakout
v-if="isAfterpayBreakoutDisplay"
@ -589,7 +589,13 @@ export default {
this.pageName
);
},
async reTaxItemsOnOrder() {
async evaluatePromosAndTaxItemsOnOrder() {
//Revalidate promos if there are any inactive, or active promos
const hasInactivePromos = this.inactivePromos.length > 0;
const hasActivePromos = this.lineItems.promos.length > 0;
if (hasInactivePromos || hasActivePromos) {
await this.revalidatePromos();
}
this.lineItems = await baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.TAX_ORDER_ITEMS_AND_SAVE_SERVER_DATA,
{