diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 1d30f866bdf..7c3bf4955c3 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.36' +__version__ = '11.1.37' def get_default_company(user=None): '''Get default company for user''' 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) diff --git a/erpnext/accounts/doctype/sales_invoice/regional/india.js b/erpnext/accounts/doctype/sales_invoice/regional/india.js index 5fec3ba6d32..c8305e325f6 100644 --- a/erpnext/accounts/doctype/sales_invoice/regional/india.js +++ b/erpnext/accounts/doctype/sales_invoice/regional/india.js @@ -21,7 +21,7 @@ frappe.ui.form.on("Sales Invoice", { if(frm.doc.docstatus == 1 && !frm.is_dirty() && !frm.doc.is_return && !frm.doc.ewaybill) { - frm.add_custom_button('Generate e-Way Bill JSON', () => { + frm.add_custom_button('e-Way Bill JSON', () => { var w = window.open( frappe.urllib.get_full_url( "/api/method/erpnext.regional.india.utils.generate_ewb_json?" diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html index d7aa0c0d191..192b6d7be38 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html @@ -46,6 +46,8 @@ 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) { %}
| {%= __(range2) %} | {%= __(range3) %} | {%= __(range4) %} | +{%= __(range5) %} | +{%= __(range6) %} | {%= __("Total") %} | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {%= __("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"]) %} | {%= frappe.datetime.str_to_user(data[i].posting_date) %} | diff --git a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py index e8b19b40249..5d3253a552d 100644 --- a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py +++ b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py @@ -102,7 +102,9 @@ def get_conditions(filters): ("customer", " and `tabSales Invoice`.customer = %(customer)s"), ("item_code", " and `tabSales Invoice Item`.item_code = %(item_code)s"), ("from_date", " and `tabSales Invoice`.posting_date>=%(from_date)s"), - ("to_date", " and `tabSales Invoice`.posting_date<=%(to_date)s")): + ("to_date", " and `tabSales Invoice`.posting_date<=%(to_date)s"), + ("company_gstin", " and `tabSales Invoice`.company_gstin = %(company_gstin)s"), + ("invoice_type", " and `tabSales Invoice`.invoice_type = %(invoice_type)s")): if filters.get(opts[0]): conditions += opts[1] diff --git a/erpnext/healthcare/doctype/lab_test/lab_test.py b/erpnext/healthcare/doctype/lab_test/lab_test.py index b0bd4c6a680..86094896154 100644 --- a/erpnext/healthcare/doctype/lab_test/lab_test.py +++ b/erpnext/healthcare/doctype/lab_test/lab_test.py @@ -300,11 +300,15 @@ def insert_lab_test_to_medical_record(doc): elif doc.special_test_items: item = doc.special_test_items[0] - table_row = item.lab_test_particulars +" "+ item.result_value + + if item.lab_test_particulars and item.result_value: + table_row = item.lab_test_particulars +" "+ item.result_value elif doc.sensitivity_test_items: item = doc.sensitivity_test_items[0] - table_row = item.antibiotic +" "+ item.antibiotic_sensitivity + + if item.antibiotic and item.antibiotic_sensitivity: + table_row = item.antibiotic +" "+ item.antibiotic_sensitivity if table_row: subject += "