|
|
@@ -2951,8 +2951,8 @@ with tmp as
|
|
|
group by k.wrfactortypeid, k.goodsid)
|
|
|
select a.*,
|
|
|
case
|
|
|
- when a.uqty * g1.agreeunit * r.mindeliveryqty * (r.rratio1/nvl(r.rratio2,1)) < a.qty then
|
|
|
- a.uqty * g1.agreeunit * r.mindeliveryqty * (r.rratio1/nvl(r.rratio2,1))
|
|
|
+ when a.uqty * g1.agreeunit * r.mindeliveryqty * (r.rratio2/nvl(r.rratio1,1)) < a.qty then
|
|
|
+ a.uqty * g1.agreeunit * r.mindeliveryqty * (r.rratio2/nvl(r.rratio1,1))
|
|
|
else
|
|
|
a.qty
|
|
|
end as avalidqty,
|