From 451ce9cbf711798248d9dda0a69593679744b392 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Tue, 18 Jun 2024 06:58:40 -0400 Subject: [PATCH] CSR-2091 CSR-2091 amount due showing as $NaN because it is adding the string values returned from getSubTotal and getSalesTax. Use the unary operator to convert to numeric before adding. --- src/fmg-components/cart/cart.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue index dcf1375b7..52d33c575 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -930,7 +930,10 @@ export default { if (!this.showAsPaid) { return 0; } - return this.subTotal + this.salesTax; + + // unary plus operator to convert string amount to numeric so we can add them together + var amtPaid = +this.subTotal + +this.salesTax; + return amtPaid; }, }, components: {