brotherton-erpnext/erpnext/patches/v13_0/update_deferred_settings.py
Deepesh Garg 7cc1cf36ca
feat: More controlled deferred revenue booking (#21671)
* feat: More controller deferred revenue booking

* fix: Query for last gl entry

* fix: Accounting Dimension for Deferred entries

* fix: Deferred revenue booking against paid invoices

* fix: Don not update outstanding on Deferred Entry submission

* fix: Naming fixes

* feat: Deferred revenue/expense booking based on months

* fix: Test case for fix monthly deferred revenue booking

* fix: Typo

* fix: Patch to update settings

* fix: Test case to book deferred expense via journal entry

* fix: Update field for better UX

* fix: Codacy

* fix: Change select field to checkbox
2020-06-23 09:57:56 +05:30

11 lines
445 B
Python

# Copyright (c) 2019, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
accounts_settings = frappe.get_doc('Accounts Settings', 'Accounts Settings')
accounts_settings.book_deferred_entries_based_on = 'Days'
accounts_settings.book_deferred_entries_via_journal_entry = 0
accounts_settings.submit_journal_entries = 0
accounts_settings.save()