fix: Patch for posting closing balances (#35037)
This commit is contained in:
parent
f3b3dabb9a
commit
64be694087
@ -26,7 +26,15 @@ def execute():
|
||||
pcv_doc.year_start_date = get_fiscal_year(
|
||||
pcv.posting_date, pcv.fiscal_year, company=pcv.company
|
||||
)[1]
|
||||
gl_entries = pcv_doc.get_gl_entries()
|
||||
|
||||
gl_entries = frappe.db.get_all(
|
||||
"GL Entry", filters={"voucher_no": pcv.name, "is_cancelled": 0}, fields=["*"]
|
||||
)
|
||||
for entry in gl_entries:
|
||||
entry["is_period_closing_voucher_entry"] = 1
|
||||
entry["closing_date"] = pcv_doc.posting_date
|
||||
entry["period_closing_voucher"] = pcv_doc.name
|
||||
|
||||
closing_entries = pcv_doc.get_grouped_gl_entries(get_opening_entries=get_opening_entries)
|
||||
make_closing_entries(gl_entries + closing_entries, voucher_name=pcv.name)
|
||||
company_wise_order[pcv.company].append(pcv.posting_date)
|
||||
|
Loading…
x
Reference in New Issue
Block a user