Files
dashlibstorage/src/sql/price.js
seb 54700a145e Add article.setPricesBySku to replace POS prices for a SKU.
Gives dashback a single store call that atomically replaces all price rows for the article’s poscustomergroup.
2026-08-01 05:16:50 +02:00

12 lines
338 B
JavaScript

export const DELETE_BY_ARTICLE_AND_CUSTOMERGROUP = `
DELETE FROM price
WHERE article_id = @articleId
AND customergroup_id = @customerGroupId
`;
export const CREATE = `
INSERT INTO price (tax_id, article_id, minmultiplier, customergroup_id, net)
OUTPUT INSERTED.id
VALUES (@taxId, @articleId, @minmultiplier, @customerGroupId, @net)
`;