|
@@ -109,7 +109,7 @@
|
|
|
WHERE
|
|
|
a.cbustype = '其他入库'
|
|
|
) and
|
|
|
- d.cinvname <> '杂纱'
|
|
|
+ d.cinvname <> '杂纱' and a.iquantity>0
|
|
|
) union all (
|
|
|
SELECT
|
|
|
a.comcode as cCode,isnull(a.iSQuantity,a.iquantity) as iQuantity,isnull(a.iUnitCost,0) as iPrice,isnull(a.cBatch,'') as cBatch,
|
|
@@ -134,7 +134,7 @@
|
|
|
RdRecords08 b
|
|
|
INNER JOIN rdrecord08 a ON a.id = b.ID
|
|
|
WHERE
|
|
|
- a.cbustype = '其他入库'
|
|
|
+ a.cbustype in ('其他入库','转换入库')
|
|
|
)
|
|
|
) and
|
|
|
a.cInvCode + isnull( a.cFree1, '' ) + isnull( a.cBatch, '' ) not IN (
|
|
@@ -146,7 +146,7 @@
|
|
|
WHERE
|
|
|
a.cbustype = '其他入库'
|
|
|
) and
|
|
|
- d.cinvname <> '杂纱'
|
|
|
+ d.cinvname <> '杂纱' and a.iquantity>0
|
|
|
) union all (
|
|
|
SELECT
|
|
|
a.comcode as cCode,isnull(a.iSQuantity,a.iquantity) as iQuantity,isnull(a.iUnitCost,0) as iPrice,isnull(a.cBatch,'') as cBatch,'杂纱' as cPlanCode
|
|
@@ -157,7 +157,7 @@
|
|
|
(a.cbatch is null or a.cbatch='' or a.cbatch <> '期初') and
|
|
|
(d.cInvCCode LIKE '01%' or d.cInvCCode LIKE '02%' or d.cInvCCode LIKE '03%' or d.cInvCCode LIKE '04%') and
|
|
|
a.comcode LIKE CONCAT(#{code},'%') and
|
|
|
- d.cinvname='杂纱'
|
|
|
+ d.cinvname='杂纱' and a.iquantity>0
|
|
|
)
|
|
|
</select>
|
|
|
|
|
@@ -186,7 +186,7 @@
|
|
|
or d.cInvCCode LIKE '02%'
|
|
|
or d.cInvCCode LIKE '03%'
|
|
|
or d.cInvCCode LIKE '04%') and
|
|
|
- a.comcode LIKE 'SYM738%' and
|
|
|
+ a.comcode LIKE CONCAT(#{code},'%') and
|
|
|
d.cInvName <> '杂纱' and
|
|
|
a.cInvCode+isnull(a.cFree1,'')+isnull(a.cbatch,'') in (
|
|
|
select b.cinvcode+isnull(b.cfree1,'')+isnull(b.cbatch,'') from RdRecords01 b
|
|
@@ -756,7 +756,7 @@
|
|
|
)
|
|
|
|
|
|
)
|
|
|
- and e.iQuantity>0 and f.cbustype='其他入库'
|
|
|
+ and e.iQuantity>0 and f.cbustype in ('其他入库','转换入库')
|
|
|
)
|
|
|
</select>
|
|
|
</mapper>
|