mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 07:29:22 +00:00
Merge pull request #42733 from ruthra-kumar/default_ignore_in_soa
refactor: add a new filter flag in Process Statement of Accounts
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
"cost_center",
|
"cost_center",
|
||||||
"territory",
|
"territory",
|
||||||
"ignore_exchange_rate_revaluation_journals",
|
"ignore_exchange_rate_revaluation_journals",
|
||||||
|
"ignore_cr_dr_notes",
|
||||||
"column_break_14",
|
"column_break_14",
|
||||||
"to_date",
|
"to_date",
|
||||||
"finance_book",
|
"finance_book",
|
||||||
@@ -383,10 +384,16 @@
|
|||||||
"fieldname": "ignore_exchange_rate_revaluation_journals",
|
"fieldname": "ignore_exchange_rate_revaluation_journals",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"label": "Ignore Exchange Rate Revaluation Journals"
|
"label": "Ignore Exchange Rate Revaluation Journals"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"fieldname": "ignore_cr_dr_notes",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Ignore System Generated Credit / Debit Notes"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2024-03-27 13:10:19.075913",
|
"modified": "2024-08-13 10:41:18.381165",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Process Statement Of Accounts",
|
"name": "Process Statement Of Accounts",
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ class ProcessStatementOfAccounts(Document):
|
|||||||
frequency: DF.Literal["Weekly", "Monthly", "Quarterly"]
|
frequency: DF.Literal["Weekly", "Monthly", "Quarterly"]
|
||||||
from_date: DF.Date | None
|
from_date: DF.Date | None
|
||||||
group_by: DF.Literal["", "Group by Voucher", "Group by Voucher (Consolidated)"]
|
group_by: DF.Literal["", "Group by Voucher", "Group by Voucher (Consolidated)"]
|
||||||
|
ignore_cr_dr_notes: DF.Check
|
||||||
ignore_exchange_rate_revaluation_journals: DF.Check
|
ignore_exchange_rate_revaluation_journals: DF.Check
|
||||||
include_ageing: DF.Check
|
include_ageing: DF.Check
|
||||||
include_break: DF.Check
|
include_break: DF.Check
|
||||||
@@ -133,6 +134,9 @@ def get_statement_dict(doc, get_statement_dict=False):
|
|||||||
if doc.ignore_exchange_rate_revaluation_journals:
|
if doc.ignore_exchange_rate_revaluation_journals:
|
||||||
filters.update({"ignore_err": True})
|
filters.update({"ignore_err": True})
|
||||||
|
|
||||||
|
if doc.ignore_cr_dr_notes:
|
||||||
|
filters.update({"ignore_cr_dr_notes": True})
|
||||||
|
|
||||||
if doc.report == "General Ledger":
|
if doc.report == "General Ledger":
|
||||||
filters.update(get_gl_filters(doc, entry, tax_id, presentation_currency))
|
filters.update(get_gl_filters(doc, entry, tax_id, presentation_currency))
|
||||||
col, res = get_soa(filters)
|
col, res = get_soa(filters)
|
||||||
|
|||||||
@@ -248,7 +248,10 @@ def get_conditions(filters):
|
|||||||
as_list=True,
|
as_list=True,
|
||||||
)
|
)
|
||||||
if system_generated_cr_dr_journals:
|
if system_generated_cr_dr_journals:
|
||||||
filters.update({"voucher_no_not_in": [x[0] for x in system_generated_cr_dr_journals]})
|
vouchers_to_ignore = (filters.get("voucher_no_not_in") or []) + [
|
||||||
|
x[0] for x in system_generated_cr_dr_journals
|
||||||
|
]
|
||||||
|
filters.update({"voucher_no_not_in": vouchers_to_ignore})
|
||||||
|
|
||||||
if filters.get("voucher_no_not_in"):
|
if filters.get("voucher_no_not_in"):
|
||||||
conditions.append("voucher_no not in %(voucher_no_not_in)s")
|
conditions.append("voucher_no not in %(voucher_no_not_in)s")
|
||||||
|
|||||||
Reference in New Issue
Block a user