Skip to content

Commit

Permalink
feat: Period-wise closing entries for TB (#39712)
Browse files Browse the repository at this point in the history
(cherry picked from commit 6e6c818)
  • Loading branch information
deepeshgarg007 authored and mergify[bot] committed Feb 5, 2024
1 parent 986273b commit aa6cfe1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions erpnext/accounts/report/trial_balance/trial_balance.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down
4 changes: 2 additions & 2 deletions erpnext/accounts/report/trial_balance/trial_balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit aa6cfe1

Please sign in to comment.