brotherton-erpnext/patches/december_2012/repost_projected_qty.py
2012-12-05 15:58:57 +05:30

5 lines
224 B
Python

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)""")