Now calculating taxes on revalidated promos
This commit is contained in:
parent
4be89c2709
commit
c83644090e
1 changed files with 19 additions and 0 deletions
|
|
@ -347,6 +347,7 @@ export default {
|
|||
"payment-method",
|
||||
false
|
||||
);
|
||||
|
||||
// Handle error alerts here, success alerts are handled in the watcher
|
||||
if (revalidatePromoResponse.errors.length) {
|
||||
getNewlyInactivatedPromos(
|
||||
|
|
@ -357,6 +358,24 @@ export default {
|
|||
this.$refs.funnelHeader.pushGlobalAlert(errorAlert, errorAlert.shouldAutoFade);
|
||||
});
|
||||
}
|
||||
|
||||
if (revalidatePromoResponse.promoLineItems.length > 0) {
|
||||
await baseMixin.methods.dispatchStoreActionWithLogging(
|
||||
storeActions.TAX_ORDER_ITEMS_AND_SAVE_SERVER_DATA,
|
||||
{
|
||||
billToAccountNumber: "87291",
|
||||
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
|
||||
);
|
||||
}
|
||||
|
||||
this.lineItems.promos = revalidatePromoResponse.promoLineItems;
|
||||
this.inactivePromos = revalidatePromoResponse.errors.map((x) =>
|
||||
getPromoCodeWithoutBundleIdentifier(x.promoCode)
|
||||
|
|
|
|||
Loading…
Reference in a new issue