Commit 681411c3 by 泽锋 李

8点半张莹霞的缺货,补齐5个的需求去掉

parent c7351bef
...@@ -1021,7 +1021,7 @@ and t1.quantity_init_advise>=0 and ( t3.buyer_name in ('张莹霞1') and t1.ware ...@@ -1021,7 +1021,7 @@ and t1.quantity_init_advise>=0 and ( t3.buyer_name in ('张莹霞1') and t1.ware
t1.bailun_sku, t1.bailun_sku,
'GZBLWH' as 'warehouse_code', 'GZBLWH' as 'warehouse_code',
( sum(t7.quantity_out_stock) - ( sum((case when t7.quantity_out_stock>0 then 0 else (t1.usable_stock+t1.occupy_order) end )) + sum(t1.quantity_transfer) + sum(t7.quantity_purchase) ) ) as 'quantity_init_advise', -- 原始采购建议数量 new ( sum(t7.quantity_out_stock) - ( sum((case when t7.quantity_out_stock>0 then 0 else (t1.usable_stock+t1.occupy_order) end )) + sum(t1.quantity_transfer) + sum(t7.quantity_purchase) ) ) as 'quantity_init_advise', -- 原始采购建议数量 new
GREATEST(5, GREATEST(0,
( sum(t7.quantity_out_stock) - ( sum((case when t7.quantity_out_stock>0 then 0 else (t1.usable_stock+t1.occupy_order) end )) + sum(t1.quantity_transfer) + sum(t7.quantity_purchase) ) ) ( sum(t7.quantity_out_stock) - ( sum((case when t7.quantity_out_stock>0 then 0 else (t1.usable_stock+t1.occupy_order) end )) + sum(t1.quantity_transfer) + sum(t7.quantity_purchase) ) )
) as 'quantity_final_advise', -- 计算moq之后的数量 new ) as 'quantity_final_advise', -- 计算moq之后的数量 new
t6.product_inner_code as 'product_inner_code', -- 内部商品编码 new t6.product_inner_code as 'product_inner_code', -- 内部商品编码 new
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment