This commit is contained in:
seb
2026-10-07 21:23:03 +02:00
parent e02bbd65c5
commit 36dd81ee69
7 changed files with 170 additions and 91 deletions

View File

@@ -548,7 +548,7 @@ Replaces the price list of an article by its SKU.
| --- | --- | --- |
| `googleAuthId` | `number` | The id of the Google auth user. |
| `sku` | `string` | The article SKU. |
| `prices` | `Array<{price: number, tax: number, minmultiplier?: number}>` | The price entries (minmultiplier defaults to 1). |
| `prices` | `Array<{net?: number, gross?: number, price?: number, taxRate?: number, tax?: number, minmultiplier?: number}>` | The price entries (net or gross, taxRate or tax percentage, minmultiplier defaults to 1). |
| `[tx]` | `object` | Optional transaction to run within. |
**Returns**
@@ -562,7 +562,9 @@ Replaces the price list of an article by its SKU.
**Example**
```js
const article = await store.article.setPricesBySku(42, 'SKU-1', [{ price: 1.5, tax: 19, minmultiplier: 1 }]);
const article = await store.article.setPricesBySku(42, 'SKU-1', [{ net: 10.0, taxRate: 19, minmultiplier: 1 }]);
// or with gross:
const article = await store.article.setPricesBySku(42, 'SKU-1', [{ gross: 11.9, taxRate: 19 }]);
// => { id, sku, name, ... }
```