feat: Period-wise closing entries for TB (#39712)
feat: Period-wise closing entries for TB (#39712) (cherry picked from commit 6e6c818084ee3fbbb2d44a58acb5c78c9f5b61ac) 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()
|
"options": erpnext.get_presentation_currency_list()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "with_period_closing_entry",
|
"fieldname": "with_period_closing_entry_for_opening",
|
||||||
"label": __("Period Closing Entry"),
|
"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",
|
"fieldtype": "Check",
|
||||||
"default": 1
|
"default": 1
|
||||||
},
|
},
|
||||||
|
@ -116,7 +116,7 @@ def get_data(filters):
|
|||||||
max_rgt,
|
max_rgt,
|
||||||
filters,
|
filters,
|
||||||
gl_entries_by_account,
|
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,
|
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)
|
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":
|
if doctype == "Account Closing Balance":
|
||||||
opening_balance = opening_balance.where(closing_balance.is_period_closing_voucher_entry == 0)
|
opening_balance = opening_balance.where(closing_balance.is_period_closing_voucher_entry == 0)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user