From c41a0e2e385bd2388ad09370d0de66274db0519f Mon Sep 17 00:00:00 2001 From: ankitjavalkarwork Date: Mon, 1 Dec 2014 17:01:44 +0530 Subject: [PATCH] Add print formats for Acc. Receivable/Payable and Summary reports --- .../accounts_payable/accounts_payable.html | 1 + .../accounts_payable_summary.html | 1 + .../accounts_receivable.html | 77 +++++++++++++++++++ .../accounts_receivable.py | 8 +- .../accounts_receivable_summary.html | 1 + .../accounts_receivable_summary.json | 2 +- .../accounts_receivable_summary.py | 8 +- 7 files changed, 89 insertions(+), 9 deletions(-) create mode 100644 erpnext/accounts/report/accounts_payable/accounts_payable.html create mode 100644 erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.html create mode 100644 erpnext/accounts/report/accounts_receivable/accounts_receivable.html create mode 100644 erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.html diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.html b/erpnext/accounts/report/accounts_payable/accounts_payable.html new file mode 100644 index 0000000000..d3020b22a4 --- /dev/null +++ b/erpnext/accounts/report/accounts_payable/accounts_payable.html @@ -0,0 +1 @@ +{% include "accounts/report/accounts_receivable/accounts_receivable.html" %} diff --git a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.html b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.html new file mode 100644 index 0000000000..d3020b22a4 --- /dev/null +++ b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.html @@ -0,0 +1 @@ +{% include "accounts/report/accounts_receivable/accounts_receivable.html" %} diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html new file mode 100644 index 0000000000..6904118e43 --- /dev/null +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html @@ -0,0 +1,77 @@ +
+ {%= frappe.boot.letter_heads[frappe.defaults.get_default("letter_head")] %} +
+

{%= __(report.report_name) %}

+

{%= filters.account && (filters.account + ", ") || "" %} {%= filters.company %}

+
+ {%= filters.ageing_based_on %} + {%= __("Until") %} + {%= dateutil.str_to_user(filters.report_date) %} +
+
+ + + + {% if(__(report.report_name) == "Accounts Receivable" || __(report.report_name) == "Accounts Payable") { %} + + + + + + + {% } else { %} + + + + + {% } %} + + + + {% for(var i=0, l=data.length; i + {% if(__(report.report_name) == "Accounts Receivable" || __(report.report_name) == "Accounts Payable") { %} + {% if(data[i][__("Posting Date")]) { %} + + + + + + + {% } else { %} + + + + + + + {% } %} + {% } else { %} + {% if(data[i][__("Customer")] || data[i][__("Supplier")]|| " ") { %} + + + + + {% } %} + {% } %} + + {% } %} + +
{%= __("Date") %}{%= __("Ref") %}{%= __("Party") %}{%= __("Invoiced Amount") %}{%= __("Paid Amount") %}{%= __("Outstanding Amount") %}{%= __("Party") %}{%= __("Total Invoiced Amount") %}{%= __("Total Paid Amount") %}{%= __("Total Outstanding Amount") %}
{%= dateutil.str_to_user(data[i][__("Posting Date")]) %}{%= data[i][__("Voucher Type")] %} +
{%= data[i][__("Voucher No")] %}
{%= data[i][__("Customer")] || data[i][__("Supplier")] %} + {% if(__(report.report_name) == "Accounts Receivable") { %} +
{%= __("Territory") %}: {%= data[i][__("Territory")] %} + {% } else { %} +
{%= __("Supplier Type") %}: {%= data[i][__("Supplier Type")] %} + {% } %} +
{%= __("Remarks") %}: {%= data[i][__("Remarks")] %}
{%= format_currency(data[i][__("Invoiced Amount")]) %}{%= format_currency(data[i][__("Paid Amount")]) %}{%= format_currency(data[i][__("Outstanding Amount")]) %}{%= data[i][__("Customer")] || data[i][__("Supplier")] || " " %} + {%= data[i][__("Account")] && format_currency(data[i][__("Invoiced Amount")]) %} + {%= data[i][__("Account")] && format_currency(data[i][__("Paid Amount")]) %} + {%= data[i][__("Account")] && format_currency(data[i][__("Outstanding Amount")]) %}{%= data[i][__("Customer")] || data[i][__("Supplier")] %} + {% if(__(report.report_name) == "Accounts Receivable Summary") { %} +
{%= __("Territory") %}: {%= data[i][__("Territory")] %} + {% } else { %} +
{%= __("Supplier Type") %}: {%= data[i][__("Supplier Type")] %} + {% } %} +
{%= __("Remarks") %}: {%= data[i][__("Remarks")] %}
{%= format_currency(data[i][__("Total Invoiced Amt")]) %}{%= format_currency(data[i][__("Total Paid Amt")]) %}{%= format_currency(data[i][__("Total Outstanding Amt")]) %}
+

Printed On {%= dateutil.str_to_user(dateutil.get_datetime_as_string()) %}

\ No newline at end of file diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 8d4dcfcea2..d2d11870e3 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -32,10 +32,10 @@ class ReceivablePayableReport(object): columns += [_("Invoiced Amount") + ":Currency:100", _("Paid Amount") + ":Currency:100", _("Outstanding Amount") + ":Currency:100", _("Age") + ":Int:50", - "0-" + self.filters.range1 + ":Currency:100", - self.filters.range1 + "-" + self.filters.range2 + ":Currency:100", - self.filters.range2 + "-" + self.filters.range3 + ":Currency:100", - self.filters.range3 + _("-Above") + ":Currency:100" + "0-" + str(self.filters.range1) + ":Currency:100", + str(self.filters.range1) + "-" + str(self.filters.range2) + ":Currency:100", + str(self.filters.range2) + "-" + str(self.filters.range3) + ":Currency:100", + str(self.filters.range3) + _("-Above") + ":Currency:100" ] if args.get("party_type") == "Customer": diff --git a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.html b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.html new file mode 100644 index 0000000000..d3020b22a4 --- /dev/null +++ b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.html @@ -0,0 +1 @@ +{% include "accounts/report/accounts_receivable/accounts_receivable.html" %} diff --git a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.json b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.json index 79e9e6ea1c..a7f6db15f8 100644 --- a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.json +++ b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.json @@ -6,7 +6,7 @@ "docstatus": 0, "doctype": "Report", "is_standard": "Yes", - "modified": "2014-10-17 15:45:00.694265", + "modified": "2014-12-01 16:14:40.213259", "modified_by": "Administrator", "module": "Accounts", "name": "Accounts Receivable Summary", diff --git a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py index 82daa19eed..80555c9cfa 100644 --- a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py +++ b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py @@ -21,10 +21,10 @@ class AccountsReceivableSummary(ReceivablePayableReport): _("Total Invoiced Amt") + ":Currency:140", _("Total Paid Amt") + ":Currency:140", _("Total Outstanding Amt") + ":Currency:160", - "0-" + self.filters.range1 + ":Currency:100", - self.filters.range1 + "-" + self.filters.range2 + ":Currency:100", - self.filters.range2 + "-" + self.filters.range3 + ":Currency:100", - self.filters.range3 + _("-Above") + ":Currency:100"] + "0-" + str(self.filters.range1) + ":Currency:100", + str(self.filters.range1) + "-" + str(self.filters.range2) + ":Currency:100", + str(self.filters.range2) + "-" + str(self.filters.range3) + ":Currency:100", + str(self.filters.range3) + _("-Above") + ":Currency:100"] if args.get("party_type") == "Customer": columns += [_("Territory") + ":Link/Territory:80"]