From ea920717a18008d5bd18733d5dd409ef6e991dc7 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Sat, 15 Jun 2024 05:56:23 +0800 Subject: [PATCH] Fix a rounding problem in group payment which will result in goods cannot be released through CallbackBillplzLogic --- .../elements/CustomerPaymentBillingInnerComponent.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/assets/vue/components/companies/elements/CustomerPaymentBillingInnerComponent.vue b/resources/assets/vue/components/companies/elements/CustomerPaymentBillingInnerComponent.vue index 19ca390a..634550da 100644 --- a/resources/assets/vue/components/companies/elements/CustomerPaymentBillingInnerComponent.vue +++ b/resources/assets/vue/components/companies/elements/CustomerPaymentBillingInnerComponent.vue @@ -116,9 +116,10 @@ }, sumAmount () { var new_object = this.selectedInvoice; - return Object.keys(new_object).reduce(function(total, key) { - return total + Math.round(new_object[key].amount * 100) / 100; + var total = Object.keys(new_object).reduce(function(total, key) { + return total + new_object[key].amount; }, 0).toFixed(2); + return Math.round(total * 100) / 100; }, selectedIds () { return this.selectedInvoice.map(s=>s.id);