repost reserved qty if negative
This commit is contained in:
parent
081c3ec476
commit
7a31f6aaca
@ -94,3 +94,4 @@ erpnext.patches.v4_2.discount_amount
|
|||||||
erpnext.patches.v4_2.update_landed_cost_voucher
|
erpnext.patches.v4_2.update_landed_cost_voucher
|
||||||
erpnext.patches.v4_2.set_item_has_batch
|
erpnext.patches.v4_2.set_item_has_batch
|
||||||
erpnext.patches.v4_2.update_stock_uom_for_dn_in_sle
|
erpnext.patches.v4_2.update_stock_uom_for_dn_in_sle
|
||||||
|
erpnext.patches.v4_2.repost_reserved_qty
|
12
erpnext/patches/v4_2/repost_reserved_qty.py
Normal file
12
erpnext/patches/v4_2/repost_reserved_qty.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# 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
|
||||||
|
from erpnext.utilities.repost_stock import update_bin_qty, get_reserved_qty
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
for item_code, warehouse in frappe.db.sql("select item_code, warehouse from tabBin where ifnull(reserved_qty, 0) < 0"):
|
||||||
|
update_bin_qty(item_code, warehouse, {
|
||||||
|
"reserved_qty": get_reserved_qty(item_code, warehouse)
|
||||||
|
})
|
Loading…
Reference in New Issue
Block a user