mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
fix: Patch for posting closing balances (#35037)
This commit is contained in:
@@ -26,7 +26,15 @@ def execute():
|
|||||||
pcv_doc.year_start_date = get_fiscal_year(
|
pcv_doc.year_start_date = get_fiscal_year(
|
||||||
pcv.posting_date, pcv.fiscal_year, company=pcv.company
|
pcv.posting_date, pcv.fiscal_year, company=pcv.company
|
||||||
)[1]
|
)[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)
|
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)
|
make_closing_entries(gl_entries + closing_entries, voucher_name=pcv.name)
|
||||||
company_wise_order[pcv.company].append(pcv.posting_date)
|
company_wise_order[pcv.company].append(pcv.posting_date)
|
||||||
|
|||||||
Reference in New Issue
Block a user