fix(pos profile): check company while validating mandatory accounting dimension (#45974)

This commit is contained in:
Venkatesh
2025-02-19 15:39:01 +05:30
committed by GitHub
parent 24394765a6
commit 17a2f44290

View File

@@ -78,7 +78,11 @@ class POSProfile(Document):
def validate_accounting_dimensions(self):
acc_dims = get_checks_for_pl_and_bs_accounts()
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(
_(
"{0} is a mandatory Accounting Dimension. <br>"