From a7a1f092656687609cfec4ef320465206e384e19 Mon Sep 17 00:00:00 2001 From: Yousef Date: Wed, 21 Jun 2023 15:22:56 +0200 Subject: [PATCH 1/2] fix: invoice payments with rounding amount --- .../js/posapp/components/pos/Payments.vue | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/posawesome/public/js/posapp/components/pos/Payments.vue b/posawesome/public/js/posapp/components/pos/Payments.vue index 9490bf2c..6c209469 100644 --- a/posawesome/public/js/posapp/components/pos/Payments.vue +++ b/posawesome/public/js/posapp/components/pos/Payments.vue @@ -294,6 +294,19 @@ :prefix="currencySymbol(invoice_doc.currency)" > + + + this.invoice_doc.grand_total + this.redeemed_customer_credit > + (this.invoice_doc.rounded_total || this.invoice_doc.grand_total) ) { evntBus.$emit('show_mesage', { text: `can not redeam customer credit more than invoice total`, @@ -883,7 +898,10 @@ export default { }, set_full_amount(idx) { this.invoice_doc.payments.forEach((payment) => { - payment.amount = payment.idx == idx ? this.invoice_doc.grand_total : 0; + payment.amount = + payment.idx == idx + ? this.invoice_doc.rounded_total || this.invoice_doc.grand_total + : 0; }); }, set_rest_amount(idx) { @@ -1214,7 +1232,8 @@ export default { }, diff_payment() { let diff_payment = this.flt( - this.invoice_doc.grand_total - this.total_payments, + (this.invoice_doc.rounded_total || this.invoice_doc.grand_total) - + this.total_payments, this.currency_precision ); this.paid_change = -diff_payment; @@ -1298,7 +1317,7 @@ export default { this.is_write_off_change = 0; if (default_payment) { default_payment.amount = this.flt( - invoice_doc.grand_total, + invoice_doc.rounded_total || invoice_doc.grand_total, this.currency_precision ); } From 46812d94eead4f884532cde30885e021cbead55b Mon Sep 17 00:00:00 2001 From: Yousef Restom Date: Tue, 27 Jun 2023 22:40:51 +0300 Subject: [PATCH 2/2] Version: 6.0.4 --- posawesome/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posawesome/__init__.py b/posawesome/__init__.py index 8d4ee034..7a5f57c6 100644 --- a/posawesome/__init__.py +++ b/posawesome/__init__.py @@ -2,7 +2,7 @@ from __future__ import unicode_literals import frappe -__version__ = "6.0.3" +__version__ = "6.0.4" def console(*data):