Merge pull request #26277 from deepeshgarg007/multi-company-deferred-revenue

fix: Auto process deferred accounting for multi-company setup
This commit is contained in:
Deepesh Garg 2021-07-04 20:32:22 +05:30 committed by GitHub
commit ea5b7d38bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -301,9 +301,13 @@ def process_deferred_accounting(posting_date=None):
start_date = add_months(today(), -1)
end_date = add_days(today(), -1)
companies = frappe.get_all('Company')
for company in companies:
for record_type in ('Income', 'Expense'):
doc = frappe.get_doc(dict(
doctype='Process Deferred Accounting',
company=company.name,
posting_date=posting_date,
start_date=start_date,
end_date=end_date,