|
|
|
@ -55,7 +55,8 @@ |
|
|
|
B.average_price, |
|
|
|
B.umid, |
|
|
|
(sum(isnull(A.qty_on_hand, 0)) * B.average_price) as totalCost, |
|
|
|
dbo.get_bu_desc(A.site, A.citem_code) buDesc |
|
|
|
dbo.get_bu_desc(A.site, A.citem_code) buDesc, |
|
|
|
B.est_use_qty |
|
|
|
from inventory_stock A |
|
|
|
left join part_spare B on A.site = B.site and A.part_no = B.part_no and a.citem_code = b.bu_no |
|
|
|
<where> |
|
|
|
@ -107,10 +108,10 @@ |
|
|
|
</where> |
|
|
|
GROUP BY |
|
|
|
<if test="query.groupType == 0"> |
|
|
|
A.site, A.part_no, B.part_description, A.batch_no, b.min_stock, b.max_stock, B.average_price, B.umid, a.citem_code |
|
|
|
A.site, A.part_no, B.part_description, A.batch_no, b.min_stock, b.max_stock, B.average_price, B.umid, a.citem_code,B.est_use_qty |
|
|
|
</if> |
|
|
|
<if test="query.groupType == 1"> |
|
|
|
A.site, A.part_no, B.part_description, b.min_stock, b.max_stock, B.average_price, B.umid, a.citem_code |
|
|
|
A.site, A.part_no, B.part_description, b.min_stock, b.max_stock, B.average_price, B.umid, a.citem_code,B.est_use_qty |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
|
|
|
|
|