From 54a4612e7b9b53977461515b123db4ec1c3c2459 Mon Sep 17 00:00:00 2001 From: Elsio Sanchez <45974454+elsiosanchez@users.noreply.github.com> Date: Fri, 20 Aug 2021 03:08:10 -0400 Subject: [PATCH] Add function for number formatting in decimals (#1088) * Add function for number formatting in decimals * minimal changes * rename function Co-authored-by: elsiosanchez --- .../ADempiere/Form/VPOS/Collection/index.vue | 8 ++++++-- .../VPOS/Collection/overdrawnInvoice/index.vue | 16 ---------------- src/utils/ADempiere/globalMethods.js | 1 + src/utils/ADempiere/valueUtils.js | 7 +++++++ 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/src/components/ADempiere/Form/VPOS/Collection/index.vue b/src/components/ADempiere/Form/VPOS/Collection/index.vue index 4ab7bb65..45a26fb0 100644 --- a/src/components/ADempiere/Form/VPOS/Collection/index.vue +++ b/src/components/ADempiere/Form/VPOS/Collection/index.vue @@ -670,6 +670,9 @@ export default { } }) } + }, + precision() { + return this.$store.getters.getCurrency.standardPrecision } }, created() { @@ -749,13 +752,14 @@ export default { containerUuid, columnName: 'ReferenceNo' }) + if (this.sendToServer) { this.$store.dispatch('setPaymentBox', { posUuid, orderUuid, bankUuid, referenceNo, - amount: this.amontSend, + amount: this.round(this.amontSend, this.precision), convertedAmount: this.amontSend * this.dayRate.divideRate, paymentDate, tenderTypeCode, @@ -767,7 +771,7 @@ export default { orderUuid, bankUuid, referenceNo, - amount: this.amontSend, + amount: this.round(this.amontSend, this.precision), convertedAmount: this.amontSend * this.dayRate.divideRate, paymentDate, tenderTypeCode, diff --git a/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/index.vue b/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/index.vue index ecdc3621..268648ba 100644 --- a/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/index.vue +++ b/src/components/ADempiere/Form/VPOS/Collection/overdrawnInvoice/index.vue @@ -97,22 +97,6 @@ - - - - - - -