Accounts receivable summary print fix
This commit is contained in:
parent
0b697c5298
commit
5dbb9f5312
@ -194,7 +194,7 @@
|
|||||||
{% if(!filters.show_pdc_in_print) { %}
|
{% if(!filters.show_pdc_in_print) { %}
|
||||||
<td style="text-align: right">
|
<td style="text-align: right">
|
||||||
{%= format_currency(data[i]["paid_amount"], data[i]["currency"]) %}</td>
|
{%= format_currency(data[i]["paid_amount"], data[i]["currency"]) %}</td>
|
||||||
<td style="text-align: right">{%= report.report_name === "Accounts Receivable" ? format_currency(data[i]["credit_note"], data[i]["currency"]) : format_currency(data[i]["Debit Note"], data[i]["currency"]) %} </td>
|
<td style="text-align: right">{%= report.report_name === "Accounts Receivable" ? format_currency(data[i]["credit_note"], data[i]["currency"]) : format_currency(data[i]["debit_note"], data[i]["currency"]) %} </td>
|
||||||
{% } %}
|
{% } %}
|
||||||
<td style="text-align: right">
|
<td style="text-align: right">
|
||||||
{%= format_currency(data[i]["outstanding_amount"], data[i]["currency"]) %}</td>
|
{%= format_currency(data[i]["outstanding_amount"], data[i]["currency"]) %}</td>
|
||||||
@ -230,7 +230,7 @@
|
|||||||
{% } %}
|
{% } %}
|
||||||
<td style="text-align: right">{%= format_currency(data[i][("total_invoiced_amt")], data[i]["currency"]) %}</td>
|
<td style="text-align: right">{%= format_currency(data[i][("total_invoiced_amt")], data[i]["currency"]) %}</td>
|
||||||
<td style="text-align: right">{%= format_currency(data[i][("total_paid_amt")], data[i]["currency"]) %}</td>
|
<td style="text-align: right">{%= format_currency(data[i][("total_paid_amt")], data[i]["currency"]) %}</td>
|
||||||
<td style="text-align: right">{%= 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"]) %}</td>
|
<td style="text-align: right">{%= 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"]) %}</td>
|
||||||
<td style="text-align: right">{%= format_currency(data[i][("total_outstanding_amt")], data[i]["currency"]) %}</td>
|
<td style="text-align: right">{%= format_currency(data[i][("total_outstanding_amt")], data[i]["currency"]) %}</td>
|
||||||
{% } %}
|
{% } %}
|
||||||
{% } %}
|
{% } %}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
from frappe import _
|
from frappe import _, scrub
|
||||||
from frappe.utils import flt
|
from frappe.utils import flt
|
||||||
from erpnext.accounts.report.accounts_receivable.accounts_receivable import ReceivablePayableReport
|
from erpnext.accounts.report.accounts_receivable.accounts_receivable import ReceivablePayableReport
|
||||||
|
|
||||||
@ -18,24 +18,92 @@ class AccountsReceivableSummary(ReceivablePayableReport):
|
|||||||
if party_naming_by == "Naming Series":
|
if party_naming_by == "Naming Series":
|
||||||
columns += [ args.get("party_type") + " Name::140"]
|
columns += [ args.get("party_type") + " Name::140"]
|
||||||
|
|
||||||
credit_debit_label = _("Credit Note Amt") if args.get('party_type') == 'Customer' else _("Debit Note Amt")
|
credit_debit_label = "Credit Note Amt" if args.get('party_type') == 'Customer' else "Debit Note Amt"
|
||||||
|
|
||||||
|
columns += [{
|
||||||
|
"label": _("Total Invoiced Amt"),
|
||||||
|
"fieldname": "total_invoiced_amt",
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"options": "currency",
|
||||||
|
"width": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": _("Total Paid Amt"),
|
||||||
|
"fieldname": "total_paid_amt",
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"options": "currency",
|
||||||
|
"width": 100
|
||||||
|
}]
|
||||||
|
|
||||||
columns += [
|
columns += [
|
||||||
_("Total Invoiced Amt") + ":Currency/currency:140",
|
{
|
||||||
_("Total Paid Amt") + ":Currency/currency:140",
|
"label": _(credit_debit_label),
|
||||||
credit_debit_label + ":Currency/currency:140",
|
"fieldname": scrub(credit_debit_label),
|
||||||
_("Total Outstanding Amt") + ":Currency/currency:160",
|
"fieldtype": "Currency",
|
||||||
"0-" + str(self.filters.range1) + ":Currency/currency:100",
|
"options": "currency",
|
||||||
str(self.filters.range1) + "-" + str(self.filters.range2) + ":Currency/currency:100",
|
"width": 140
|
||||||
str(self.filters.range2) + "-" + str(self.filters.range3) + ":Currency/currency:100",
|
},
|
||||||
str(self.filters.range3) + _("-Above") + ":Currency/currency:100"]
|
{
|
||||||
|
"label": _("Total Outstanding Amt"),
|
||||||
|
"fieldname": "total_outstanding_amt",
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"options": "currency",
|
||||||
|
"width": 160
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": _("0-" + str(self.filters.range1)),
|
||||||
|
"fieldname": scrub("0-" + str(self.filters.range1)),
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"options": "currency",
|
||||||
|
"width": 160
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": _(str(self.filters.range1) + "-" + str(self.filters.range2)),
|
||||||
|
"fieldname": scrub(str(self.filters.range1) + "-" + str(self.filters.range2)),
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"options": "currency",
|
||||||
|
"width": 160
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": _(str(self.filters.range2) + "-" + str(self.filters.range3)),
|
||||||
|
"fieldname": scrub(str(self.filters.range2) + "-" + str(self.filters.range3)),
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"options": "currency",
|
||||||
|
"width": 160
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": _(str(self.filters.range3) + _("-Above")),
|
||||||
|
"fieldname": scrub(str(self.filters.range3) + _("-Above")),
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"options": "currency",
|
||||||
|
"width": 160
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
if args.get("party_type") == "Customer":
|
if args.get("party_type") == "Customer":
|
||||||
columns += [
|
columns += [{
|
||||||
_("Territory") + ":Link/Territory:80",
|
"label": _("Territory"),
|
||||||
_("Customer Group") + ":Link/Customer Group:120"
|
"fieldname": "territory",
|
||||||
]
|
"fieldtype": "Link",
|
||||||
|
"options": "Territory",
|
||||||
|
"width": 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": _("Customer Group"),
|
||||||
|
"fieldname": "customer_group",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"options": "Customer Group",
|
||||||
|
"width": 80
|
||||||
|
}]
|
||||||
|
|
||||||
if args.get("party_type") == "Supplier":
|
if args.get("party_type") == "Supplier":
|
||||||
columns += [_("Supplier Type") + ":Link/Supplier Type:80"]
|
columns += [{
|
||||||
|
"label": _("Supplier Group"),
|
||||||
|
"fieldname": "supplier_group",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"options": "Supplier Group",
|
||||||
|
"width": 80
|
||||||
|
}]
|
||||||
|
|
||||||
columns.append({
|
columns.append({
|
||||||
"fieldname": "currency",
|
"fieldname": "currency",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user