fix: expense account error message in DN (#21851) (#21856)

Changed error message if expense account not set for item in Delivery Note.
Earlier: Expense or Difference account is mandatory for Item IT - 6 as it impacts overall stock value
After fix: Expense Account not set for Item IT - 6. Please set an Expense Account for the item in the Items table

(cherry picked from commit 1763d3e706)

Co-authored-by: Michelle Alva <50285544+michellealva@users.noreply.github.com>
This commit is contained in:
mergify[bot]
2020-05-22 11:06:19 +05:30
committed by GitHub
parent 7522e598db
commit 44d6ce49b5

View File

@@ -224,7 +224,7 @@ class StockController(AccountsController):
def check_expense_account(self, item):
if not item.get("expense_account"):
frappe.throw(_("Expense or Difference account is mandatory for Item {0} as it impacts overall stock value").format(item.item_code))
frappe.throw(_("Expense Account not set for Item {0}. Please set an Expense Account for the item in the Items table").format(item.item_code))
else:
is_expense_account = frappe.db.get_value("Account",