This commit is contained in:
seb
2026-10-20 05:33:11 +02:00
parent 5cb38874ca
commit bcefd81af7
23 changed files with 514 additions and 150 deletions

View File

@@ -76,7 +76,7 @@ const order = await store.order.createFromQuote(42, 10);
*Source: `src/store/order/createShipment.js`*
Creates a new shipment manifest for an order. Can contain one, some, or all items from the parent order. If lines is omitted or empty, all remaining unshipped items are included.
Creates a new shipment manifest for an order. Can contain specified items from the parent order.
**Parameters**
@@ -84,8 +84,8 @@ Creates a new shipment manifest for an order. Can contain one, some, or all item
| --- | --- | --- |
| `googleAuthId` | `number` | The id of the Google auth user. |
| `orderId` | `number` | The parent order manifest id. |
| `[input]` | `object` | Optional overrides. |
| `[input.lines]` | `Array<{sku: string, amount?: number, name?: string, pu?: number, net?: number, rebate?: number, taxrate?: number, comment?: string}>` | Positions (defaults to all remaining items). |
| `input` | `object` | Shipment input. |
| `input.lines` | `Array<{sku: string, amount?: number, name?: string, pu?: number, net?: number, rebate?: number, taxrate?: number, comment?: string}>` | Positions to ship. |
| `[input.date]` | `string|Date` | Optional shipment date. |
| `[input.externalNumber]` | `string` | Optional external delivery reference. |
| `[tx]` | `object` | Optional transaction. |
@@ -97,7 +97,7 @@ Creates a new shipment manifest for an order. Can contain one, some, or all item
**Example**
```js
const shipment = await store.order.createShipment(googleAuthId, 10);
const shipment = await store.order.createShipment(googleAuthId, 10, { lines: [{ sku: 'ITEM-A', amount: 5 }] });
```
## `order.delete`