Commit e58055f7 by 泽锋 李

fix 张莹霞备货单计算

parent c57eae0e
......@@ -62,7 +62,8 @@ select
t1.quantity_init_advise as 'quantity_init_advise', -- 原始采购建议数量 new
(
case
when t7.sum_quantity_init_advise>=t7.max_moq then ( case when t6.buyer_name in ('张莹霞') then greatest(t1.quantity_init_advise,t6.moq) else t1.quantity_init_advise end )-- 如果商品的下单总量达到moq了,就直接下单 (张莹霞的sku取moq下单)
when t6.buyer_name in ('张莹霞') then greatest(t1.quantity_init_advise,t6.moq) -- (张莹霞的sku取moq下单)
when t7.sum_quantity_init_advise>=t7.max_moq then t1.quantity_init_advise-- 如果商品的下单总量达到moq了,就直接下单
when t7.sku_count=1 then t7.max_moq -- 如果该商品只有一个sku需要下单,则直接下一个moq
else
FLOOR(
......
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