migration #51
@@ -52,7 +52,7 @@ MaterialHumanReadableId
|
||||
,x.EffectiveConsumption as consumption -- this is how much was consummed via cmd 112
|
||||
,x.TotalDemand as totalDemand -- the total demand needed to finish the lot out
|
||||
|
||||
,case when cp.Pieces >= 0.001 then (lot.TotalProducedQuantity+1) * cp.Pieces else
|
||||
,case when cp.Pieces >= 0.001 then (lot.TotalProducedLoadingUnits+1) * cp.Pieces else
|
||||
(a.Weight *((case when cp.Percentage is null then 80 else cp.Percentage end) / 100) * ((lot.TotalProducedLoadingUnits+1) * p.LoadingUnitPieces)) / 1000 end totalNeeded
|
||||
|
||||
,case when IsMainMaterial = 1 then
|
||||
@@ -134,8 +134,7 @@ group by IdArtikelVarianten,ArtikelVariantenBez
|
||||
) as l on
|
||||
l.IdArtikelVarianten = MaterialHumanReadableId
|
||||
|
||||
where lot.ProductionLotHumanReadableId = @lot and
|
||||
MaterialDescription NOT LIKE '%nopal%'
|
||||
where lot.ProductionLotHumanReadableId = @lot and MaterialDescription not like '%nopal%'
|
||||
and MaterialDescription NOT LIKE '%bb%'
|
||||
and MaterialDescription NOT LIKE '%mcg%'
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user