mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-18 02:55:20 +00:00
Merge branch 'develop' into e-commerce-refactor-develop
This commit is contained in:
19
erpnext/patches/v13_0/enable_provisional_accounting.py
Normal file
19
erpnext/patches/v13_0/enable_provisional_accounting.py
Normal file
@@ -0,0 +1,19 @@
|
||||
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()
|
||||
@@ -27,7 +27,7 @@ def create_new_cost_center_allocation_records(cc_allocations):
|
||||
cca.submit()
|
||||
|
||||
def get_existing_cost_center_allocations():
|
||||
if not frappe.get_meta("Cost Center").has_field("enable_distributed_cost_center"):
|
||||
if not frappe.db.exists("DocType", "Distributed Cost Center"):
|
||||
return
|
||||
|
||||
par = frappe.qb.DocType("Cost Center")
|
||||
|
||||
Reference in New Issue
Block a user