mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 22:49:19 +00:00
fix: Auto process deferred accounting for multi-company setup
This commit is contained in:
@@ -301,9 +301,13 @@ def process_deferred_accounting(posting_date=None):
|
|||||||
start_date = add_months(today(), -1)
|
start_date = add_months(today(), -1)
|
||||||
end_date = add_days(today(), -1)
|
end_date = add_days(today(), -1)
|
||||||
|
|
||||||
|
companies = frappe.get_all('Company')
|
||||||
|
|
||||||
|
for company in companies:
|
||||||
for record_type in ('Income', 'Expense'):
|
for record_type in ('Income', 'Expense'):
|
||||||
doc = frappe.get_doc(dict(
|
doc = frappe.get_doc(dict(
|
||||||
doctype='Process Deferred Accounting',
|
doctype='Process Deferred Accounting',
|
||||||
|
company=company.name,
|
||||||
posting_date=posting_date,
|
posting_date=posting_date,
|
||||||
start_date=start_date,
|
start_date=start_date,
|
||||||
end_date=end_date,
|
end_date=end_date,
|
||||||
|
|||||||
Reference in New Issue
Block a user