|
|
@ -577,7 +577,7 @@ CAST( (a.Quantity-ISNULL(c.LOTQTY,0)) as DECIMAL(18,{0})) as thisCreateQty,isnu |
|
|
|
,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10 |
|
|
|
from ICSSDN a |
|
|
|
left join ICSInventory b on a.InvCode=b.InvCode and a.WorkPoint=b.WorkPoint |
|
|
|
LEFT JOIN ICSInventoryDetail detail WHERE b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint |
|
|
|
LEFT JOIN ICSInventoryDetail detail on b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint |
|
|
|
left join ( |
|
|
|
select mm.TransCode,mm.TransSequence,sum(isnull(ee.Quantity,0)) LOTQTY,ee.WorkPoint from ICSInventoryLot ee |
|
|
|
left join ICSInventoryLotDetail mm on ee.LotNo=mm.LotNo and ee.type='4' |
|
|
@ -743,7 +743,7 @@ CAST(a.Quantity AS DECIMAL(18,{0})) as Quantity,CAST(a.Amount AS DECIMAL(18,{0}) |
|
|
|
,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10 |
|
|
|
from ICSOtherIn a |
|
|
|
left join ICSInventory b on a.InvCode=b.InvCode and a.WorkPoint=b.WorkPoint |
|
|
|
LEFT JOIN ICSInventoryDetail detail WHERE b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint |
|
|
|
LEFT JOIN ICSInventoryDetail detail on b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint |
|
|
|
left join ( |
|
|
|
select mm.TransCode,mm.TransSequence,sum(isnull(ee.Quantity,0)) LOTQTY,ee.WorkPoint from ICSInventoryLot ee |
|
|
|
left join ICSInventoryLotDetail mm on ee.LotNo=mm.LotNo and ee.type='5' |
|
|
@ -904,7 +904,7 @@ insert into ICSInventoryLot |
|
|
|
,f.Colspan ,f.ProjectCode ,f.BatchCode ,f.Version ,f.Brand ,f.cFree1 ,f.cFree2 ,f.cFree3 ,f.cFree4 |
|
|
|
,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10 from ICSReturn a |
|
|
|
left join ICSInventory b on a.InvCode=b.InvCode and a.WorkPoint=b.WorkPoint |
|
|
|
LEFT JOIN ICSInventoryDetail detail WHERE b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint |
|
|
|
LEFT JOIN ICSInventoryDetail detail on b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint |
|
|
|
left join ( |
|
|
|
select mm.TransCode,mm.TransSequence,sum(isnull(ee.Quantity,0)) LOTQTY,ee.WorkPoint from ICSInventoryLot ee |
|
|
|
left join ICSInventoryLotDetail mm on ee.LotNo=mm.LotNo and ee.type='6' |
|
|
@ -966,7 +966,7 @@ CAST(a.Quantity AS DECIMAL(18,{0})) as Quantity ,CAST(a.Amount AS DECIMAL(18,{0} |
|
|
|
,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10 |
|
|
|
from ICSDeliveryNotice a |
|
|
|
left join ICSInventory b on a.InvCode=b.InvCode and a.WorkPoint=b.WorkPoint |
|
|
|
LEFT JOIN ICSInventoryDetail detail WHERE b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint |
|
|
|
LEFT JOIN ICSInventoryDetail detail on b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint |
|
|
|
left join ( |
|
|
|
select mm.TransCode,mm.TransSequence,sum(isnull(ee.Quantity,0)) LOTQTY,ee.WorkPoint from ICSInventoryLot ee |
|
|
|
left join ICSInventoryLotDetail mm on ee.LotNo=mm.LotNo and ee.type='7' |
|
|
@ -1043,7 +1043,7 @@ CAST(c.LOTQTY AS DECIMAL(18,{0})) as LOTQTY |
|
|
|
,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10 |
|
|
|
from ICSODeliveryNotice a |
|
|
|
left join ICSInventory b on a.InvCode=b.InvCode and a.WorkPoint=b.WorkPoint |
|
|
|
LEFT JOIN ICSInventoryDetail detail WHERE b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint |
|
|
|
LEFT JOIN ICSInventoryDetail detail on b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint |
|
|
|
left join ( |
|
|
|
select mm.TransCode,mm.TransSequence,sum(isnull(ee.Quantity,0)) LOTQTY,ee.WorkPoint from ICSInventoryLot ee |
|
|
|
left join ICSInventoryLotDetail mm on ee.LotNo=mm.LotNo and ee.type='8' |
|
|
@ -1118,7 +1118,7 @@ CAST(a.Amount AS DECIMAL(18,{0})) as Amount,CAST(a.RCVQuantity AS DECIMAL(18,{0} |
|
|
|
,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10 |
|
|
|
from ICSManufactureReceive a |
|
|
|
left join ICSInventory b on a.InvCode=b.InvCode and a.WorkPoint=b.WorkPoint |
|
|
|
LEFT JOIN ICSInventoryDetail detail WHERE b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint |
|
|
|
LEFT JOIN ICSInventoryDetail detail on b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint |
|
|
|
left join ( |
|
|
|
select mm.TransCode,mm.TransSequence,sum(isnull(ee.Quantity,0)) LOTQTY,ee.WorkPoint from ICSInventoryLot ee |
|
|
|
left join ICSInventoryLotDetail mm on ee.LotNo=mm.LotNo and ee.type='9' |
|
|
|