migration #51

Merged
cowch merged 166 commits from migration into main 2025-09-19 22:18:47 -05:00
Showing only changes of commit 397f1da595 - Show all commits

View File

@@ -1,21 +1,22 @@
// this query pulls all the inventory except the inv locations. // this query pulls all the inventory except the inv locations.
export const totalInvNoRn = ` export const totalInvNoRn = `
select x.idartikelVarianten as av, select
ArtikelVariantenAlias as Alias, x.idartikelVarianten as av,
x.ArtikelVariantenAlias as Alias
--x.Lfdnr as RunningNumber, --x.Lfdnr as RunningNumber,
round(sum(EinlagerungsMengeVPKSum),0) as Total_Pallets, ,round(sum(EinlagerungsMengeVPKSum),0) as Total_Pallets
sum(EinlagerungsMengeSum) as Total_PalletQTY, ,sum(EinlagerungsMengeSum) as Total_PalletQTY
round(sum(VerfuegbareMengeVPKSum),0) as Avalible_Pallets, ,round(sum(VerfuegbareMengeVPKSum),0) as Avalible_Pallets
sum(VerfuegbareMengeSum) as Avaliable_PalletQTY, ,sum(VerfuegbareMengeSum) as Avaliable_PalletQTY
sum(case when c.Description LIKE '%COA%' then GesperrteMengeVPKSum else 0 end) as COA_Pallets, ,sum(case when c.Description LIKE '%COA%' then GesperrteMengeVPKSum else 0 end) as COA_Pallets
sum(case when c.Description LIKE '%COA%' then GesperrteMengeSum else 0 end) as COA_QTY, ,sum(case when c.Description LIKE '%COA%' then GesperrteMengeSum else 0 end) as COA_QTY
sum(case when c.Description NOT LIKE '%COA%' or x.IdMainDefect = -1 then GesperrteMengeVPKSum else 0 end) as Held_Pallets, ,sum(case when c.Description NOT LIKE '%COA%' or x.IdMainDefect = -1 then GesperrteMengeVPKSum else 0 end) as Held_Pallets
sum(case when c.Description NOT LIKE '%COA%' or x.IdMainDefect = -1 then GesperrteMengeSum else 0 end) as Held_QTY ,sum(case when c.Description NOT LIKE '%COA%' or x.IdMainDefect = -1 then GesperrteMengeSum else 0 end) as Held_QTY
,sum(case when x.WarenLagerLagerTyp = 8 then VerfuegbareMengeSum else 0 end) as Consigment ,sum(case when x.WarenLagerLagerTyp = 8 then VerfuegbareMengeSum else 0 end) as Consigment
,IdProdPlanung as Lot ,IdProdPlanung as Lot
--,IdAdressen, ----,IdAdressen,
x.AdressBez ,x.AdressBez
--,* --,*
from [AlplaPROD_test1].dbo.[V_LagerPositionenBarcodes] (nolock) x from [AlplaPROD_test1].dbo.[V_LagerPositionenBarcodes] (nolock) x