CASH-1760 | Fix revalidate tax call
It wasn't sending all items
This commit is contained in:
parent
53f125362e
commit
cd03722642
1 changed files with 18 additions and 18 deletions
|
|
@ -489,24 +489,6 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (revalidatePromoResponse.promoLineItems.length > 0) {
|
|
||||||
await baseMixin.methods.dispatchStoreActionWithLogging(
|
|
||||||
storeActions.TAX_ORDER_ITEMS_AND_SAVE_SERVER_DATA,
|
|
||||||
{
|
|
||||||
billToAccountNumber: store.getters.payment.billToAccountNumber,
|
|
||||||
providerNumber:
|
|
||||||
this.$store.getters.order.serviceLocation.provider.providerNumber,
|
|
||||||
appointmentType: this.$store.getters.order.serviceLocation.appointmentType,
|
|
||||||
serviceLocationCity: this.$store.getters.order.serviceLocation.city,
|
|
||||||
serviceLocationState: this.$store.getters.order.serviceLocation.state,
|
|
||||||
serviceLocationZipCode: this.$store.getters.order.serviceLocation.zipCode,
|
|
||||||
pricedLineItems: revalidatePromoResponse.promoLineItems,
|
|
||||||
},
|
|
||||||
"payment-method",
|
|
||||||
false
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const vapsToAddToCart = getVapsThatNeedToBeAddedToSatisfyPromos(
|
const vapsToAddToCart = getVapsThatNeedToBeAddedToSatisfyPromos(
|
||||||
revalidatePromoResponse.promoLineItems,
|
revalidatePromoResponse.promoLineItems,
|
||||||
this.availableVaps,
|
this.availableVaps,
|
||||||
|
|
@ -520,6 +502,24 @@ export default {
|
||||||
getPromoCodeWithoutBundleIdentifier(x.promoCode)
|
getPromoCodeWithoutBundleIdentifier(x.promoCode)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (revalidatePromoResponse.promoLineItems.length > 0) {
|
||||||
|
await baseMixin.methods.dispatchStoreActionWithLogging(
|
||||||
|
storeActions.TAX_ORDER_ITEMS_AND_SAVE_SERVER_DATA,
|
||||||
|
{
|
||||||
|
billToAccountNumber: store.getters.payment.billToAccountNumber,
|
||||||
|
providerNumber:
|
||||||
|
this.$store.getters.order.serviceLocation.provider.providerNumber,
|
||||||
|
appointmentType: this.$store.getters.order.serviceLocation.appointmentType,
|
||||||
|
serviceLocationCity: this.$store.getters.order.serviceLocation.city,
|
||||||
|
serviceLocationState: this.$store.getters.order.serviceLocation.state,
|
||||||
|
serviceLocationZipCode: this.$store.getters.order.serviceLocation.zipCode,
|
||||||
|
pricedLineItems: this.lineItems,
|
||||||
|
},
|
||||||
|
"payment-method",
|
||||||
|
false
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// SAVE PROMO CHANGES TO STORE
|
// SAVE PROMO CHANGES TO STORE
|
||||||
this.dispatchStoreAction(
|
this.dispatchStoreAction(
|
||||||
storeActions.SAVE_ACTIVE_AND_OR_INACTIVE_PROMOS,
|
storeActions.SAVE_ACTIVE_AND_OR_INACTIVE_PROMOS,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue