Compare commits
10 Commits
57ac7a6b8d
...
018981cf9e
| Author | SHA1 | Date | |
|---|---|---|---|
| 018981cf9e | |||
| 0f44079666 | |||
| 32d011fc98 | |||
| cf8fd9dbb9 | |||
| 1ce0e6195e | |||
| e384640add | |||
| f3bf8a93cc | |||
| f7644b3333 | |||
| 9fbea9ebc8 | |||
| 5885fe8cd2 |
@@ -35,7 +35,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"admConfig": {
|
"admConfig": {
|
||||||
"build": 348,
|
"build": 352,
|
||||||
"oldBuild": "backend-0.1.3.zip"
|
"oldBuild": "backend-0.1.3.zip"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ app.openapi(
|
|||||||
return c.json({
|
return c.json({
|
||||||
success: true,
|
success: true,
|
||||||
message: "All Current Active Querys.",
|
message: "All Current Active Querys.",
|
||||||
sheetVersion: 2.7,
|
sheetVersion: 2.8,
|
||||||
data: current,
|
data: current,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { db } from "../../../../../../../database/dbclient.js";
|
|||||||
import { settings } from "../../../../../../../database/schema/settings.js";
|
import { settings } from "../../../../../../../database/schema/settings.js";
|
||||||
import { query } from "../../../../../sqlServer/prodSqlServer.js";
|
import { query } from "../../../../../sqlServer/prodSqlServer.js";
|
||||||
import { bulkOrderArticleInfo } from "../../../../../sqlServer/querys/dm/bulkOrderArticleInfo.js";
|
import { bulkOrderArticleInfo } from "../../../../../sqlServer/querys/dm/bulkOrderArticleInfo.js";
|
||||||
import { isAfter, parse } from "date-fns";
|
import { addDays, addHours, isAfter, parse } from "date-fns";
|
||||||
import { orderState } from "../../../../../sqlServer/querys/dm/orderState.js";
|
import { orderState } from "../../../../../sqlServer/querys/dm/orderState.js";
|
||||||
import { postOrders } from "../postOrders.js";
|
import { postOrders } from "../postOrders.js";
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ export const abbottOrders = async (data: any, user: any) => {
|
|||||||
deliveryAddressId: 8,
|
deliveryAddressId: 8,
|
||||||
customerArticleNo: o.customerArticlenumber,
|
customerArticleNo: o.customerArticlenumber,
|
||||||
quantity: o.qty,
|
quantity: o.qty,
|
||||||
deliveryDate: o.date,
|
deliveryDate: addHours(addDays(o.date, 1), 1), // adding this in so we can over come the constant 1 day behind thing as a work around
|
||||||
customerLineItemNo: 1, // this is how it is currently sent over from abbott
|
customerLineItemNo: 1, // this is how it is currently sent over from abbott
|
||||||
customerReleaseNo: 1, // same as above
|
customerReleaseNo: 1, // same as above
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -5,15 +5,15 @@ export const scacCheck = async (data: any) => {
|
|||||||
"info",
|
"info",
|
||||||
"ti",
|
"ti",
|
||||||
"notify",
|
"notify",
|
||||||
`Checking if ${data[0].addressAlias} has scac: ${
|
`Checking if ${data[0].addressAlias} has remark: ${data[0].remark}`
|
||||||
data[0].remark.split(",")[0] ? "there was one" : "no scac"
|
|
||||||
}`
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const priceSheet = `
|
const priceSheet = `
|
||||||
<PriceSheets>
|
<PriceSheets>
|
||||||
<PriceSheet type="Carrier" isSelected="${
|
<PriceSheet type="Carrier" isSelected="${
|
||||||
data[0].remark.split(",")[0] ? "true" : "false"
|
data[0].remark.includes("SCAC") && data[0].remark.split(",")[0]
|
||||||
|
? "true"
|
||||||
|
: "false"
|
||||||
}">
|
}">
|
||||||
<ContractId/>
|
<ContractId/>
|
||||||
${
|
${
|
||||||
@@ -21,7 +21,7 @@ export const scacCheck = async (data: any) => {
|
|||||||
? `<SCAC>${data[0].remark
|
? `<SCAC>${data[0].remark
|
||||||
.split(",")[0]
|
.split(",")[0]
|
||||||
.split(":")[1]
|
.split(":")[1]
|
||||||
.toUpperCase()}</SCAC>`
|
?.toUpperCase()}</SCAC>`
|
||||||
: `<SCAC/>`
|
: `<SCAC/>`
|
||||||
}
|
}
|
||||||
<Mode/>
|
<Mode/>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { printerData } from "../../../../../database/schema/printers.js";
|
|||||||
|
|
||||||
export const getPrinters = async () => {
|
export const getPrinters = async () => {
|
||||||
const { data: printers, error: printerError } = await tryCatch(
|
const { data: printers, error: printerError } = await tryCatch(
|
||||||
db.select().from(printerData)
|
db.select().from(printerData).orderBy(printerData.name)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (printerError) {
|
if (printerError) {
|
||||||
|
|||||||
34
server/services/sqlServer/querys/dataMart/pastBOLInfo.ts
Normal file
34
server/services/sqlServer/querys/dataMart/pastBOLInfo.ts
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
const pastBOLInfo = `
|
||||||
|
select (select wert from dbo.T_SystemParameter where Bezeichnung = 'Werkskuerzel') as Plant,
|
||||||
|
AuftragsNummer as OrderNumber,
|
||||||
|
PositionsNummer as CustomerLineNumber,
|
||||||
|
AbrufNummer as CustomerReleaseNumber,
|
||||||
|
CONVERT(date, AbrufLiefertermin) as DeliveryDate,
|
||||||
|
CONVERT(DATE,JournalDatum) Bol_PrintDate,
|
||||||
|
AbrufMenge AS OrderQuantity,
|
||||||
|
AbrufMengeVPK as OrderPallets,
|
||||||
|
GelieferteMenge AS DeliveredQTY,
|
||||||
|
GelieferteMengeVPK as DeliverdPallets,
|
||||||
|
JournalNummer as BOLNum,
|
||||||
|
ProdArtikelBez AS ProductFamily,
|
||||||
|
dbo.V_LadePlanungenLadeAuftragAbruf.AbrufIdKundenAdresse AS IdCustomer,
|
||||||
|
dbo.V_LadePlanungenLadeAuftragAbruf.AdressBez AS CustName,
|
||||||
|
dbo.T_EAIJournal.IdJournalStatus as bolStatus,
|
||||||
|
dbo.V_TrackerAuftragsAbrufe.IdArtikelvarianten as av,
|
||||||
|
dbo.V_TrackerAuftragsAbrufe.ArtikelVariantenAlias as alias,
|
||||||
|
ladeauftragidstapler as remark
|
||||||
|
--,*
|
||||||
|
from dbo.V_TrackerAuftragsAbrufe (nolock)
|
||||||
|
left join
|
||||||
|
dbo.V_LadePlanungenLadeAuftragAbruf on V_TrackerAuftragsAbrufe.IdAuftragsAbruf =
|
||||||
|
dbo.V_LadePlanungenLadeAuftragAbruf.AbrufIdAuftragsAbruf
|
||||||
|
left join
|
||||||
|
dbo.T_EAIJournal on dbo.V_LadePlanungenLadeAuftragAbruf.IdLadeAuftrag =
|
||||||
|
dbo.T_EAIJournal.IdLadeAuftrag
|
||||||
|
|
||||||
|
left join
|
||||||
|
dbo.V_ArtikelKomplett on V_TrackerAuftragsAbrufe.IdArtikelVarianten =
|
||||||
|
dbo.V_ArtikelKomplett.IdArtikelvarianten
|
||||||
|
where GelieferteMengeVPK > 0 and CONVERT(date, AbrufLiefertermin) between '2025-05-10' and '2025-05-20'
|
||||||
|
order by AbrufLiefertermin
|
||||||
|
`;
|
||||||
@@ -20,8 +20,8 @@ on x.IdLieferkondition = c.IdLieferkondition
|
|||||||
on b.IdAdresse = x.addressID
|
on b.IdAdresse = x.addressID
|
||||||
|
|
||||||
WHERE AbrufStatus = 1 and
|
WHERE AbrufStatus = 1 and
|
||||||
--AbrufLiefertermin between DATEADD(HOUR, -15, GETDATE()) and DATEADD(HOUR, 36, GETDATE()) -- this number will be grabbed from the db with a default of 24hours
|
--AbrufLiefertermin between DATEADD(HOUR, -[from], getdate()) and DATEADD(HOUR, [to], GETDATE()) -- this number will be grabbed from the db with a default of 24hours
|
||||||
AbrufLadeDatum between DATEADD(HOUR, -15, GETDATE()) and DATEADD(HOUR, 36, GETDATE()) -- this number will be grabbed from the db with a default of 24hours
|
AbrufLadeDatum between DATEADD(HOUR, -[from], getdate()) and DATEADD(HOUR, [to], GETDATE()) -- this number will be grabbed from the db with a default of 24hours
|
||||||
and x.Abbreviation not in ('exw')
|
and x.Abbreviation not in ('exw')
|
||||||
and IdAuftragsAbruf not in ([exclude])
|
and IdAuftragsAbruf not in ([exclude])
|
||||||
`;
|
`;
|
||||||
|
|||||||
Reference in New Issue
Block a user