brotherton-erpnext/patches/december_2012/repost_projected_qty.py

5 lines
224 B
Python
Raw Normal View History

2012-12-05 10:28:57 +00:00
def execute():
import webnotes
webnotes.conn.sql("""update `tabBin`
set projected_qty = ifnull(actual_qty, 0) + ifnull(indented_qty, 0) +
ifnull(ordered_qty, 0) + ifnull(planned_qty, 0) - ifnull(reserved_qty, 0)""")