change deductible based on damageType

This commit is contained in:
Bill Richardson 2023-11-14 10:19:27 -05:00
parent 0d6f5ad70f
commit a05550513b

View file

@ -909,11 +909,12 @@ export const useMainStore = defineStore({
const ctuToUse = this.order.serviceLocation.zipCodeCtu;
const availableLineItemsFormattedForRequest = getLineItemQueryStringForPricing(availableLineItems);
const { policy } = this.order;
const deductibleToUse = this.damage.isRepair ? policy.deductible.repair : policy.deductible.replace;
let queryString =
`ParentAccountNumber=${this.order.accountNumber}`
+ `&CTU=${ctuToUse}`
+ `&Deductible=${policy.deductible.repair}`
+ `&Deductible=${deductibleToUse}`
+ `&ZipCode=${zipCodeToUse}`
+ `${availableLineItemsFormattedForRequest}`;