Fixes a potential issue with non-existent recycle fee

This commit is contained in:
Alex Humphries 2026-02-27 16:14:59 -05:00
parent f49168b4da
commit 42b23a24a5

View file

@ -75,7 +75,7 @@
class="cart-item">
<div class="price-row">
<span id="total-label">{{ totalLabel }}</span>
<span if="total-value">{{ getDisplayed(total) }}</span>
<span id="total-value">{{ getDisplayed(total) }}</span>
</div>
</div>
<div
@ -84,7 +84,7 @@
class="cart-item">
<div class="price-row">
<span id="amount-paid-label">{{ amountPaidLabel }}</span>
<span if="amount-paid-value">{{ getDisplayed(amountPaid) }}</span>
<span id="amount-paid-value">{{ getDisplayed(amountPaid) }}</span>
</div>
</div>
<div
@ -122,7 +122,7 @@ import {
getServiceLineItems, getSubtotal, isOrderITAC, isOrderNoComp,
isOrderUnverified
} from '@/helpers/cart-helper';
import { getPriceOfLineItems, getTaxOfLineItems } from '@/helpers/price-calculator';
import { getPriceOfLineItem, getPriceOfLineItems, getTaxOfLineItems } from '@/helpers/price-calculator';
import { processIfStatements } from '@/helpers/cms-content-helper';
const VERIFYING_COVERAGE = 'Verifying coverage';
@ -188,7 +188,7 @@ export default {
},
servicePrice() {
const price = getPriceOfLineItems(getServiceLineItems(this.cartOrder)) ?? 0;
const recycleFee = getPriceOfLineItems([this.recycleFeeLineItem]) ?? 0;
const recycleFee = this.recycleFeeLineItem ? getPriceOfLineItem(this.recycleFeeLineItem) : 0;
return price - this.recalibrationPrice - recycleFee;
},
isUnverified() {