Merge pull request #2922 from Safelite/feature/CASH-1760
CASH-1760 | Fix revalidate tax call
This commit is contained in:
commit
169d8b8949
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(
|
||||
revalidatePromoResponse.promoLineItems,
|
||||
this.availableVaps,
|
||||
|
|
@ -520,6 +502,24 @@ export default {
|
|||
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
|
||||
this.dispatchStoreAction(
|
||||
storeActions.SAVE_ACTIVE_AND_OR_INACTIVE_PROMOS,
|
||||
|
|
|
|||
Loading…
Reference in a new issue