Merge pull request #1397 from Safelite/feature/CSR-1392

Feature/csr 1392
This commit is contained in:
CarlNation 2023-10-11 10:17:52 -04:00 committed by GitHub
commit 40976ae5e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View file

@ -7,7 +7,7 @@
@click="toggleClass()">
<div class="col d-flex justify-content-between">
<span class="label">Amount Due</span
><span class="label amount-due">${{ amountDue }}</span>
><span class="label amount-due">{{ amountDue }}</span>
</div>
</div>
<div class="price-table">
@ -123,7 +123,7 @@ export default {
return price;
},
getAmountDue() {
return baseMixin.methods.getAmountDue(this.storeLineItems);
return baseMixin.methods.getDisplayAmountDue(this.storeLineItems);
},
removeItem(item) {
this.$emit("cart-remove", item);

View file

@ -128,9 +128,11 @@ export default {
const itemsClone = { ...lineItems };
delete itemsClone.serverData;
for (var propertyName in itemsClone) {
amountDue += this.getTotalPriceOfAllLineItemsAndChildParts(
itemsClone[propertyName]
);
if (itemsClone[propertyName]) {
amountDue += this.getTotalPriceOfAllLineItemsAndChildParts(
itemsClone[propertyName]
);
}
}
return amountDue;
},