feat: Period-wise closing entries for TB (#39712)
feat: Period-wise closing entries for TB (#39712)
(cherry picked from commit 6e6c818084
)
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
This commit is contained in:
parent
986273b6d3
commit
1822325f34
@ -78,8 +78,14 @@ frappe.query_reports["Trial Balance"] = {
|
||||
"options": erpnext.get_presentation_currency_list()
|
||||
},
|
||||
{
|
||||
"fieldname": "with_period_closing_entry",
|
||||
"label": __("Period Closing Entry"),
|
||||
"fieldname": "with_period_closing_entry_for_opening",
|
||||
"label": __("With Period Closing Entry For Opening Balances"),
|
||||
"fieldtype": "Check",
|
||||
"default": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "with_period_closing_entry_for_current_period",
|
||||
"label": __("Period Closing Entry For Current Period"),
|
||||
"fieldtype": "Check",
|
||||
"default": 1
|
||||
},
|
||||
|
@ -116,7 +116,7 @@ def get_data(filters):
|
||||
max_rgt,
|
||||
filters,
|
||||
gl_entries_by_account,
|
||||
ignore_closing_entries=not flt(filters.with_period_closing_entry),
|
||||
ignore_closing_entries=not flt(filters.with_period_closing_entry_for_current_period),
|
||||
ignore_opening_entries=True,
|
||||
)
|
||||
|
||||
@ -249,7 +249,7 @@ def get_opening_balance(
|
||||
):
|
||||
opening_balance = opening_balance.where(closing_balance.posting_date >= filters.year_start_date)
|
||||
|
||||
if not flt(filters.with_period_closing_entry):
|
||||
if not flt(filters.with_period_closing_entry_for_opening):
|
||||
if doctype == "Account Closing Balance":
|
||||
opening_balance = opening_balance.where(closing_balance.is_period_closing_voucher_entry == 0)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user