|
|
@@ -1,8 +1,6 @@
|
|
|
-SELECT t2.itemno,
|
|
|
+SELECT t1.itemno,
|
|
|
sum(t1.undeliqty) undeliqty
|
|
|
FROM sa_orderitems t1
|
|
|
- inner join plm_item t2 on t1.siteid = t2.siteid and t1.itemid = t2.itemid
|
|
|
inner join sa_order t3 on t1.siteid=t3.siteid and t1.sa_orderid=t3.sa_orderid
|
|
|
- left join plm_unit t4 on t2.unitid=t4.unitid and t2.siteid=t4.siteid
|
|
|
WHERE t3.STATUS in ('审核')
|
|
|
-and t1.siteid=$siteid$ and t2.itemno in $itemnos$ group by t2.itemno
|
|
|
+and t1.siteid=$siteid$ and t1.itemno in $itemnos$ group by t1.itemno
|