fix: Handle multi-company in patch (#36127)

* fix: Handle multi-company in patch (#36127)

fix: Handle multi-compnay in patch
(cherry picked from commit ac9ad8ec36)

* chore: re trigger patch

---------

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
This commit is contained in:
mergify[bot]
2023-07-14 15:59:57 +05:30
committed by GitHub
parent 42c93a1f00
commit e7f57542ab
2 changed files with 3 additions and 2 deletions

View File

@@ -336,4 +336,4 @@ erpnext.patches.v14_0.cleanup_workspaces
erpnext.patches.v14_0.enable_allow_existing_serial_no
erpnext.patches.v14_0.set_report_in_process_SOA
erpnext.patches.v14_0.create_accounting_dimensions_for_closing_balance
erpnext.patches.v14_0.update_closing_balances #14-07-2023
erpnext.patches.v14_0.update_closing_balances #15-07-2023

View File

@@ -50,6 +50,7 @@ def execute():
"voucher_no": ["!=", pcv.name],
"posting_date": ["between", [pcv_doc.year_start_date, pcv.posting_date]],
"is_opening": "No",
"company": company,
},
fields=["*"],
)
@@ -58,7 +59,7 @@ def execute():
# add opening entries only for the first pcv
closing_entries += frappe.db.get_all(
"GL Entry",
filters={"is_cancelled": 0, "is_opening": "Yes"},
filters={"is_cancelled": 0, "is_opening": "Yes", "company": company},
fields=["*"],
)