Fix merge mistakes
This commit is contained in:
parent
803e998e9d
commit
129a0a4cae
@ -1,21 +0,0 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
from erpnext.utilities.repost_stock import update_bin_qty, get_indented_qty
|
||||
|
||||
count=0
|
||||
for item_code, warehouse in frappe.db.sql("""select distinct item_code, warehouse
|
||||
from `tabMaterial Request Item` where docstatus = 1"""):
|
||||
try:
|
||||
count += 1
|
||||
update_bin_qty(item_code, warehouse, {
|
||||
"indented_qty": get_indented_qty(item_code, warehouse),
|
||||
})
|
||||
if count % 200 == 0:
|
||||
frappe.db.commit()
|
||||
except:
|
||||
frappe.db.rollback()
|
@ -1,13 +0,0 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
for dt in ("Sales Order", "Purchase Order"):
|
||||
orders_with_advance = frappe.db.sql("""select name from `tab{0}`
|
||||
where docstatus < 2 and ifnull(advance_paid, 0) != 0""".format(dt), as_dict=1)
|
||||
|
||||
for order in orders_with_advance:
|
||||
frappe.get_doc(dt, order.name).set_total_advance_paid()
|
Loading…
Reference in New Issue
Block a user