修改库位错误
This commit is contained in:
@@ -58,9 +58,9 @@ namespace NX.ERP.U8.Purchase
|
||||
<> 1 THEN 0 ELSE (CASE WHEN isnull(d.igrouptype, 0)
|
||||
= 1 THEN unit2.ichangrate ELSE ((isnull(b.iquantity, 0) - isnull(b.finspectquantity, 0))
|
||||
/ (isnull(b.inum, 0) - isnull(b.finspectnum, 0))) END) END) AS inspecexchrate,
|
||||
e.POID as Poid,Pos.cPosName,
|
||||
CASE WHEN isnull(f.bflowprocess, 0) = 1 THEN isnull(f.bstoragearrivalorder, 1) ELSE 1 END AS bstoragearrivalorder,
|
||||
Pos.cPosName
|
||||
e.POID as Poid,--Pos.cPosName,
|
||||
CASE WHEN isnull(f.bflowprocess, 0) = 1 THEN isnull(f.bstoragearrivalorder, 1) ELSE 1 END AS bstoragearrivalorder
|
||||
--,Pos.cPosName
|
||||
from PU_ArrivalVouch a
|
||||
|
||||
left join PU_ArrivalVouchs b on a.ID=b.ID
|
||||
@@ -70,13 +70,9 @@ namespace NX.ERP.U8.Purchase
|
||||
LEFT JOIN dbo.ComputationUnit AS Unit1 ON d.cComUnitCode = Unit1.cComunitCode
|
||||
Left Join PO_Podetails e ON B.iPOsID = e.ID
|
||||
LEFT JOIN dbo.PUBizFlow f ON f.iFlowID = a.iflowid
|
||||
left join (SELECT cinvcode, STUFF(( SELECT ','+ cPosName FROM ( select b.cPosName,a.cInvCode,a.iQuantity from InvPositionSum a left join Position b on a.cPosCode=b.cPosCode
|
||||
where a.iQuantity <>0) a WHERE b.cinvcode = a.cinvcode order by a.iQuantity desc FOR XML PATH('')),1 ,1, '') cPosName
|
||||
FROM InvPositionSum b
|
||||
GROUP BY cinvcode
|
||||
) Pos on b.cInvCode=Pos.cInvCode
|
||||
|
||||
where
|
||||
(isnull(cbustype,'')<>'委外加工') and isnull (b.cInvCode,'')=isnull(Pos.cInvCode,'')
|
||||
(isnull(cbustype,'')<>'委外加工') --and isnull (b.cInvCode,'')=isnull(Pos.cInvCode,'')
|
||||
and isnull(b.cbcloser,'')='' And isnull(a.cverifier,'')<>''
|
||||
And a.iBillType ='0' and isnull(b.bGsp,'')='0' and (isnull(b.iQuantity,0)-isnull(b.fRefuseQuantity,0)>isnull(b.fValidInQuan,0) or (d.igrouptype=2
|
||||
and isnull(b.inum,0)-isnull(b.frefusenum,0)>isnull(b.fvalidinnum,0))) and isnull(bStorageArrivalOrder,1)=1 ";
|
||||
|
||||
Reference in New Issue
Block a user