xusc 1 week ago
parent
commit
ff5c1d4e87
  1. 8
      WMS-BS/NFine.Application/OMAY/ICSMoCreateLotApp.cs

8
WMS-BS/NFine.Application/OMAY/ICSMoCreateLotApp.cs

@ -584,7 +584,7 @@ a.InvCode,b.InvName,b.ClassCode,b.InvStd,b.InvUnit, a.Quantity as Quantity,
9999 as AbsolveQty,
cast( isnull(h.BL,0)*a.Amount AS DECIMAL(18,4)) as AbsolveAmount,
cast( isnull(c.LOTQTY,0)+isnull(f.GDQTY,0) as DECIMAL(18,4)) as CreatedQty,
CAST( ((isnull(h.BL,0)*a.Amount) -(isnull(c.LOTQTY,0)+isnull(f.GDQTY,0))) as DECIMAL(18,4)) as thisCreateQty,
CAST( ((isnull(h.BL,0)* case when b.AmountEnable='1' then a.Amount else a.Quantity end) -(isnull(c.LOTQTY,0)+isnull(f.GDQTY,0))) as DECIMAL(18,4)) as thisCreateQty,
cast( a.Amount as DECIMAL(18,4)) as Amount,
isnull(b.EffectiveEnable,0) as EffectiveEnable,
cast( isnull(b.EffectiveDays,0) as DECIMAL(18,4)) as EffectiveDays
@ -605,7 +605,7 @@ where isnull(a.EATTRIBUTE1,'')=''
left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.Type='3'
where isnull(a.EATTRIBUTE1,'')=''
group by b.TransCode,b.TransSequence
) f on d.MOCode=f.TransCode and d.Sequence=f.TransSequence
) f on d.MOCode=f.TransCode and d.Sequence+'~'+a.Sequence=f.TransSequence
left join
(select case when Flag>0 then ( case when PSLNUM>MLNUM then MLNUM else PSLNUM end) else PSLNUM end as BL ,MODetailID from (
select a.MODetailID,
@ -637,7 +637,7 @@ a.InvCode,b.InvName,b.ClassCode,b.InvStd,b.InvUnit, a.Quantity as Quantity,
9999 as AbsolveQty,
cast( isnull(h.BL,0)*a.Amount AS DECIMAL(18,4)) as AbsolveAmount,
cast( isnull(c.LOTQTY,0)+isnull(f.GDQTY,0) as DECIMAL(18,4)) as CreatedQty,
CAST( ((isnull(h.BL,0)*a.Amount) -(isnull(c.LOTQTY,0)+isnull(f.GDQTY,0))) as DECIMAL(18,4)) as thisCreateQty,
CAST( ((isnull(h.BL,0)* case when b.AmountEnable='1' then a.Amount else a.Quantity end ) -(isnull(c.LOTQTY,0)+isnull(f.GDQTY,0))) as DECIMAL(18,4)) as thisCreateQty,
cast( a.Amount as DECIMAL(18,4)) as Amount,
isnull(b.EffectiveEnable,0) as EffectiveEnable,
cast( isnull(b.EffectiveDays,0) as DECIMAL(18,4)) as EffectiveDays
@ -658,7 +658,7 @@ where isnull(a.EATTRIBUTE1,'')=''
left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.Type='3'
where isnull(a.EATTRIBUTE1,'')=''
group by b.TransCode,b.TransSequence
) f on d.MOCode=f.TransCode and d.Sequence=f.TransSequence
) f on d.MOCode=f.TransCode and d.Sequence+'~'+a.Sequence=f.TransSequence
left join
(select MinBL as BL ,MODetailID from (
select a.MODetailID,

Loading…
Cancel
Save