修改库位错误

This commit is contained in:
gongxh
2021-06-10 09:27:00 +08:00
parent 5708b635eb
commit c7f9acdfe4
3 changed files with 9 additions and 12 deletions

View File

@@ -85,8 +85,9 @@ from InvPositionSum as a left join Inventory as b on a.cInvCode=b.cInvCode where
var sql = @" select * from (select stock.cInvCode MaterialCode,stock.Qty as StockQty ,arrival.arrivalQty,d.cInvName as MaterialName,d.cInvStd as MaterialSpecsModel from (select cInvCode,SUM( iQuantity) as Qty from CurrentStock
group by cInvCode ) as stock
left join
(select cInvCode,SUM(iQuantity)-SUM(fValidInQuan) as arrivalQty from PU_ArrivalVouchs a,PU_ArrivalVouch b
where a.ID=b.ID and isnull(b.cverifier,'')<>'' and bNegative=0
(select cInvCode,SUM(iQuantity)-SUM(fValidInQuan) as arrivalQty from PU_ArrivalVouchs a
left join PU_ArrivalVouch b on a.ID=b.ID
where isnull(b.cverifier,'')<>'' and bNegative=0
group by cInvCode) as arrival on stock.cInvCode=arrival.cInvCode
left join Inventory as d on stock.cInvCode=d.cInvCode
) as tbl where (StockQty<>0 or arrivalQty<>0)