This commit is contained in:
seb
2026-10-30 15:43:28 +01:00
parent 0fdffb864f
commit a4718d81c0
5 changed files with 32 additions and 0 deletions

View File

@@ -29,6 +29,8 @@ export const ARTICLE_LIST_COLUMNS = `
a.sku,
at.name,
at.slug,
ISNULL(LEN(at.[desc]), 0) AS descLength,
at.seo AS seo,
pr.net,
t.rate AS taxRate,
a.track_stock,

View File

@@ -82,6 +82,16 @@ WHERE ca.category_id = @categoryId
ORDER BY w.sort ASC, w.name ASC, aws.id ASC
`;
export const GET_CATEGORY_ARTICLE_EANS = `
SELECT
ae.article_id AS articleId,
ae.ean
FROM articleean ae
INNER JOIN categoryarticle ca ON ca.article_id = ae.article_id
WHERE ca.category_id = @categoryId
ORDER BY ae.ean ASC
`;
export const CREATE = `
INSERT INTO category (parent_id, sort)
OUTPUT INSERTED.id, INSERTED.parent_id AS parentId, INSERTED.sort