528c71382f
* feat: Provisonal accounting for expenses * fix: Method for provisional accounting entry * chore: Add test case * fix: Remove test case * fix: Use company doctype * fix: Add provisional expense account field in Purchase Receipt Item * fix: Test case * fix: Move provisional expense account to parent * fix: Patch
19 lines
507 B
Python
19 lines
507 B
Python
import frappe
|
|
|
|
|
|
def execute():
|
|
frappe.reload_doc("setup", "doctype", "company")
|
|
|
|
company = frappe.qb.DocType("Company")
|
|
|
|
frappe.qb.update(
|
|
company
|
|
).set(
|
|
company.enable_provisional_accounting_for_non_stock_items, company.enable_perpetual_inventory_for_non_stock_items
|
|
).set(
|
|
company.default_provisional_account, company.service_received_but_not_billed
|
|
).where(
|
|
company.enable_perpetual_inventory_for_non_stock_items == 1
|
|
).where(
|
|
company.service_received_but_not_billed.isnotnull()
|
|
).run() |