From 62d550750f19bd98f80af99accf7ff8831956bf1 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Fri, 27 Sep 2024 15:11:20 -0400 Subject: [PATCH] CSR-2237 CSR-2237 when coverage is verified, only show deductible for amount due in the cart --- src/mixins/base-mixin.js | 2 +- src/mixins/base-mixin.spec.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mixins/base-mixin.js b/src/mixins/base-mixin.js index c1e60d16a..15095746b 100644 --- a/src/mixins/base-mixin.js +++ b/src/mixins/base-mixin.js @@ -173,7 +173,7 @@ export default { !order.policy.isNoComp && !order.policy.isItac ) { - amountDue += order.policy.currentDeductible; + amountDue = order.policy.currentDeductible; } return ((amountDue * 100) / 100).toFixed(2); diff --git a/src/mixins/base-mixin.spec.js b/src/mixins/base-mixin.spec.js index 9a062a831..a3493910e 100644 --- a/src/mixins/base-mixin.spec.js +++ b/src/mixins/base-mixin.spec.js @@ -175,7 +175,7 @@ describe("baseMixin.js", () => { promos: [], }; - const payment = { insuranceCoverage: { isVerified: true } }; + const payment = { insuranceCoverage: { isVerified: false } }; const policy = { isNoComp: false, isItac: false, currentDeductible: 250 }; store.getters = { @@ -190,7 +190,7 @@ describe("baseMixin.js", () => { var amtDue = mixIn.methods.getAmountDue(lineItems); - expect(amtDue).toEqual("303.00"); + expect(amtDue).toEqual("53.00"); }); test("getAmountDue should function with a submitted order", () => { @@ -223,7 +223,7 @@ describe("baseMixin.js", () => { promos: [], }; - const payment = { insuranceCoverage: { isVerified: true } }; + const payment = { insuranceCoverage: { isVerified: false } }; const policy = { isNoComp: false, isItac: false, currentDeductible: 250 }; mixIn.methods.hasSubmittedOrder = jest.fn().mockReturnValue(true); @@ -240,7 +240,7 @@ describe("baseMixin.js", () => { var amtDue = mixIn.methods.getAmountDue(lineItems); - expect(amtDue).toEqual("303.00"); + expect(amtDue).toEqual("53.00"); }); test("getAmountDue for cash should sum lineitems", () => {