Merge pull request #22231 from deepeshgarg007/financila_satement_immutable
fix: Handle cancelled entries in financial statements
This commit is contained in:
commit
5f4330621c
@ -405,6 +405,7 @@ def set_gl_entries_by_account(
|
|||||||
FROM `tabDistributed Cost Center`
|
FROM `tabDistributed Cost Center`
|
||||||
WHERE cost_center IN %(cost_center)s
|
WHERE cost_center IN %(cost_center)s
|
||||||
AND parent NOT IN %(cost_center)s
|
AND parent NOT IN %(cost_center)s
|
||||||
|
AND is_cancelled = 0
|
||||||
GROUP BY parent
|
GROUP BY parent
|
||||||
) as DCC_allocation
|
) as DCC_allocation
|
||||||
WHERE company=%(company)s
|
WHERE company=%(company)s
|
||||||
@ -417,6 +418,7 @@ def set_gl_entries_by_account(
|
|||||||
where company=%(company)s
|
where company=%(company)s
|
||||||
{additional_conditions}
|
{additional_conditions}
|
||||||
and posting_date <= %(to_date)s
|
and posting_date <= %(to_date)s
|
||||||
|
and is_cancelled = 0
|
||||||
{distributed_cost_center_query}
|
{distributed_cost_center_query}
|
||||||
order by account, posting_date""".format(
|
order by account, posting_date""".format(
|
||||||
additional_conditions=additional_conditions,
|
additional_conditions=additional_conditions,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user