mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 11:49:10 +00:00
[minor] renamed perpetual accounting to make_accounting_entry_for_every_stock_entry
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
import webnotes
|
||||
from webnotes.utils import cint
|
||||
from accounts.utils import create_stock_in_hand_jv
|
||||
|
||||
def execute():
|
||||
webnotes.conn.auto_commit_on_many_writes = True
|
||||
|
||||
aii_enabled = cint(webnotes.defaults.get_global_default("perpetual_accounting"))
|
||||
|
||||
if aii_enabled:
|
||||
create_stock_in_hand_jv(reverse = True)
|
||||
|
||||
webnotes.conn.sql("""update `tabPurchase Invoice Item` pi_item
|
||||
set conversion_factor = (select ifnull(if(conversion_factor=0, 1, conversion_factor), 1)
|
||||
from `tabUOM Conversion Detail`
|
||||
where parent = pi_item.item_code and uom = pi_item.uom limit 1
|
||||
)
|
||||
where ifnull(conversion_factor, 0)=0""")
|
||||
|
||||
if aii_enabled:
|
||||
create_stock_in_hand_jv()
|
||||
|
||||
webnotes.conn.auto_commit_on_many_writes = False
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import webnotes
|
||||
from webnotes.utils import cint
|
||||
|
||||
def execute():
|
||||
aii_enabled = cint(webnotes.defaults.get_global_default("perpetual_accounting"))
|
||||
aii_enabled = cint(webnotes.defaults.get_global_default("auto_accounting_for_stock"))
|
||||
|
||||
if aii_enabled:
|
||||
webnotes.conn.sql("""update `tabGL Entry` gle set is_cancelled = 'Yes'
|
||||
|
||||
Reference in New Issue
Block a user