fixes for notification
This commit is contained in:
parent
2c19960996
commit
9e6f00abab
@ -520,7 +520,7 @@ class DocType(TransactionBase):
|
||||
if stock_item[0]['is_stock_item'] == "Yes":
|
||||
# Reduce actual qty from warehouse
|
||||
self.make_sl_entry( d, d.warehouse, - flt(d.qty) , 0, update_stock)
|
||||
get_obj('Stock Ledger', 'Stock Ledger').update_stock(self.values)
|
||||
get_obj('Stock Ledger', 'Stock Ledger').update_stock(self.values, self.doc.amended_from and 'Yes' or 'No')
|
||||
|
||||
|
||||
#-------------------POS Stock Updatation Part----------------------------------------------
|
||||
|
@ -3,6 +3,6 @@ def execute():
|
||||
from webnotes.modules.module_manager import reload_doc
|
||||
reload_doc('setup', 'doctype', 'manage_account')
|
||||
reload_doc('stock', 'doctype', 'item')
|
||||
webnotes.conn.sql("alter table `tabItem` drop column `minimum_inventory_level`")
|
||||
webnotes.conn.sql("delete from `tabDocField` where fieldname=`minimum_inventory_level`")
|
||||
webnotes.conn.sql("update `tabItem` set re_order_level = minimum_inventory_level wehre ifnull(re_order_level,0) = 0 ")
|
||||
|
||||
|
||||
|
@ -245,7 +245,7 @@ class DocType:
|
||||
self.add_to_values(d, cstr(d.s_warehouse), -flt(d.transfer_qty), is_cancelled)
|
||||
if cstr(d.t_warehouse):
|
||||
self.add_to_values(d, cstr(d.t_warehouse), flt(d.transfer_qty), is_cancelled)
|
||||
get_obj('Stock Ledger', 'Stock Ledger').update_stock(self.values)
|
||||
get_obj('Stock Ledger', 'Stock Ledger').update_stock(self.values, self.doc.amended_from and 'Yes' or 'No')
|
||||
|
||||
|
||||
def validate_for_production_order(self, pro_obj):
|
||||
|
@ -207,7 +207,7 @@ class DocType:
|
||||
# -------------
|
||||
# update stock
|
||||
# -------------
|
||||
def update_stock(self, values):
|
||||
def update_stock(self, values, is_amended = 'No'):
|
||||
for v in values:
|
||||
sle_id, serial_nos = '', ''
|
||||
|
||||
@ -224,7 +224,7 @@ class DocType:
|
||||
if v["actual_qty"]:
|
||||
sle_id = self.make_entry(v)
|
||||
|
||||
get_obj('Warehouse', v["warehouse"]).update_bin(flt(v["actual_qty"]), 0, 0, 0, 0, v["item_code"], v["posting_date"], sle_id, v["posting_time"], '', v["is_cancelled"],v["voucher_type"],v["voucher_no"])
|
||||
get_obj('Warehouse', v["warehouse"]).update_bin(flt(v["actual_qty"]), 0, 0, 0, 0, v["item_code"], v["posting_date"], sle_id, v["posting_time"], '', v["is_cancelled"],v["voucher_type"],v["voucher_no"], is_amended)
|
||||
|
||||
|
||||
# -----------
|
||||
|
Loading…
x
Reference in New Issue
Block a user