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.
This commit is contained in:
11
src/sql/price.js
Normal file
11
src/sql/price.js
Normal file
@@ -0,0 +1,11 @@
|
||||
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)
|
||||
`;
|
||||
Reference in New Issue
Block a user