diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html
index 7f663d8dede..933c6ddf89d 100644
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html
@@ -75,7 +75,7 @@
{%= format_currency(balance_row[range3]) %} |
{%= format_currency(balance_row[range4]) %} |
- {%= format_currency(flt(balance_row[__("Outstanding Amount")]), data[data.length-1]["currency"]) %}
+ {%= format_currency(flt(balance_row[("outstanding_amount")]), data[data.length-1]["currency"]) %}
|
{%= __("PDC/LC") %} |
@@ -84,7 +84,7 @@
|
|
- {%= format_currency(flt(balance_row[__("PDC/LC Amount")]), data[data.length-1]["currency"]) %}
+ {%= format_currency(flt(balance_row[("pdc/lc_amount")]), data[data.length-1]["currency"]) %}
|
@@ -177,10 +177,10 @@
{%= data[i]["po_no"] %} |
{% } %}
- {%= frappe.datetime.str_to_user(data[i][__("PDC/LC Date")]) %} |
- {%= data[i][__("PDC/LC Ref")] %} |
- {%= format_currency(data[i][__("PDC/LC Amount")], data[i]["currency"]) %} |
- {%= format_currency(data[i][__("Remaining Balance")], data[i]["currency"]) %} |
+ {%= frappe.datetime.str_to_user(data[i][("pdc/lc_date")]) %} |
+ {%= data[i][("pdc/lc_ref")] %} |
+ {%= format_currency(data[i][("pdc/lc_amount")], data[i]["currency"]) %} |
+ {%= format_currency(data[i][("remaining_balance")], data[i]["currency"]) %} |
{% } %}
{% } else { %}
|
@@ -205,9 +205,9 @@
{%= data[i][__("Customer LPO")] %}
{% } %}
{%= frappe.datetime.str_to_user(data[i][__("PDC/LC Date")]) %} |
- {%= data[i][__("PDC/LC Ref")] %} |
- {%= format_currency(data[i][__("PDC/LC Amount")], data[i]["currency"]) %} |
- {%= format_currency(data[i][__("Remaining Balance")], data[i]["currency"]) %} |
+ {%= data[i][("pdc/lc_ref")] %} |
+ {%= format_currency(data[i][("pdc/lc_amount")], data[i]["currency"]) %} |
+ {%= format_currency(data[i][("remaining_balance")], data[i]["currency"]) %} |
{% } %}
{% } %}
{% } else { %}
@@ -228,10 +228,10 @@
{% } else { %}
{%= __("Total") %} |
{% } %}
- {%= format_currency(data[i][__("Total Invoiced Amt")], data[i]["currency"]) %} |
- {%= format_currency(data[i][__("Total Paid Amt")], data[i]["currency"]) %} |
+ {%= format_currency(data[i][("total_invoiced_amt")], data[i]["currency"]) %} |
+ {%= format_currency(data[i][("total_paid_amt")], data[i]["currency"]) %} |
{%= report.report_name === "Accounts Receivable Summary" ? format_currency(data[i][__("Credit Note Amt")], data[i]["currency"]) : format_currency(data[i][__("Debit Note Amt")], data[i]["currency"]) %} |
- {%= format_currency(data[i][__("Total Outstanding Amt")], data[i]["currency"]) %} |
+ {%= format_currency(data[i][("total_outstanding_amt")], data[i]["currency"]) %} |
{% } %}
{% } %}
diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
index 0425fe51365..fb5467148e7 100644
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
@@ -88,20 +88,40 @@ class ReceivablePayableReport(object):
"width": 120
})
- columns.append({
+ columns += [
+ {
"fieldname": "currency",
"label": _("Currency"),
"fieldtype": "Link",
"options": "Currency",
"width": 100
- })
-
- columns += [
- _("PDC/LC Date") + ":Date:110",
- _("PDC/LC Ref") + ":Data:110",
- _("PDC/LC Amount") + ":Currency/currency:130",
- _("Remaining Balance") + ":Currency/currency:130"
- ]
+ },
+ {
+ "fieldname": "pdc/lc_date",
+ "label": _("PDC/LC Date"),
+ "fieldtype": "Date",
+ "width": 110
+ },
+ {
+ "fieldname": "pdc/lc_ref",
+ "label": _("PDC/LC Ref"),
+ "fieldtype": "Data",
+ "width": 110
+ },
+ {
+ "fieldname": "pdc/lc_amount",
+ "label": _("PDC/LC Amount"),
+ "fieldtype": "Currency",
+ "options": "Currency",
+ "width": 130
+ },
+ {
+ "fieldname": "remaining_balance",
+ "label": _("Remaining Balance"),
+ "fieldtype": "Currency",
+ "options": "Currency",
+ "width": 130
+ }]
if args.get('party_type') == 'Customer':
columns.append({
@@ -139,7 +159,6 @@ class ReceivablePayableReport(object):
data = []
pdc_details = get_pdc_details(args.get("party_type"), self.filters.report_date)
-
gl_entries_data = self.get_entries_till(self.filters.report_date, args.get("party_type"))
if gl_entries_data:
@@ -429,7 +448,6 @@ def get_pdc_details(party_type, report_date):
and pent.party_type = %s
group by pent.party, pref.reference_name""", (report_date, party_type), as_dict=1):
pdc_details.setdefault((pdc.invoice_no, pdc.party), pdc)
-
if scrub(party_type):
amount_field = ("jea.debit_in_account_currency"
if party_type == 'Supplier' else "jea.credit_in_account_currency")