diff --git a/erpnext/__init__.py b/erpnext/__init__.py index ef9b89c43b7..fd32dd45e39 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -2,7 +2,7 @@ from __future__ import unicode_literals import frappe -__version__ = '8.4.2' +__version__ = '8.4.3' def get_default_company(user=None): '''Get default company for user''' diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js index 63832fa2c90..eb0f474e082 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js @@ -291,7 +291,7 @@ frappe.ui.form.on('Payment Entry', { set_account_currency_and_balance: function(frm, account, currency_field, balance_field, callback_function) { - if (frm.doc.posting_date) { + if (frm.doc.posting_date && account) { frappe.call({ method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_account_details", args: { diff --git a/erpnext/hr/doctype/expense_claim/expense_claim.js b/erpnext/hr/doctype/expense_claim/expense_claim.js index 4ce91c4bf9b..2a94d05495e 100644 --- a/erpnext/hr/doctype/expense_claim/expense_claim.js +++ b/erpnext/hr/doctype/expense_claim/expense_claim.js @@ -27,6 +27,10 @@ erpnext.hr.ExpenseClaimController = frappe.ui.form.Controller.extend({ return; } + if(!d.expense_type) { + return; + } + return frappe.call({ method: "erpnext.hr.doctype.expense_claim.expense_claim.get_expense_claim_account", args: { diff --git a/erpnext/patches/v7_0/fix_nonwarehouse_ledger_gl_entries_for_transactions.py b/erpnext/patches/v7_0/fix_nonwarehouse_ledger_gl_entries_for_transactions.py index d0e816a1a27..2b92b17f118 100644 --- a/erpnext/patches/v7_0/fix_nonwarehouse_ledger_gl_entries_for_transactions.py +++ b/erpnext/patches/v7_0/fix_nonwarehouse_ledger_gl_entries_for_transactions.py @@ -7,10 +7,11 @@ import frappe, erpnext def execute(): frappe.reload_doctype("Account") - warehouses = frappe.db.sql_list("""select name, company from tabAccount + warehouses = frappe.db.sql("""select name, company from tabAccount where account_type = 'Stock' and is_group = 0 - and (warehouse is null or warehouse = '')""", as_dict) + and (warehouse is null or warehouse = '')""", as_dict=1) warehouses = [d.name for d in warehouses if erpnext.is_perpetual_inventory_enabled(d.company)] + if len(warehouses) > 0: warehouses = set_warehouse_for_stock_account(warehouses) if not warehouses: diff --git a/erpnext/public/js/controllers/accounts.js b/erpnext/public/js/controllers/accounts.js index 19ef162f3df..abd5566243f 100644 --- a/erpnext/public/js/controllers/accounts.js +++ b/erpnext/public/js/controllers/accounts.js @@ -94,6 +94,10 @@ var get_payment_mode_account = function(frm, mode_of_payment, callback) { frappe.throw(__("Please select the Company first")); } + if(!mode_of_payment) { + return; + } + return frappe.call({ method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.get_bank_cash_account", args: {