u
This commit is contained in:
@@ -16,18 +16,18 @@ Creates a new order for the user's selected company with its lines and records a
|
||||
| `body` | `object` | The order input. |
|
||||
| `body.number` | `string` | The order number. |
|
||||
| `body.date` | `string` | The order date. |
|
||||
| `[body.entityId]` | `number` | The id of the customer entity. |
|
||||
| `body.entityId` | `number` | The id of the customer entity. |
|
||||
| `[body.externalNumber]` | `string` | An external (customer) reference number. |
|
||||
| `[body.lines]` | `Array<{sku?: string, name?: string, pu?: number, amount: number, net: number, rebate?: number, taxrate: number, comment?: string|null}>` | The order lines. |
|
||||
| `[tx]` | `object` | Optional transaction to run within. |
|
||||
|
||||
**Returns**
|
||||
|
||||
`Promise<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string, lines: Array<{id: number, sku: string|null, name: string|null, pu: number, amount: number, net: number, rebate: number, taxrate: number, comment: string|null}>}>` — The created order.
|
||||
`Promise<{id: number, number: string, type: string, entityId: number, externalNumber: string|null, date: string, lines: Array<{id: number, sku: string|null, name: string|null, pu: number, amount: number, net: number, rebate: number, taxrate: number, comment: string|null}>}>` — The created order.
|
||||
|
||||
**Throws**
|
||||
|
||||
`Error` — If the order is invalid.
|
||||
`Error` — If the order is invalid, no entity is selected, or entity not found.
|
||||
|
||||
**Example**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user