CASH-1640 | Fix promo staying on order before tax call is made
This commit is contained in:
parent
1e19d6abe6
commit
1d603abbe2
1 changed files with 8 additions and 2 deletions
|
|
@ -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,
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue