mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
Merge pull request #22644 from deepeshgarg007/dcc_query
fix: Distributed cost center query
This commit is contained in:
@@ -405,12 +405,12 @@ 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
|
||||||
{additional_conditions}
|
{additional_conditions}
|
||||||
AND posting_date <= %(to_date)s
|
AND posting_date <= %(to_date)s
|
||||||
|
AND is_cancelled = 0
|
||||||
AND cost_center = DCC_allocation.parent
|
AND cost_center = DCC_allocation.parent
|
||||||
""".format(additional_conditions=additional_conditions.replace("and cost_center in %(cost_center)s ", ''))
|
""".format(additional_conditions=additional_conditions.replace("and cost_center in %(cost_center)s ", ''))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user