From 00f6fd827ea4bc7d5db95595a4f842b9051bc8a7 Mon Sep 17 00:00:00 2001 From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Date: Thu, 5 Sep 2019 12:15:25 +0530 Subject: [PATCH 01/13] fix: Add UOM in anlytics report when viewing based on item (#18901) --- .../report/sales_analytics/sales_analytics.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/report/sales_analytics/sales_analytics.py b/erpnext/selling/report/sales_analytics/sales_analytics.py index 3239fc626f9..55941d12149 100644 --- a/erpnext/selling/report/sales_analytics/sales_analytics.py +++ b/erpnext/selling/report/sales_analytics/sales_analytics.py @@ -40,6 +40,16 @@ class Analytics(object): "fieldtype": "Data", "width": 140 }) + + if self.filters.tree_type == "Item": + self.columns.append({ + "label": _("UOM"), + "fieldname": 'stock_uom', + "fieldtype": "Link", + "options": "UOM", + "width": 100 + }) + for end_date in self.periodic_daterange: period = self.get_period(end_date) self.columns.append({ @@ -107,7 +117,7 @@ class Analytics(object): value_field = 'qty' self.entries = frappe.db.sql(""" - select i.item_code as entity, i.item_name as entity_name, i.{value_field} as value_field, s.{date_field} + select i.item_code as entity, i.item_name as entity_name, i.stock_uom, i.{value_field} as value_field, s.{date_field} from `tab{doctype} Item` i , `tab{doctype}` s where s.name = i.parent and i.docstatus = 1 and s.company = %s and s.{date_field} between %s and %s @@ -176,6 +186,10 @@ class Analytics(object): total += amount row["total"] = total + + if self.filters.tree_type == "Item": + row["stock_uom"] = period_data.get("stock_uom") + self.data.append(row) def get_rows_by_group(self): @@ -210,6 +224,9 @@ class Analytics(object): self.entity_periodic_data.setdefault(d.entity, frappe._dict()).setdefault(period, 0.0) self.entity_periodic_data[d.entity][period] += flt(d.value_field) + if self.filters.tree_type == "Item": + self.entity_periodic_data[d.entity]['stock_uom'] = d.stock_uom + def get_period(self, posting_date): if self.filters.range == 'Weekly': period = "Week " + str(posting_date.isocalendar()[1]) + " " + str(posting_date.year) From f64aaf5e1cdece3c16931e925b3d01433287e506 Mon Sep 17 00:00:00 2001 From: Rohan Date: Thu, 5 Sep 2019 12:16:44 +0530 Subject: [PATCH 02/13] fix: attribute error when trying to fetch items (#18899) --- .../manufacturing/doctype/production_plan/production_plan.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 97a8ea7e3cf..40b78f215ec 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -97,7 +97,7 @@ class ProductionPlan(Document): self.get_mr_items() def get_so_items(self): - so_list = [d.sales_order for d in self.sales_orders if d.sales_order] + so_list = [d.sales_order for d in self.get("sales_orders", []) if d.sales_order] if not so_list: msgprint(_("Please enter Sales Orders in the above table")) return [] @@ -132,7 +132,7 @@ class ProductionPlan(Document): self.calculate_total_planned_qty() def get_mr_items(self): - mr_list = [d.material_request for d in self.material_requests if d.material_request] + mr_list = [d.material_request for d in self.get("material_requests", []) if d.material_request] if not mr_list: msgprint(_("Please enter Material Requests in the above table")) return [] From aea67c984386bfd86e242545375224fa6df4ee4b Mon Sep 17 00:00:00 2001 From: Anurag Mishra <32095923+Anurag810@users.noreply.github.com> Date: Thu, 5 Sep 2019 12:18:01 +0530 Subject: [PATCH 03/13] fix: added missing positional argument (#18897) --- .../consolidated_financial_statement.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py index ed000bbac4c..bb14635332c 100644 --- a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py +++ b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py @@ -130,7 +130,7 @@ def get_cash_flow_data(fiscal_year, companies, filters): section_data.append(net_profit_loss) for account in cash_flow_account['account_types']: - account_data = get_account_type_based_data(account['account_type'], companies, fiscal_year) + account_data = get_account_type_based_data(account['account_type'], companies, fiscal_year, filters) account_data.update({ "account_name": account['label'], "account": account['label'], @@ -148,12 +148,12 @@ def get_cash_flow_data(fiscal_year, companies, filters): return data -def get_account_type_based_data(account_type, companies, fiscal_year): +def get_account_type_based_data(account_type, companies, fiscal_year, filters): data = {} total = 0 for company in companies: amount = get_account_type_based_gl_data(company, - fiscal_year.year_start_date, fiscal_year.year_end_date, account_type) + fiscal_year.year_start_date, fiscal_year.year_end_date, account_type, filters) if amount and account_type == "Depreciation": amount *= -1 From 67aa7b87351773d3dfd3750a06c5e0c389400882 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Thu, 5 Sep 2019 12:19:35 +0530 Subject: [PATCH 04/13] fix: Honor Shopping Cart Price List (#18884) --- erpnext/shopping_cart/cart.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/erpnext/shopping_cart/cart.py b/erpnext/shopping_cart/cart.py index e98466b6769..a9861e83c16 100644 --- a/erpnext/shopping_cart/cart.py +++ b/erpnext/shopping_cart/cart.py @@ -287,19 +287,20 @@ def set_price_list_and_rate(quotation, cart_settings): def _set_price_list(quotation, cart_settings): """Set price list based on customer or shopping cart default""" - if quotation.selling_price_list: - return + from erpnext.accounts.party import get_default_price_list # check if customer price list exists selling_price_list = None if quotation.party_name: - from erpnext.accounts.party import get_default_price_list - selling_price_list = get_default_price_list(frappe.get_doc("Customer", quotation.party_name)) + selling_price_list = frappe.db.get_value('Customer', quotation.party_name, 'default_price_list') # else check for territory based price list if not selling_price_list: selling_price_list = cart_settings.price_list + if not selling_price_list and quotation.party_name: + selling_price_list = get_default_price_list(frappe.get_doc("Customer", quotation.party_name)) + quotation.selling_price_list = selling_price_list def set_taxes(quotation, cart_settings): From f5d2337176582fe85287fc4dbd54c205874361c0 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 5 Sep 2019 14:47:10 +0530 Subject: [PATCH 05/13] fix: mismatch between warehouse tree value and warehouse based stock balance report value (#18877) --- erpnext/stock/utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/utils.py b/erpnext/stock/utils.py index de31c54f968..dccbbd41ea1 100644 --- a/erpnext/stock/utils.py +++ b/erpnext/stock/utils.py @@ -15,7 +15,7 @@ def get_stock_value_from_bin(warehouse=None, item_code=None): values = {} conditions = "" if warehouse: - conditions += """ and warehouse in ( + conditions += """ and `tabBin`.warehouse in ( select w2.name from `tabWarehouse` w1 join `tabWarehouse` w2 on w1.name = %(warehouse)s @@ -25,11 +25,12 @@ def get_stock_value_from_bin(warehouse=None, item_code=None): values['warehouse'] = warehouse if item_code: - conditions += " and item_code = %(item_code)s" + conditions += " and `tabBin`.item_code = %(item_code)s" values['item_code'] = item_code - query = "select sum(stock_value) from `tabBin` where 1 = 1 %s" % conditions + query = """select sum(stock_value) from `tabBin`, `tabItem` where 1 = 1 + and `tabItem`.name = `tabBin`.item_code and ifnull(`tabItem`.disabled, 0) = 0 %s""" % conditions stock_value = frappe.db.sql(query, values) From 5dbfeb8557760a655078c885d66a26ec1447d6cf Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 5 Sep 2019 14:48:34 +0530 Subject: [PATCH 06/13] fix: not able to create invoice against patient (#18857) --- erpnext/healthcare/doctype/patient/patient.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/healthcare/doctype/patient/patient.py b/erpnext/healthcare/doctype/patient/patient.py index bf15cad5d52..e3eea96f859 100644 --- a/erpnext/healthcare/doctype/patient/patient.py +++ b/erpnext/healthcare/doctype/patient/patient.py @@ -6,7 +6,7 @@ from __future__ import unicode_literals import frappe from frappe import _ from frappe.model.document import Document -from frappe.utils import cint, cstr, getdate +from frappe.utils import cint, cstr, getdate, flt import dateutil from frappe.model.naming import set_name_by_naming_series from erpnext.healthcare.doctype.healthcare_settings.healthcare_settings import get_receivable_account,get_income_account,send_registration_sms @@ -64,7 +64,7 @@ class Patient(Document): def invoice_patient_registration(self): frappe.db.set_value("Patient", self.name, "disabled", 0) send_registration_sms(self) - if(frappe.get_value("Healthcare Settings", None, "registration_fee")>0): + if(flt(frappe.get_value("Healthcare Settings", None, "registration_fee"))>0): company = frappe.defaults.get_user_default('company') if not company: company = frappe.db.get_value("Global Defaults", None, "default_company") From 3372b7411dc2cab10859690b07099653470a293c Mon Sep 17 00:00:00 2001 From: Rohan Date: Thu, 5 Sep 2019 14:51:04 +0530 Subject: [PATCH 07/13] fix: error while trying to get directions (#18826) --- erpnext/stock/doctype/delivery_trip/delivery_trip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/delivery_trip/delivery_trip.py b/erpnext/stock/doctype/delivery_trip/delivery_trip.py index bc8c7493d5c..c5129500c42 100644 --- a/erpnext/stock/doctype/delivery_trip/delivery_trip.py +++ b/erpnext/stock/doctype/delivery_trip/delivery_trip.py @@ -340,7 +340,7 @@ def get_directions(route, optimize): try: directions = maps_client.directions(**directions_data) except Exception as e: - frappe.throw(_(e.message)) + frappe.throw(_(e)) return directions[0] if directions else False From 993521d365aff39c3b3dc5d36d024f23861db468 Mon Sep 17 00:00:00 2001 From: Rohan Date: Thu, 5 Sep 2019 14:53:48 +0530 Subject: [PATCH 08/13] fix: pull project from task (#18775) --- erpnext/projects/doctype/timesheet/timesheet.js | 12 +++++++++--- erpnext/projects/doctype/timesheet/timesheet.py | 5 +++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/erpnext/projects/doctype/timesheet/timesheet.js b/erpnext/projects/doctype/timesheet/timesheet.js index 8ffc10ee972..cce4f79cc18 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.js +++ b/erpnext/projects/doctype/timesheet/timesheet.js @@ -147,6 +147,15 @@ frappe.ui.form.on("Timesheet Detail", { calculate_time_and_amount(frm); }, + task: (frm, cdt, cdn) => { + let row = frm.selected_doc; + if (row.task) { + frappe.db.get_value("Task", row.task, "project", (r) => { + frappe.model.set_value(cdt, cdn, "project", r.project); + }); + } + }, + from_time: function(frm, cdt, cdn) { calculate_end_time(frm, cdt, cdn); }, @@ -200,9 +209,6 @@ frappe.ui.form.on("Timesheet Detail", { }, activity_type: function(frm, cdt, cdn) { - frm.script_manager.copy_from_first_row('time_logs', frm.selected_doc, - 'project'); - frappe.call({ method: "erpnext.projects.doctype.timesheet.timesheet.get_activity_cost", args: { diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py index 4b466d26301..19b9a45a7d2 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.py +++ b/erpnext/projects/doctype/timesheet/timesheet.py @@ -148,12 +148,17 @@ class Timesheet(Document): def validate_time_logs(self): for data in self.get('time_logs'): self.validate_overlap(data) + self.validate_task_project() def validate_overlap(self, data): settings = frappe.get_single('Projects Settings') self.validate_overlap_for("user", data, self.user, settings.ignore_user_time_overlap) self.validate_overlap_for("employee", data, self.employee, settings.ignore_employee_time_overlap) + def validate_task_project(self): + for log in self.time_logs: + log.project = log.project or frappe.db.get_value("Task", log.task, "project") + def validate_overlap_for(self, fieldname, args, value, ignore_validation=False): if not value or ignore_validation: return From fa4577d18a7660964975fca6d4865617188edfd5 Mon Sep 17 00:00:00 2001 From: Bassam Ramadan Date: Thu, 5 Sep 2019 11:25:58 +0200 Subject: [PATCH 09/13] Update journal_entry.js (#18922) adding a missed semicolom --- erpnext/accounts/doctype/journal_entry/journal_entry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js index a18883f519b..4d0d780f6dc 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.js +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js @@ -167,7 +167,7 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({ filters: { 'account': row.account } - } + }; }); me.frm.set_query("reference_name", "accounts", function(doc, cdt, cdn) { From bb8d9f2a579e4c767b6cd718adc06a92297fa3ab Mon Sep 17 00:00:00 2001 From: Ernesto Ruiz Date: Thu, 5 Sep 2019 03:34:42 -0600 Subject: [PATCH 10/13] fix: Add transtlation function to strings (#18806) * fix: Add transtlation function to strings fix: Add transtlation function to strings * fix: Add transtlation function to strings fix: Add transtlation function to strings --- .../payment_period_based_on_invoice_date.js | 4 ++-- .../support/page/support_analytics/support_analytics.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.js b/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.js index ca243944e9e..2c0090dcb20 100644 --- a/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.js +++ b/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.js @@ -27,8 +27,8 @@ frappe.query_reports["Payment Period Based On Invoice Date"] = { fieldname:"payment_type", label: __("Payment Type"), fieldtype: "Select", - options: "Incoming\nOutgoing", - default: "Incoming" + options: __("Incoming")+"\n"+__("Outgoing"), + default: __("Incoming") }, { "fieldname":"party_type", diff --git a/erpnext/support/page/support_analytics/support_analytics.js b/erpnext/support/page/support_analytics/support_analytics.js index 4db5c73b901..75f6a7f9db0 100644 --- a/erpnext/support/page/support_analytics/support_analytics.js +++ b/erpnext/support/page/support_analytics/support_analytics.js @@ -51,14 +51,14 @@ erpnext.SupportAnalytics = frappe.views.GridReportWithPlot.extend({ // add Opening, Closing, Totals rows // if filtered by account and / or voucher var me = this; - var total_tickets = {name:"All Tickets", "id": "all-tickets", + var total_tickets = {name:__("All Tickets"), "id": "all-tickets", checked:true}; - var days_to_close = {name:"Days to Close", "id":"days-to-close", + var days_to_close = {name:__("Days to Close"), "id":"days-to-close", checked:false}; var total_closed = {}; - var hours_to_close = {name:"Hours to Close", "id":"hours-to-close", + var hours_to_close = {name:__("Hours to Close"), "id":"hours-to-close", checked:false}; - var hours_to_respond = {name:"Hours to Respond", "id":"hours-to-respond", + var hours_to_respond = {name:__("Hours to Respond"), "id":"hours-to-respond", checked:false}; var total_responded = {}; From cf191c04834b6cb946784a4b4852990f21f276f1 Mon Sep 17 00:00:00 2001 From: Mohammad Noureldin Date: Thu, 5 Sep 2019 11:45:59 +0200 Subject: [PATCH 11/13] 18861: Updated .gitignore (#18862) --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 473a621326e..dcaf281b52a 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,5 @@ erpnext/docs/current __pycache__ *~ .vscode/ -node_modules/ \ No newline at end of file +node_modules/ +.idea/ \ No newline at end of file From 7fe0a2023a14a67f50fa8461519f29bf6e16b936 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 5 Sep 2019 16:43:06 +0530 Subject: [PATCH 12/13] fix: Print/PDF of AR/AP report after refactoring (#18930) --- .../accounts_receivable.html | 498 +++++++++--------- 1 file changed, 246 insertions(+), 252 deletions(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html index d00bcf643e7..791f3f8008b 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html @@ -1,275 +1,269 @@ + .print-format { + padding: 4mm; + font-size: 8.0pt !important; + } + .print-format td { + vertical-align:middle !important; + } + -

{%= __(report.report_name) %}

-

- {% if (filters.customer_name) { %} - {%= filters.customer_name %} - {% } else { %} - {%= filters.customer || filters.supplier %} - {% } %} -

-
- {% if (filters.tax_id) { %} - {%= __("Tax Id: ")%} {%= filters.tax_id %} +

{%= __(report.report_name) %}

+

+ {% if (filters.customer_name) { %} + {%= filters.customer_name %} + {% } else { %} + {%= filters.customer || filters.supplier %} {% } %} -

-
- {%= __(filters.ageing_based_on) %} - {%= __("Until") %} - {%= frappe.datetime.str_to_user(filters.report_date) %} -
+ +
+ {% if (filters.tax_id) { %} + {%= __("Tax Id: ")%} {%= filters.tax_id %} + {% } %} +
+
+ {%= __(filters.ageing_based_on) %} + {%= __("Until") %} + {%= frappe.datetime.str_to_user(filters.report_date) %} +
-
-
- {% if(filters.payment_terms) { %} - {%= __("Payment Terms") %}: {%= filters.payment_terms %} - {% } %} +
+
+ {% if(filters.payment_terms) { %} + {%= __("Payment Terms") %}: {%= filters.payment_terms %} + {% } %} +
+
+ {% if(filters.credit_limit) { %} + {%= __("Credit Limit") %}: {%= format_currency(filters.credit_limit) %} + {% } %} +
-
- {% if(filters.credit_limit) { %} - {%= __("Credit Limit") %}: {%= format_currency(filters.credit_limit) %} + + {% if(filters.show_future_payments) { %} + {% var balance_row = data.slice(-1).pop(); + var range1 = report.columns[11].label; + var range2 = report.columns[12].label; + var range3 = report.columns[13].label; + var range4 = report.columns[14].label; + var range5 = report.columns[15].label; + %} + {% if(balance_row) { %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
(Amount in {%= data[0]["currency"] || "" %})
{%= __(" ") %}{%= __(range1) %}{%= __(range2) %}{%= __(range3) %}{%= __(range4) %}{%= __(range5) %}{%= __("Total") %}
{%= __("Total Outstanding") %}{%= 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(flt(balance_row["outstanding"]), data[data.length-1]["currency"]) %} +
{%= __("Future Payments") %} + {%= format_currency(flt(balance_row[("future_amount")]), data[data.length-1]["currency"]) %} +
+ {% } %} {% } %} -
-
- -{% if(filters.show_future_payments) { %} - {% var balance_row = data.slice(-1).pop(); - var range1 = report.columns[11].label; - var range2 = report.columns[12].label; - var range3 = report.columns[13].label; - var range4 = report.columns[14].label; - var range5 = report.columns[15].label; - var range6 = report.columns[16].label; - %} - {% if(balance_row) { %} - - - - - - - - - - - - - - +
(Amount in {%= data[0][__("currency")] || "" %})
- - - - - - - - + {% if(report.report_name === "Accounts Receivable" || report.report_name === "Accounts Payable") { %} + + + + {% if(report.report_name === "Accounts Receivable" && filters.show_sales_person) { %} + + + {% } else { %} + + {% } %} + {% if(!filters.show_future_payments) { %} + + {% } %} + + {% if(!filters.show_future_payments) { %} + + + {% } %} + + {% if(filters.show_future_payments) { %} + {% if(report.report_name === "Accounts Receivable") { %} + + {% } %} + + + + {% } %} + {% } else { %} + + + + + + {% } %} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{%= __(" ") %}{%= __(range1) %}{%= __(range2) %}{%= __(range3) %}{%= __(range4) %}{%= __(range5) %}{%= __(range6) %}{%= __("Total") %}{%= __("Date") %}{%= __("Age (Days)") %}{%= __("Reference") %}{%= __("Sales Person") %}{%= __("Reference") %}{%= (filters.customer || filters.supplier) ? __("Remarks"): __("Party") %}{%= __("Invoiced Amount") %}{%= __("Paid Amount") %}{%= report.report_name === "Accounts Receivable" ? __('Credit Note') : __('Debit Note') %}{%= __("Outstanding Amount") %}{%= __("Customer LPO No.") %}{%= __("Future Payment Ref") %}{%= __("Future Payment Amount") %}{%= __("Remaining Balance") %}{%= (filters.customer || filters.supplier) ? __("Remarks"): __("Party") %}{%= __("Total Invoiced Amount") %}{%= __("Total Paid Amount") %}{%= report.report_name === "Accounts Receivable Summary" ? __('Credit Note Amount') : __('Debit Note Amount') %}{%= __("Total Outstanding Amount") %}
{%= __("Total Outstanding") %}{%= 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"]) %} -
{%= __("PDC/LC") %} - {%= format_currency(flt(balance_row[("pdc/lc_amount")]), data[data.length-1]["currency"]) %} -
- {% } %} -{% } %} - - - - {% if(report.report_name === "Accounts Receivable" || report.report_name === "Accounts Payable") { %} - - - - {% if(report.report_name === "Accounts Receivable" && filters.show_sales_person) { %} - - - {% } else { %} - - {% } %} - {% if(!filters.show_future_payments) { %} - - {% } %} - - {% if(!filters.show_future_payments) { %} - - - {% } %} - - {% if(filters.show_future_payments) { %} - {% if(report.report_name === "Accounts Receivable") { %} - - {% } %} - - - - {% } %} - {% } else { %} - - - - - - {% } %} - - - - {% for(var i=0, l=data.length; i - {% if(report.report_name === "Accounts Receivable" || report.report_name === "Accounts Payable") { %} - {% if(data[i][__("Customer")] || data[i][__("Supplier")]) { %} - - - - - {% if(report.report_name === "Accounts Receivable" && filters.show_sales_person) { %} - - {% } %} - - {% if(!filters.show_future_payments) { %} - + + + + {% if(report.report_name === "Accounts Receivable" && filters.show_sales_person) { %} + {% } %} -
- {% if data[i][__("Remarks")] %} - {%= __("Remarks") %}: - {%= data[i][__("Remarks")] %} - {% } %} -
- - {% } %} - - - {% if(!filters.show_future_payments) { %} - - - {% } %} - - - {% if(filters.show_future_payments) { %} - {% if(report.report_name === "Accounts Receivable") { %} - - {% } %} - - - - {% } %} - {% } else { %} - - {% if(!filters.show_future_payments) { %} - - {% } %} - {% if(report.report_name === "Accounts Receivable" && filters.show_sales_person) { %} - - {% } %} - - - - - {% if(!filters.show_future_payments) { %} - - - {% } %} - - - {% if(filters.show_future_payments) { %} - {% if(report.report_name === "Accounts Receivable") { %} - - {% } %} - - - - {% } %} - {% } %} - {% } else { %} - {% if(data[i][__("Customer")] || data[i][__("Supplier")]|| " ") { %} - {% if((data[i][__("Customer")] || data[i][__("Supplier")]) != __("'Total'")) { %} + {% if(!filters.show_future_payments) { %} + {% } %} + + + + {% if(!filters.show_future_payments) { %} + + + {% } %} + + + {% if(filters.show_future_payments) { %} + {% if(report.report_name === "Accounts Receivable") { %} + + {% } %} + + + + {% } %} {% } else { %} - + + {% if(!filters.show_future_payments) { %} + + {% } %} + {% if(report.report_name === "Accounts Receivable" && filters.show_sales_person) { %} + + {% } %} + + + + + {% if(!filters.show_future_payments) { %} + + + {% } %} + + + {% if(filters.show_future_payments) { %} + {% if(report.report_name === "Accounts Receivable") { %} + + {% } %} + + + + {% } %} + {% } %} + {% } else { %} + {% if(data[i]["party"]|| " ") { %} + {% if((data[i]["party"]) != __("'Total'")) { %} + + {% } else { %} + + {% } %} + + + + {% } %} - - - - {% } %} + {% } %} - - {% } %} - -
{%= __("Date") %}{%= __("Age (Days)") %}{%= __("Reference") %}{%= __("Sales Person") %}{%= __("Reference") %}{%= (filters.customer || filters.supplier) ? __("Remarks"): __("Party") %}{%= __("Invoiced Amount") %}{%= __("Paid Amount") %}{%= report.report_name === "Accounts Receivable" ? __('Credit Note') : __('Debit Note') %}{%= __("Outstanding Amount") %}{%= __("Customer LPO No.") %}{%= __("PDC/LC Ref") %}{%= __("PDC/LC Amount") %}{%= __("Remaining Balance") %}{%= (filters.customer || filters.supplier) ? __("Remarks"): __("Party") %}{%= __("Total Invoiced Amount") %}{%= __("Total Paid Amount") %}{%= report.report_name === "Accounts Receivable Summary" ? __('Credit Note Amount') : __('Debit Note Amount') %}{%= __("Total Outstanding Amount") %}
{%= frappe.datetime.str_to_user(data[i]["posting_date"]) %}{%= data[i][__("Age (Days)")] %} - {% if(!filters.show_future_payments) { %} - {%= data[i]["voucher_type"] %} -
- {% } %} - {%= data[i]["voucher_no"] %} -
{%= data[i]["sales_person"] %} - {% if(!(filters.customer || filters.supplier)) { %} - {%= data[i][__("Customer")] || data[i][__("Supplier")] %} - {% if(data[i][__("Customer Name")] && data[i][__("Customer Name")] != data[i][__("Customer")]) { %} -
{%= data[i][__("Customer Name")] %} - {% } else if(data[i][__("Supplier Name")] != data[i][__("Supplier")]) { %} -
{%= data[i][__("Supplier Name")] %} + {% for(var i=0, l=data.length; i + {% if(report.report_name === "Accounts Receivable" || report.report_name === "Accounts Payable") { %} + {% if(data[i]["party"]) { %} +
{%= frappe.datetime.str_to_user(data[i]["posting_date"]) %}{%= data[i]["age"] %} + {% if(!filters.show_future_payments) { %} + {%= data[i]["voucher_type"] %} +
{% } %} + {%= data[i]["voucher_no"] %} +
{%= data[i]["sales_person"] %} - {%= format_currency(data[i]["invoiced_amount"], data[i]["currency"]) %} - {%= format_currency(data[i]["paid_amount"], data[i]["currency"]) %} - {%= report.report_name === "Accounts Receivable" ? format_currency(data[i]["credit_note"], data[i]["currency"]) : format_currency(data[i]["debit_note"], data[i]["currency"]) %} - {%= format_currency(data[i]["outstanding_amount"], data[i]["currency"]) %} - {%= data[i]["po_no"] %}{%= data[i][("pdc/lc_ref")] %}{%= format_currency(data[i][("pdc/lc_amount")], data[i]["currency"]) %}{%= format_currency(data[i][("remaining_balance")], data[i]["currency"]) %}{%= __("Total") %} - {%= format_currency(data[i]["invoiced_amount"], data[i]["currency"] ) %} - {%= format_currency(data[i]["paid_amount"], data[i]["currency"]) %}{%= report.report_name === "Accounts Receivable" ? format_currency(data[i]["credit_note"], data[i]["currency"]) : format_currency(data[i]["debit_note"], data[i]["currency"]) %} - {%= format_currency(data[i]["outstanding_amount"], data[i]["currency"]) %} - {%= data[i][__("Customer LPO")] %}{%= data[i][("pdc/lc_ref")] %}{%= format_currency(data[i][("pdc/lc_amount")], data[i]["currency"]) %}{%= format_currency(data[i][("remaining_balance")], data[i]["currency"]) %} {% if(!(filters.customer || filters.supplier)) { %} - {%= data[i][__("Customer")] || data[i][__("Supplier")] %} - {% if(data[i][__("Customer Name")] && data[i][__("Customer Name")] != data[i][__("Customer")]) { %} -
{%= data[i][__("Customer Name")] %} - {% } else if(data[i][__("Supplier Name")] != data[i][__("Supplier")]) { %} -
{%= data[i][__("Supplier Name")] %} + {%= data[i]["party"] %} + {% if(data[i]["customer_name"] && data[i]["customer_name"] != data[i]["party"]) { %} +
{%= data[i]["customer_name"] %} + {% } else if(data[i]["supplier_name"] != data[i]["party"]) { %} +
{%= data[i]["supplier_name"] %} {% } %} {% } %} -
{%= __("Remarks") %}: - {%= data[i][__("Remarks")] %} +
+ {% if data[i]["remarks"] %} + {%= __("Remarks") %}: + {%= data[i]["remarks"] %} + {% } %} +
+ {%= format_currency(data[i]["invoiced"], data[i]["currency"]) %} + {%= format_currency(data[i]["paid"], data[i]["currency"]) %} + {%= format_currency(data[i]["credit_note"], data[i]["currency"]) %} + {%= format_currency(data[i]["outstanding"], data[i]["currency"]) %} + {%= data[i]["po_no"] %}{%= data[i]["future_ref"] %}{%= format_currency(data[i]["future_amount"], data[i]["currency"]) %}{%= format_currency(data[i]["remaining_balance"], data[i]["currency"]) %}{%= __("Total") %}{%= __("Total") %} + {%= format_currency(data[i]["invoiced"], data[i]["currency"] ) %} + {%= format_currency(data[i]["paid"], data[i]["currency"]) %}{%= format_currency(data[i]["credit_note"], data[i]["currency"]) %} + {%= format_currency(data[i]["outstanding"], data[i]["currency"]) %} + {%= data[i]["po_no"] %}{%= data[i]["future_ref"] %}{%= format_currency(data[i]["future_amount"], data[i]["currency"]) %}{%= format_currency(data[i]["remaining_balance"], data[i]["currency"]) %} + {% if(!(filters.customer || filters.supplier)) { %} + {%= data[i]["party"] %} + {% if(data[i]["customer_name"] && data[i]["customer_name"] != data[i]["party"]) { %} +
{%= data[i]["customer_name"] %} + {% } else if(data[i]["supplier_name"] != data[i]["party"]) { %} +
{%= data[i]["supplier_name"] %} + {% } %} + {% } %} +
{%= __("Remarks") %}: + {%= data[i]["remarks"] %} +
{%= __("Total") %}{%= format_currency(data[i]["invoiced"], data[i]["currency"]) %}{%= format_currency(data[i]["paid"], data[i]["currency"]) %}{%= format_currency(data[i]["credit_note"], data[i]["currency"]) %}{%= format_currency(data[i]["outstanding"], 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"]) %}
-

{{ __("Printed On ") }}{%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}

+ + +

{{ __("Printed On ") }}{%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}

From 912cf9d555d2b6a306c1d0b4b70411199cd9695a Mon Sep 17 00:00:00 2001 From: Sahil Khan Date: Thu, 5 Sep 2019 17:45:11 +0550 Subject: [PATCH 13/13] bumped to version 11.1.60 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 3d44af8fb28..425a9b07114 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -5,7 +5,7 @@ import frappe from erpnext.hooks import regional_overrides from frappe.utils import getdate -__version__ = '11.1.59' +__version__ = '11.1.60' def get_default_company(user=None): '''Get default company for user'''