SSR-1011 cleanup & fix deductible pricing

This commit is contained in:
Josh Dassinger 2024-03-13 10:23:52 -05:00
parent f8e4e2f7d4
commit b0a053c48a
2 changed files with 6 additions and 2 deletions

View file

@ -67,6 +67,10 @@ export default {
});
},
getAmountDue(lineItems) {
if (!useMainStore().isNoComp && !useMainStore().policy.isITAC) {
return useMainStore().order.currentDeductible;
}
let amountDue = 0;
if (lineItems.glassParts) {
amountDue += this.getTotalPriceOfAllLineItemsAndChildParts(

View file

@ -1145,7 +1145,7 @@ export const useMainStore = defineStore({
this.applicationUser.crmCustomerId = response.crmCustomerId.toString();
},
saveSession(options) {
saveSession({ submitAfterSave }) {
const { vehicle, damage, policy, customer, contactInfo, payment,
lineItems, serviceLocation, schedule } = this.order;
@ -1277,7 +1277,7 @@ export const useMainStore = defineStore({
eon: this.order.eon,
submitToMainframe: !!this.order.referralNumber,
loadedFromDupeCheck,
submitAfterSave: !!options.submitAfterSave
submitAfterSave: !!submitAfterSave
},
additionalSuccessEventDataHandler: () =>
`Email provided: ${customer.emailAddress ? 'true' : 'false'}`