diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 11bfc5e8dde..c14b8528f38 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -29,7 +29,10 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying. this.frm.set_query("expense_account", "items", function () { return { query: "erpnext.controllers.queries.get_expense_account", - filters: { company: doc.company }, + filters: { + company: doc.company, + disabled: 0, + }, }; }); } diff --git a/erpnext/accounts/report/utils.py b/erpnext/accounts/report/utils.py index 92c305e6cd8..337beaa701b 100644 --- a/erpnext/accounts/report/utils.py +++ b/erpnext/accounts/report/utils.py @@ -118,7 +118,7 @@ def convert_to_presentation_currency(gl_entries, currency_info, filters=None): len(account_currencies) == 1 and account_currency == presentation_currency and not exchange_gain_or_loss - ) and not filters.get("show_amount_in_company_currency"): + ) and not (filters and filters.get("show_amount_in_company_currency")): entry["debit"] = debit_in_account_currency entry["credit"] = credit_in_account_currency else: diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index be965e41b3e..1e0e01211e6 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -646,7 +646,7 @@ def get_expense_account(doctype, txt, searchfield, start, page_len, filters): where (tabAccount.report_type = "Profit and Loss" or tabAccount.account_type in ("Expense Account", "Fixed Asset", "Temporary", "Asset Received But Not Billed", "Capital Work in Progress")) and tabAccount.is_group=0 - and tabAccount.docstatus!=2 + and tabAccount.disabled = 0 and tabAccount.{searchfield} LIKE %(txt)s {condition} {get_match_cond(doctype)}""", {"company": filters.get("company", ""), "txt": "%" + txt + "%"}, diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json index fabeb74462f..e2eec2e5085 100755 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json @@ -1077,7 +1077,8 @@ "no_copy": 1, "options": "Delivery Note", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "search_index": 1 }, { "fieldname": "scan_barcode", @@ -1242,7 +1243,7 @@ "idx": 261, "is_submittable": 1, "links": [], - "modified": "2024-11-13 16:55:14.129055", + "modified": "2025-08-06 16:41:02.690658", "modified_by": "Administrator", "module": "Stock", "name": "Purchase Receipt",