mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 03:39:11 +00:00
Merge pull request #46016 from frappe/mergify/bp/version-15-hotfix/pr-45974
fix(pos profile): check company while validating mandatory accounting dimension (backport #45974)
This commit is contained in:
@@ -76,7 +76,11 @@ class POSProfile(Document):
|
|||||||
def validate_accounting_dimensions(self):
|
def validate_accounting_dimensions(self):
|
||||||
acc_dims = get_checks_for_pl_and_bs_accounts()
|
acc_dims = get_checks_for_pl_and_bs_accounts()
|
||||||
for acc_dim in acc_dims:
|
for acc_dim in acc_dims:
|
||||||
if not self.get(acc_dim.fieldname) and (acc_dim.mandatory_for_pl or acc_dim.mandatory_for_bs):
|
if (
|
||||||
|
self.company == acc_dim.company
|
||||||
|
and not self.get(acc_dim.fieldname)
|
||||||
|
and (acc_dim.mandatory_for_pl or acc_dim.mandatory_for_bs)
|
||||||
|
):
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_(
|
_(
|
||||||
"{0} is a mandatory Accounting Dimension. <br>"
|
"{0} is a mandatory Accounting Dimension. <br>"
|
||||||
|
|||||||
Reference in New Issue
Block a user