From 397f1da595fd8a1e1c2a630a3650eb8715604c82 Mon Sep 17 00:00:00 2001 From: Blake Matthes Date: Sun, 10 Aug 2025 18:12:29 -0500 Subject: [PATCH] fix(inv query): error in improper placed , in the query --- .../sqlServer/querys/dataMart/totalINV.ts | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/server/services/sqlServer/querys/dataMart/totalINV.ts b/server/services/sqlServer/querys/dataMart/totalINV.ts index a05fd8e..2e5cf41 100644 --- a/server/services/sqlServer/querys/dataMart/totalINV.ts +++ b/server/services/sqlServer/querys/dataMart/totalINV.ts @@ -1,21 +1,22 @@ // this query pulls all the inventory except the inv locations. export const totalInvNoRn = ` -select x.idartikelVarianten as av, -ArtikelVariantenAlias as Alias, +select +x.idartikelVarianten as av, +x.ArtikelVariantenAlias as Alias --x.Lfdnr as RunningNumber, -round(sum(EinlagerungsMengeVPKSum),0) as Total_Pallets, -sum(EinlagerungsMengeSum) as Total_PalletQTY, -round(sum(VerfuegbareMengeVPKSum),0) as Avalible_Pallets, -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 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 GesperrteMengeSum else 0 end) as Held_QTY +,round(sum(EinlagerungsMengeVPKSum),0) as Total_Pallets +,sum(EinlagerungsMengeSum) as Total_PalletQTY +,round(sum(VerfuegbareMengeVPKSum),0) as Avalible_Pallets +,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 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 GesperrteMengeSum else 0 end) as Held_QTY ,sum(case when x.WarenLagerLagerTyp = 8 then VerfuegbareMengeSum else 0 end) as Consigment ,IdProdPlanung as Lot ---,IdAdressen, -x.AdressBez +----,IdAdressen, +,x.AdressBez --,* from [AlplaPROD_test1].dbo.[V_LagerPositionenBarcodes] (nolock) x