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

@@ -18,7 +18,7 @@ Creates a new shipment manifest for an order. Validates that all article positio
*Source: `src/store/shipment/delete.js`*
Deletes a shipment manifest of the selected company. Shipped shipments (with packages in 'shipped' state) cannot be deleted.
Deletes or cancels a shipment manifest of the selected company. - If no ledger rows exist: physically deletes the shipment manifest. - If ledger rows exist: reverses the ledger entries (storno document entry + warehouse stock adjustment), marks the shipment as 'cancelled' in shipmentsummary, and updates the parent order's summary. - Shipped shipments (with packages in 'shipped' state) cannot be deleted.
**Parameters**
@@ -53,7 +53,8 @@ Lists the shipments of the user's selected company.
| `[opts.offset=0]` | `number` | Number of shipments to skip. |
| `[opts.limit=50]` | `number` | Number of shipments to return. |
| `[opts.search]` | `string` | Free-text search matching shipment number, order number, external number, tracking code, or customer name. |
| `[opts.state]` | `'new'|'delivered'|'returned'` | Filter by delivery state. |
| `[opts.state]` | `'new'|'delivered'|'returned'|'cancelled'|'all'` | Filter by delivery state. |
| `[opts.includeCancelled=false]` | `boolean` | Whether to include cancelled shipments when state is not set. |
| `[opts.seekMonths]` | `number` | Negative integer for cutoff months ago (e.g. -1). |
| `[opts.orderId]` | `number` | Optional filter for parent order manifest id. |
| `[tx]` | `object` | Optional transaction. |