@ -978,7 +978,7 @@ LEFT JOIN ICSConfiguration conWhCode ON conWhCode.Code='ERPWHCode' AND a.WorkPoi
try
{
#region ERP
string sql = @ "SELECT a.VenCode+a.DepCode+y.OOCode+a.MUSER AS Costre,a.VenCode,a.DepCode,y.OOCode,a.MUSER,a.MTIME,conStock.Enable AS CompleteVerification,
string sql = @ "SELECT a.VenCode+a.DepCode+y.OOCode+a.MUSER AS Costre,a.VenCode,a.DepCode,y.OOID,y.OO Code,a.MUSER,a.MTIME,conStock.Enable AS CompleteVerification,
a . Sequence , a . InvCode , a . Quantity , CASE invBat . AmountEnable WHEN '1' THEN a . Amount ELSE '0' END AS Amount , ISNULL ( a . UnitPrice , 0 ) AS UnitPrice , a . Currency , a . OODetailID
, a . WorkPoint , ISNULL ( ext . ProjectCode , ' ' ) AS ProjectCode , CASE WHEN ISNULL ( invBat . BatchEnable , '0' ) = '1' THEN ISNULL ( ext . BatchCode , ' ' ) ELSE ' ' END AS BatchCode , ISNULL ( ext . Version , ' ' ) AS Version , ISNULL ( ext . Brand , ' ' ) AS Brand ,
ISNULL ( ext . cFree1 , ' ' ) AS cFree1 , ISNULL ( ext . cFree2 , ' ' ) AS cFree2 , ISNULL ( ext . cFree3 , ' ' ) AS cFree3 , ISNULL ( ext . cFree4 , ' ' ) AS cFree4 , ISNULL ( ext . cFree5 , ' ' ) AS cFree5 , ISNULL ( ext . cFree6 , ' ' ) AS cFree6 , ISNULL ( ext . cFree7 , ' ' ) AS cFree7 , ISNULL ( ext . cFree8 , ' ' ) AS cFree8 , ISNULL ( ext . cFree9 , ' ' ) AS cFree9 , ISNULL ( ext . cFree10 , ' ' ) AS cFree10
@ -990,7 +990,7 @@ LEFT JOIN ICSConfiguration conWhCode ON conWhCode.Code='ERPWHCode' AND a.WorkPoi
INNER JOIN ICSConfiguration conStock ON a . WorkPoint = conStock . WorkPoint AND conStock . Code = ' CompleteVerification003 '
WHERE a . ODNCode = ' { 0 } ' AND a . WorkPoint = ' { 1 } '
SELECT DISTINCT Costre , WorkPoint , VenCode , DepCode , OOCode , MUSER AS [ User ] , SYSDATETIME ( ) AS MTime , CompleteVerification FROM # TempERP
SELECT DISTINCT Costre , WorkPoint , VenCode , DepCode , OOID AS OO Code , MUSER AS [ User ] , SYSDATETIME ( ) AS MTime , CompleteVerification FROM # TempERP
SELECT Costre , Sequence , InvCode , Quantity , Amount , UnitPrice , Currency , OODetailID , ProjectCode , BatchCode , Version , Brand , cFree1 , cFree2 , cFree3 , cFree4 , cFree5 , cFree6 , cFree7 , cFree8 , cFree9 , cFree10
FROM # TempERP
@ -2202,12 +2202,11 @@ SELECT c.VenCode+a.ToWarehouseCode+c.ODNCode+a.MUSER AS Costre,c.VenCode,a.ToWar
foreach ( var item in res )
{
JObject jo = ( JObject ) item ;
JArray resdetail = ( JArray ) JsonConvert . DeserializeObject ( jo [ "details " ] . ToString ( ) ) ;
JArray resdetail = ( JArray ) JsonConvert . DeserializeObject ( jo [ "ospurInRecordDetailRet " ] . ToString ( ) ) ;
foreach ( var detail in resdetail )
{
JObject det = ( JObject ) detail ;
string allcol = jo [ "WHCode" ] . ToString ( ) + det [ "ProjectCode" ] . ToString ( ) + det [ "cBatch" ] . ToString ( ) + det [ "version" ] . ToString ( ) + det [ "brand" ] . ToString ( ) + det [ "cFree1" ] . ToString ( ) + det [ "cFree2" ] . ToString ( ) + det [ "cFree3" ] . ToString ( ) + det [ "cFree4" ] . ToString ( ) + det [ "cFree5" ] . ToString ( )
+ det [ "cFree6" ] . ToString ( ) + det [ "cFree7" ] . ToString ( ) + det [ "cFree8" ] . ToString ( ) + det [ "cFree9" ] . ToString ( ) + det [ "cFree10" ] . ToString ( ) ;
string allcol = "" + det [ "ProjectCode" ] . ToString ( ) + det [ "cBatch" ] . ToString ( ) + det [ "version" ] . ToString ( ) + det [ "brand" ] . ToString ( ) ;
ICSWareHouseLotInfoService . WareHouseLotInfoLogUpdate ( TransType , det [ "ODNDetailID" ] . ToString ( ) , Identification , jo [ "ID" ] . ToString ( ) ,
det [ "DetailID" ] . ToString ( ) , jo [ "ORCVTCode" ] . ToString ( ) , det [ "Sequence" ] . ToString ( ) , allcol , cmd , language , BusinessCode ) ;
}