diff --git a/src/helpers/cart-helper.js b/src/helpers/cart-helper.js index 6cf54498..8faf1557 100644 --- a/src/helpers/cart-helper.js +++ b/src/helpers/cart-helper.js @@ -76,7 +76,7 @@ export function getMobileFeeLineItem(order) { * @returns {number|undefined|null} current deductible */ export function getDeductible(order) { - return order.currentDeductible; + return order.damage.isRepair ? order.currentRepairDeductible : order.currentReplaceDeductible; } /** diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index d0d6c341..1ef4bc0b 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -153,7 +153,8 @@ export default { isPayInAdvanceDisabled() { const piaExperience = this.getSettingValue(experimentSettings.ISS_DISPLAY_PAY_IN_ADVANCE); const isEnabled = piaExperience === 'true'; - const isDeductibleTotalEqualToZero = useMainStore().order.currentDeductible === 0; + const isDeductibleTotalEqualToZero = useMainStore().order.damage.isRepair ? useMainStore().order.currentRepairDeductible === 0 + : useMainStore().order.currentReplaceDeductible === 0; return !isEnabled || useMainStore().isUnverified || (useMainStore().isDeductible && isDeductibleTotalEqualToZero); }, diff --git a/src/layouts/tpa-submit/tpa-submit.vue b/src/layouts/tpa-submit/tpa-submit.vue index 85a85d52..c84575b4 100644 --- a/src/layouts/tpa-submit/tpa-submit.vue +++ b/src/layouts/tpa-submit/tpa-submit.vue @@ -207,7 +207,7 @@ export default { return this.mainStore.isVerified; }, currentDeductible() { - return this.mainStore.order.currentDeductible; + return this.mainStore.order.damage.isRepair ? this.mainStore.order.currentRepairDeductible : this.mainStore.order.currentReplaceDeductible; }, deductibleBoxValue() { return this.isVerified diff --git a/src/store/index.js b/src/store/index.js index 4b19b465..c84f84b7 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1204,7 +1204,7 @@ export const useMainStore = defineStore({ Model: vehicle.model }, Insurance: { - Deductible: this.order.currentDeductible ?? 0, + Deductible: this.order.damage.isRepair ? this.order.currentRepairDeductible : this.order.currentReplaceDeductible ?? 0, PolicyNumber: policy.policyNumber, CoverageStatus: insuranceCoverage.coverageStatus, CoverageType: insuranceCoverage.coverageType @@ -1454,8 +1454,8 @@ export const useMainStore = defineStore({ }, policyNumber: policy.policyNumber, policyZipCode: policy.policyZipCode, - originalDeductible: this.order.originalDeductible, - currentDeductible: this.order.currentDeductible, + originalDeductible: this.isRepair ? this.order.originalRepairDeductible : this.order.originalReplaceDeductible, + currentDeductible: this.isRepair ? this.order.currentRepairDeductible : this.order.currentReplaceDeductible, OemEndorsement: this.hasOemEndorsement, noCoverage: this.isNoComp, isItac: this.isITAC