Compare commits

...

2 Commits

Author SHA1 Message Date
seb
b922229687 barcode 2026-07-16 10:00:17 +02:00
seb
886830cd83 u 2026-07-15 23:40:17 +02:00
7 changed files with 16267 additions and 4 deletions

1
.gitignore vendored
View File

@@ -7,3 +7,4 @@ decompiledReference
scripts/s3-backup/data/
scripts/s3-backup/tmp/
scripts/s3-backup/certs/
scripts/minimal-db/data/

View File

@@ -29,7 +29,8 @@ static const char* PRODUCT_LIST_SQL =
"a.nIstVater AS isParent, a.kVaterArtikel AS parentArticleId, "
"CASE WHEN a.kStueckliste <> 0 THEN '1' ELSE '0' END AS isCompositeProduct, "
"(SELECT TOP 1 pv.cVariantName FROM Pos.vProductVariant pv "
"WHERE pv.kProduct = a.kArtikel) AS variantName "
"WHERE pv.kProduct = a.kArtikel) AS variantName, "
"a.cBarcode AS barcode "
"FROM dbo.tArtikel a "
"INNER JOIN dbo.tArtikelBeschreibung ab ON ab.kArtikel = a.kArtikel AND ab.kSprache = ? "
"LEFT JOIN TaxRates tr ON tr.kSteuerklasse = a.kSteuerklasse "
@@ -127,7 +128,7 @@ inline nlohmann::json get_product_list(int64_t cursor, int limit) {
{"d_price", "0.0"},
{"tax_rate2", ""},
{"use_in_out_tax", "0"},
{"barcode", nullptr},
{"barcode", row[13].str.empty() ? nullptr : nlohmann::json(row[13].str)},
{"use_stock", "0"},
{"q_div", "0"},
{"quantity", "0"},

View File

@@ -10,6 +10,8 @@
"cert": "node generate-cert.js",
"backup:s3": "node scripts/s3-backup/backup.mjs",
"backup:s3:quick": "node scripts/s3-backup/backup.mjs --skip-trust",
"db:minimal": "node scripts/create-minimal-db.mjs",
"db:minimal:extract": "node scripts/create-minimal-db.mjs extract",
"start": "node --watch server.js",
"test:client": "node test-client.js"
},

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,184 @@
{
"version": 1,
"extractedAt": "2026-07-15T21:37:45.653Z",
"source": "eazybusiness",
"tableCount": 43,
"indexCount": 158,
"triggerCount": 77,
"typeCount": 11,
"rowCount": 9575,
"tables": [
{
"schema": "dbo",
"table": "tArtikel"
},
{
"schema": "dbo",
"table": "tArtikelAttribut"
},
{
"schema": "dbo",
"table": "tArtikelAttributSprache"
},
{
"schema": "dbo",
"table": "tArtikelBeschreibung"
},
{
"schema": "dbo",
"table": "tArtikelbildPlattform"
},
{
"schema": "dbo",
"table": "tAttribut"
},
{
"schema": "dbo",
"table": "tAttributSprache"
},
{
"schema": "dbo",
"table": "tBild"
},
{
"schema": "dbo",
"table": "tFirmaHistory"
},
{
"schema": "dbo",
"table": "tKategorie"
},
{
"schema": "dbo",
"table": "tKategorieArtikel"
},
{
"schema": "dbo",
"table": "tKategorieShop"
},
{
"schema": "dbo",
"table": "tKategorieSprache"
},
{
"schema": "dbo",
"table": "tKategoriebildPlattform"
},
{
"schema": "dbo",
"table": "tKunde"
},
{
"schema": "dbo",
"table": "tKundenGruppe"
},
{
"schema": "dbo",
"table": "tLaufendeNummern"
},
{
"schema": "dbo",
"table": "tLieferschein"
},
{
"schema": "dbo",
"table": "tPickliste"
},
{
"schema": "dbo",
"table": "tPicklistePos"
},
{
"schema": "dbo",
"table": "tPlattform"
},
{
"schema": "dbo",
"table": "tPreis"
},
{
"schema": "dbo",
"table": "tPreisDetail"
},
{
"schema": "dbo",
"table": "tSessionId"
},
{
"schema": "dbo",
"table": "tShop"
},
{
"schema": "dbo",
"table": "tShopSubshop"
},
{
"schema": "dbo",
"table": "tSteuersatz"
},
{
"schema": "dbo",
"table": "tSteuerzone"
},
{
"schema": "dbo",
"table": "tStueckliste"
},
{
"schema": "dbo",
"table": "tVersand"
},
{
"schema": "dbo",
"table": "tVersandArt"
},
{
"schema": "dbo",
"table": "tWarenLager"
},
{
"schema": "dbo",
"table": "tWarenLagerPlatz"
},
{
"schema": "dbo",
"table": "tZahlung"
},
{
"schema": "dbo",
"table": "tZahlungsArtSprache"
},
{
"schema": "dbo",
"table": "tZahlungsart"
},
{
"schema": "dbo",
"table": "tpk"
},
{
"schema": "Pos",
"table": "tAuftragMapping"
},
{
"schema": "Pos",
"table": "tAuftragPositionMapping"
},
{
"schema": "Verkauf",
"table": "tAuftrag"
},
{
"schema": "Verkauf",
"table": "tAuftragAdresse"
},
{
"schema": "Verkauf",
"table": "tAuftragEckdaten"
},
{
"schema": "Verkauf",
"table": "tAuftragPosition"
}
]
}

View File

@@ -50,7 +50,8 @@ SELECT TOP (@limit)
SELECT TOP 1 pv.cVariantName
FROM Pos.vProductVariant pv
WHERE pv.kProduct = a.kArtikel
) AS variantName
) AS variantName,
a.cBarcode AS barcode
FROM dbo.tArtikel a
INNER JOIN dbo.tArtikelBeschreibung ab ON ab.kArtikel = a.kArtikel AND ab.kSprache = @languageId
LEFT JOIN TaxRates tr ON tr.kSteuerklasse = a.kSteuerklasse
@@ -149,6 +150,7 @@ export async function getProductList({ cursor = 0, limit = 20 } = {}) {
imghash: product.imgHash ?? null,
imgsrc: product.imgHash ?? null,
sku: product.sku,
barcode: product.barcode ?? null,
name: product.name,
tax_rate: String(Math.round(Number(product.taxRate || 0))),
price: basePrice,