diff --git a/build/build_pullforward.sql b/build/build_pullforward.sql index f606255..837dcd8 100644 --- a/build/build_pullforward.sql +++ b/build/build_pullforward.sql @@ -200,6 +200,7 @@ tdr AS ( CROSS JOIN log WHERE e.flag + AND e.plan_units <> 0 GROUP BY o.fspr ,o.plnt @@ -230,6 +231,7 @@ tdr AS ( ,o.r_rate ,o.c_currency ,o.c_rate + ,(-e.qty/e.plan_units) --removal_rate ,o.calc_status ,o.flag ,o.order_date