| {%= __("Total Outstanding") %} |
- {%= format_currency(balance_row[range1]) %} |
+ {%= format_number(balance_row[range1], null, 2) %} |
{%= format_currency(balance_row[range2]) %} |
{%= format_currency(balance_row[range3]) %} |
{%= format_currency(balance_row[range4]) %} |
+ {%= format_currency(balance_row[range5]) %} |
+ {%= format_currency(balance_row[range6]) %} |
{%= format_currency(flt(balance_row[("outstanding_amount")]), data[data.length-1]["currency"]) %}
|
@@ -86,6 +94,8 @@
|
|
|
+ |
+ |
{%= format_currency(flt(balance_row[("pdc/lc_amount")]), data[data.length-1]["currency"]) %}
|
@@ -95,6 +105,8 @@
|
|
|
+ |
+ |
{%= format_currency(flt(balance_row[("outstanding_amount")]-balance_row[("pdc/lc_amount")]), data[data.length-1]["currency"]) %} |
From 4bc86c7e9de695ed2fdaccb01e7d6c10b813f5e8 Mon Sep 17 00:00:00 2001
From: sahil28297 <37302950+sahil28297@users.noreply.github.com>
Date: Mon, 10 Jun 2019 17:38:42 +0530
Subject: [PATCH 09/11] fix(patch): escape illegal characters to avoid SQL
syntax error (#17889)
---
erpnext/patches/v11_0/update_total_qty_field.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/erpnext/patches/v11_0/update_total_qty_field.py b/erpnext/patches/v11_0/update_total_qty_field.py
index 992454ac7c1..51358e95458 100644
--- a/erpnext/patches/v11_0/update_total_qty_field.py
+++ b/erpnext/patches/v11_0/update_total_qty_field.py
@@ -40,7 +40,7 @@ def execute():
# This is probably never used anywhere else as of now, but should be
values = []
for d in batch_transactions:
- values.append("('{}', {})".format(d.parent, d.qty))
+ values.append("('{}', {})".format(frappe.db.escape(d.parent), d.qty))
conditions = ",".join(values)
frappe.db.sql("""
INSERT INTO `tab{}` (name, total_qty) VALUES {}
From 832884a7eaaac895b8f36e88001c6c1d97b745cb Mon Sep 17 00:00:00 2001
From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
Date: Mon, 10 Jun 2019 17:43:08 +0530
Subject: [PATCH 10/11] fix: Total Amount fix in journal entry (#17879)
---
erpnext/accounts/doctype/journal_entry/journal_entry.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py
index 92342f4d7c8..214cdabe3a7 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.py
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py
@@ -425,8 +425,9 @@ class JournalEntry(AccountsController):
pay_to_recd_from = frappe.db.get_value(d.party_type, d.party,
"customer_name" if d.party_type=="Customer" else "supplier_name")
- party_amount += (d.debit_in_account_currency or d.credit_in_account_currency)
- party_account_currency = d.account_currency
+ if pay_to_recd_from and pay_to_recd_from == d.party:
+ party_amount += (d.debit_in_account_currency or d.credit_in_account_currency)
+ party_account_currency = d.account_currency
elif frappe.db.get_value("Account", d.account, "account_type") in ["Bank", "Cash"]:
bank_amount += (d.debit_in_account_currency or d.credit_in_account_currency)
From 6e97f7fbd80694c0e997077ca026b05b6c043958 Mon Sep 17 00:00:00 2001
From: Nabin Hait