From 57a1067a3d89d1a7f5f6325ce3538f2b0e9b6233 Mon Sep 17 00:00:00 2001 From: AHumphriesSL Date: Thu, 18 Jun 2026 15:08:37 -0400 Subject: [PATCH] MSR Fee amount fix Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .../service-location/service-location.vue | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/layouts/schedule-page/service-location/service-location.vue b/src/layouts/schedule-page/service-location/service-location.vue index 8dac1ad7..875e2d61 100644 --- a/src/layouts/schedule-page/service-location/service-location.vue +++ b/src/layouts/schedule-page/service-location/service-location.vue @@ -294,7 +294,15 @@ export default { return this.processIfStatements(bodyText, 'custom', this.getCustomValueFromString); }, displayMSRFeeAlert() { - if (!this.mobileFeePart || this.mobileFeePart.sellingPrice === 0 || !isMSRPart(this.mobileFeePart)) { + if (!this.mobileFeePart || !isMSRPart(this.mobileFeePart)) { + return false; + } + + const mobileFeeAmount = (this.mobileFeePart.kitPrice ?? 0) + + (this.mobileFeePart.laborAmount ?? 0) + + (this.mobileFeePart.sellingPrice ?? 0); + + if (mobileFeeAmount <= 0) { return false; } @@ -307,15 +315,15 @@ export default { return false; } - if (!this.mobileFeePart.isInsurable) { - return true; - } - - return false; + return !this.mobileFeePart.isInsurable; }, msrFeeAlertCopy() { + const mobileFeeAmount = (this.mobileFeePart?.kitPrice ?? 0) + + (this.mobileFeePart?.laborAmount ?? 0) + + (this.mobileFeePart?.sellingPrice ?? 0); + let content = this.getCmsContent('AlertMSRFeeWidget', widgetFields.ALERT_WIDGET.BODY_TEXT); - content = content.replace('{custom:mobileFee}', `${this.mobileFeePart.sellingPrice.toFixed(2)}`); + content = content.replace('{custom:mobileFee}', `${mobileFeeAmount.toFixed(2)}`); return content; } },