CSR-2182: remove recal prices from cash carts

This commit is contained in:
Adam Caouette 2024-09-03 15:59:02 -04:00
parent 01d0c809fa
commit 785c9fd1bf

View file

@ -184,6 +184,7 @@ export default {
allowItemRemoval: Boolean,
recyclingModalCmsWidgetName: String,
showAsPaid: Boolean,
isInsurance: Boolean,
insuranceDeductible: Number,
insuranceCompanyName: String,
showInsuranceCoverageAs: String,
@ -299,6 +300,12 @@ export default {
this.$emit("update:modelValue", newValue);
},
},
lineItemsWithoutRecal() {
if (!this.lineItems || this.lineItems.length < 1) return;
const lineItemsCopy = this.lineItems;
lineItemsCopy.supportingItems = baseMixin.methods.filterOutRecalibration(this.lineItems.supportingItems);
return lineItemsCopy;
},
showCoverageAsPending() {
return this.showInsuranceCoverageAs === coverageStatus.PENDING;
},
@ -983,16 +990,23 @@ export default {
return this.getCmsContent("SubtotalTextWidget", "Text");
},
subTotal() {
return baseMixin.methods.getSubTotal(this.lineItems);
if (!this.lineItems || this.lineItems.length < 1) return;
return this.isInsurance
? baseMixin.methods.getSubTotal(this.lineItems)
: baseMixin.methods.getSubTotal(this.lineItemsWithoutRecal);
},
salesTax() {
return baseMixin.methods.getSalesTax(this.lineItems);
if (!this.lineItems || this.lineItems.length < 1) return;
return this.isInsurance
? baseMixin.methods.getSalesTax(this.lineItems)
: baseMixin.methods.getSalesTax(this.lineItemsWithoutRecal);
},
amountDue() {
if (this.showAsPaid) {
return 0;
}
return baseMixin.methods.getAmountDue(this.lineItems);
if (!this.lineItems || this.lineItems.length < 1) return;
if (this.showAsPaid) return 0;
return this.isInsurance
? baseMixin.methods.getAmountDue(this.lineItems)
: baseMixin.methods.getAmountDue(this.lineItemsWithoutRecal);
},
amountPaid() {
if (!this.showAsPaid) {