[fix] [minor] update reserved qty
diff --git a/controllers/stock_controller.py b/controllers/stock_controller.py
index 2bf635b..c54fbb4 100644
--- a/controllers/stock_controller.py
+++ b/controllers/stock_controller.py
@@ -87,7 +87,9 @@
def delete_and_repost_sle(self):
""" Delete Stock Ledger Entries related to this voucher
and repost future Stock Ledger Entries"""
-
+
+ from stock.stock_ledger import update_entries_after
+
existing_entries = webnotes.conn.sql("""select distinct item_code, warehouse
from `tabStock Ledger Entry` where voucher_type=%s and voucher_no=%s""",
(self.doc.doctype, self.doc.name), as_dict=1)
diff --git a/stock/doctype/delivery_note/delivery_note.py b/stock/doctype/delivery_note/delivery_note.py
index 63e90ab..227d773 100644
--- a/stock/doctype/delivery_note/delivery_note.py
+++ b/stock/doctype/delivery_note/delivery_note.py
@@ -290,7 +290,7 @@
for d in self.get_item_list():
if webnotes.conn.get_value("Item", d.item_code, "is_stock_item") == "Yes" \
and d.warehouse:
- self.update_reserved_qty()
+ self.update_reserved_qty(d)
if self.doc.docstatus == 1:
sl_entries.append(self.get_sl_entries(d, {
diff --git a/stock/stock_ledger.py b/stock/stock_ledger.py
index 457a066..3bb3a00 100644
--- a/stock/stock_ledger.py
+++ b/stock/stock_ledger.py
@@ -28,7 +28,7 @@
sle = webnotes.bean([args])
sle.ignore_permissions = 1
sle.insert()
- sle.submit()
+ # sle.submit()
return sle.doc.name
_exceptions = []