mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 11:39:18 +00:00
fix: Better validation msg for difference account in Stock Entry (#19400)
* fix: Better validation msg for difference account * fix: Make primary info bold
This commit is contained in:
committed by
Anurag Mishra
parent
83b58352ce
commit
9942fcc8cb
@@ -241,7 +241,9 @@ class StockEntry(StockController):
|
|||||||
|
|
||||||
for d in self.get("items"):
|
for d in self.get("items"):
|
||||||
if not d.expense_account:
|
if not d.expense_account:
|
||||||
frappe.throw(_("Please enter Difference Account"))
|
frappe.throw(_("Please enter <b>Difference Account</b> or set default <b>Stock Adjustment Account</b> for company {0}")
|
||||||
|
.format(frappe.bold(self.company)))
|
||||||
|
|
||||||
elif self.is_opening == "Yes" and frappe.db.get_value("Account", d.expense_account, "report_type") == "Profit and Loss":
|
elif self.is_opening == "Yes" and frappe.db.get_value("Account", d.expense_account, "report_type") == "Profit and Loss":
|
||||||
frappe.throw(_("Difference Account must be a Asset/Liability type account, since this Stock Entry is an Opening Entry"), OpeningEntryAccountError)
|
frappe.throw(_("Difference Account must be a Asset/Liability type account, since this Stock Entry is an Opening Entry"), OpeningEntryAccountError)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user