Merge pull request #21065 from marination/bin-requested-qty

fix: Updated Bin Requested Qty logic
This commit is contained in:
rohitwaghchaure
2020-04-07 14:50:19 +05:30
committed by GitHub
4 changed files with 45 additions and 15 deletions

View File

@@ -0,0 +1,13 @@
from __future__ import unicode_literals
import frappe
from erpnext.stock.stock_balance import update_bin_qty, get_indented_qty
def execute():
bin_details = frappe.db.sql("""
SELECT item_code, warehouse
FROM `tabBin`""",as_dict=1)
for entry in bin_details:
update_bin_qty(entry.get("item_code"), entry.get("warehouse"), {
"indented_qty": get_indented_qty(entry.get("item_code"), entry.get("warehouse"))
})