@ -562,7 +562,8 @@ EXEC PROC_Update_PO_RdRecord01 @ID= @ID1
//sql = @"Update a set iReceivedQTY =isnull(iReceivedQTY ,0)+ @iQty,iReceivedMoney=isnull(iReceivedMoney,0)+@iMoney FROM dbo.PO_Podetails a where a.ID='" + body.iPOsID + "'";
sql = @ "
Update a set
iReceivedMoney = isnull ( iReceivedMoney , 0 ) + @iMoney
iReceivedQTY = isnull ( iReceivedQTY , 0 ) + @iQty
, iReceivedMoney = isnull ( iReceivedMoney , 0 ) + @iMoney
, freceivedqty = isnull ( freceivedqty , 0 ) + @iQty
FROM dbo . PO_Podetails a where a . ID = @ID "
;
@ -1271,26 +1272,52 @@ EXEC PROC_Update_PO_RdRecord01 @ID= @ID1
// //DBHelper.UpdateCurrentStock(cmd, body.InvCode, head.WHCode, body.InvCode, body.Quantity, key);
// DBHelper.UpdateCurrentStockNEW(cmd, body.InvCode, head.WHCode, body.BatchCode, body.Quantity, body.cFree1, body.cFree2, body.cFree3, body.cFree4, body.cFree5, body.cFree6, body.cFree7, body.cFree8, body.cFree9, body.cFree10, key);
//}
key . cBustypeUN = "普通采购" ;
key . cVouchTypeUN = "01" ;
key . TableName = "IA_ST_UnAccountVouch01" ;
if ( batch ! = "" )
{
DBHelper . UpdateCurrentStockCCGC ( cmd , body . InvCode , head . WHCode , body . BatchCode , body . Quantity , body . Amount , body . cFree1 ,
body . cFree2 , body . cFree3 , body . cFree4 , body . cFree5 , body . cFree6 , body . cFree7 , body . cFree8 , body . cFree9 , body . cFree10 ,
gys , key , "" , "" , "" , "" , 0 , 0 , - body . Quantity , - body . Amount , 0 , 0 , 0 , 0 , iFatherId , iChildId ) ;
}
else
if ( head . UpdateStock )
{
DBHelper . UpdateCurrentStockCCGC ( cmd , body . InvCode , head . WHCode , "" , 0 , 0 , body . cFree1 ,
body . cFree2 , body . cFree3 , body . cFree4 , body . cFree5 , body . cFree6 , body . cFree7 , body . cFree8 , body . cFree9 , body . cFree10 ,
gys , key , "" , "" , "" , "" , 0 , 0 , - body . Quantity , - body . Amount , 0 , 0 , 0 , 0 , iFatherId , iChildId ) ;
DBHelper . UpdateCurrentStockCCGC ( cmd , body . InvCode , head . WHCode , body . BatchCode , body . Quantity , body . Amount , body . cFree1 ,
body . cFree2 , body . cFree3 , body . cFree4 , body . cFree5 , body . cFree6 , body . cFree7 , body . cFree8 , body . cFree9 , body . cFree10 ,
gys , key , "" , "" , "" , "" , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , iFatherId , iChildId ) ;
key . cBustypeUN = "普通采购" ;
key . cVouchTypeUN = "01" ;
key . TableName = "IA_ST_UnAccountVouch01" ;
if ( batch ! = "" )
{
DBHelper . UpdateCurrentStockCCGC ( cmd , body . InvCode , head . WHCode , body . BatchCode , body . Quantity , body . Amount , body . cFree1 ,
body . cFree2 , body . cFree3 , body . cFree4 , body . cFree5 , body . cFree6 , body . cFree7 , body . cFree8 , body . cFree9 , body . cFree10 ,
gys , key , "" , "" , "" , "" , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , iFatherId , iChildId ) ;
// DBHelper.UpdateCurrentStockCCGC(cmd, body.InvCode, head.WHCode, body.BatchCode, body.Quantity, body.Amount, body.cFree1,
//body.cFree2, body.cFree3, body.cFree4, body.cFree5, body.cFree6, body.cFree7, body.cFree8, body.cFree9, body.cFree10,
//gys, key, "", "", "", "", 0, 0, -body.Quantity, -body.Amount, 0, 0, 0, 0, iFatherId, iChildId);
}
else
{
//DBHelper.UpdateCurrentStockCCGC(cmd, body.InvCode, head.WHCode, "", 0, 0, body.cFree1,
//body.cFree2, body.cFree3, body.cFree4, body.cFree5, body.cFree6, body.cFree7, body.cFree8, body.cFree9, body.cFree10,
//gys, key, "", "", "", "", 0, 0, -body.Quantity, -body.Amount, 0, 0, 0, 0, iFatherId, iChildId);
DBHelper . UpdateCurrentStockCCGC ( cmd , body . InvCode , head . WHCode , body . BatchCode , body . Quantity , body . Amount , body . cFree1 ,
body . cFree2 , body . cFree3 , body . cFree4 , body . cFree5 , body . cFree6 , body . cFree7 , body . cFree8 , body . cFree9 , body . cFree10 ,
gys , key , "" , "" , "" , "" , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , iFatherId , iChildId ) ;
}
if ( head . UpdateTodoQuantity )
{
key . cBustypeUN = "普通采购" ;
key . cVouchTypeUN = "01" ;
key . TableName = "IA_ST_UnAccountVouch01" ;
if ( batch ! = "" )
{
DBHelper . UpdateCurrentStockCCGC ( cmd , body . InvCode , head . WHCode , body . BatchCode , 0 , 0 , body . cFree1 ,
body . cFree2 , body . cFree3 , body . cFree4 , body . cFree5 , body . cFree6 , body . cFree7 , body . cFree8 , body . cFree9 , body . cFree10 ,
gys , key , "" , "" , "" , "" , 0 , 0 , - body . Quantity , - body . Amount , 0 , 0 , 0 , 0 , iFatherId , iChildId ) ;
}
else
{
DBHelper . UpdateCurrentStockCCGC ( cmd , body . InvCode , head . WHCode , "" , 0 , 0 , body . cFree1 ,
body . cFree2 , body . cFree3 , body . cFree4 , body . cFree5 , body . cFree6 , body . cFree7 , body . cFree8 , body . cFree9 , body . cFree10 ,
gys , key , "" , "" , "" , "" , 0 , 0 , - body . Quantity , - body . Amount , 0 , 0 , 0 , 0 , iFatherId , iChildId ) ;
}
}
}
iFatherIdTwo = "'" + iFatherId + "'," ;
xxxxxxxxxx