From 598dd99144c66ab4866eaf13cc943e18a49c7be6 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 5 Dec 2012 15:58:57 +0530 Subject: [PATCH] repost projected qty --- patches/december_2012/repost_projected_qty.py | 5 +++++ patches/patch_list.py | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 patches/december_2012/repost_projected_qty.py diff --git a/patches/december_2012/repost_projected_qty.py b/patches/december_2012/repost_projected_qty.py new file mode 100644 index 0000000000..4e4f522713 --- /dev/null +++ b/patches/december_2012/repost_projected_qty.py @@ -0,0 +1,5 @@ +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)""") \ No newline at end of file diff --git a/patches/patch_list.py b/patches/patch_list.py index c902e0daa4..ce03fb2250 100644 --- a/patches/patch_list.py +++ b/patches/patch_list.py @@ -713,4 +713,8 @@ patch_list = [ 'patch_module': 'patches.december_2012', 'patch_file': 'repost_ordered_qty', }, + { + 'patch_module': 'patches.december_2012', + 'patch_file': 'repost_projected_qty', + }, ] \ No newline at end of file