fix: Handle multi-company in patch (#36127)
fix: Handle multi-compnay in patch
This commit is contained in:
parent
3b884efca9
commit
ac9ad8ec36
@ -50,6 +50,7 @@ def execute():
|
|||||||
"voucher_no": ["!=", pcv.name],
|
"voucher_no": ["!=", pcv.name],
|
||||||
"posting_date": ["between", [pcv_doc.year_start_date, pcv.posting_date]],
|
"posting_date": ["between", [pcv_doc.year_start_date, pcv.posting_date]],
|
||||||
"is_opening": "No",
|
"is_opening": "No",
|
||||||
|
"company": company,
|
||||||
},
|
},
|
||||||
fields=["*"],
|
fields=["*"],
|
||||||
)
|
)
|
||||||
@ -58,7 +59,7 @@ def execute():
|
|||||||
# add opening entries only for the first pcv
|
# add opening entries only for the first pcv
|
||||||
closing_entries += frappe.db.get_all(
|
closing_entries += frappe.db.get_all(
|
||||||
"GL Entry",
|
"GL Entry",
|
||||||
filters={"is_cancelled": 0, "is_opening": "Yes"},
|
filters={"is_cancelled": 0, "is_opening": "Yes", "company": company},
|
||||||
fields=["*"],
|
fields=["*"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user