feat(manifest): add externalNumber reference to quote/order/delivery
- Add `external_number NVARCHAR(100)` column to the `manifest` table. - Thread `externalNumber` through manifestDoc and delivery SQL (list, header, create, update). - Include `externalNumber` in shapeSummary and quote/order/delivery create/update/list/getById handlers (optional, clearable on update). - Update README type definitions and regenerate API/schema docs.
This commit is contained in:
@@ -17,11 +17,12 @@ Creates a new delivery for the user's selected company with its lines.
|
|||||||
| `body.number` | `string` | The delivery number. |
|
| `body.number` | `string` | The delivery number. |
|
||||||
| `body.date` | `string` | The delivery date. |
|
| `body.date` | `string` | The delivery date. |
|
||||||
| `body.supplierId` | `number` | The id of the supplier. |
|
| `body.supplierId` | `number` | The id of the supplier. |
|
||||||
|
| `[body.externalNumber]` | `string` | An external (supplier) reference number. |
|
||||||
| `[body.lines]` | `Array<object>` | The delivery lines. |
|
| `[body.lines]` | `Array<object>` | The delivery lines. |
|
||||||
|
|
||||||
**Returns**
|
**Returns**
|
||||||
|
|
||||||
`Promise<{id: number, number: string, type: string, entityId: number, date: string, lines: Array<object>}>` — The created delivery.
|
`Promise<{id: number, number: string, type: string, entityId: number, externalNumber: string|null, date: string, lines: Array<object>}>` — The created delivery.
|
||||||
|
|
||||||
**Throws**
|
**Throws**
|
||||||
|
|
||||||
@@ -31,7 +32,7 @@ Creates a new delivery for the user's selected company with its lines.
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
const delivery = await store.delivery.create(42, { number: 'D-1', date: '2026-01-01', supplierId: 5, lines: [...] });
|
const delivery = await store.delivery.create(42, { number: 'D-1', date: '2026-01-01', supplierId: 5, lines: [...] });
|
||||||
// => { id, number, type, entityId, date, lines: [...] }
|
// => { id, number, type, entityId, externalNumber, date, lines: [...] }
|
||||||
```
|
```
|
||||||
|
|
||||||
## `delivery.delete`
|
## `delivery.delete`
|
||||||
@@ -76,7 +77,7 @@ Returns a single delivery by its id within the user's selected company.
|
|||||||
|
|
||||||
**Returns**
|
**Returns**
|
||||||
|
|
||||||
`Promise<{id: number, number: string, type: string, entityId: number, date: string, lines: Array<object>}>` — The delivery.
|
`Promise<{id: number, number: string, type: string, entityId: number, externalNumber: string|null, date: string, lines: Array<object>}>` — The delivery.
|
||||||
|
|
||||||
**Throws**
|
**Throws**
|
||||||
|
|
||||||
@@ -86,7 +87,7 @@ Returns a single delivery by its id within the user's selected company.
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
const delivery = await store.delivery.getById(42, 5);
|
const delivery = await store.delivery.getById(42, 5);
|
||||||
// => { id, number, type, entityId, date, lines: [...] }
|
// => { id, number, type, entityId, externalNumber, date, lines: [...] }
|
||||||
```
|
```
|
||||||
|
|
||||||
## `delivery.list`
|
## `delivery.list`
|
||||||
@@ -103,13 +104,13 @@ Lists the deliveries of the user's selected company.
|
|||||||
|
|
||||||
**Returns**
|
**Returns**
|
||||||
|
|
||||||
`Promise<Array<{id: number, number: string, type: string, entityId: number, date: string}>>` — The deliveries.
|
`Promise<Array<{id: number, number: string, type: string, entityId: number, externalNumber: string|null, date: string}>>` — The deliveries.
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const deliveries = await store.delivery.list(42);
|
const deliveries = await store.delivery.list(42);
|
||||||
// => [{ id, number, type, entityId, date }]
|
// => [{ id, number, type, entityId, externalNumber, date }]
|
||||||
```
|
```
|
||||||
|
|
||||||
## `delivery.update`
|
## `delivery.update`
|
||||||
@@ -128,11 +129,12 @@ Updates a delivery's header and/or lines.
|
|||||||
| `[patch.number]` | `string` | The new delivery number. |
|
| `[patch.number]` | `string` | The new delivery number. |
|
||||||
| `[patch.date]` | `string` | The new delivery date. |
|
| `[patch.date]` | `string` | The new delivery date. |
|
||||||
| `[patch.supplierId]` | `number` | The new supplier id. |
|
| `[patch.supplierId]` | `number` | The new supplier id. |
|
||||||
|
| `[patch.externalNumber]` | `string` | The new external (supplier) reference number. |
|
||||||
| `[patch.lines]` | `Array<object>` | The new delivery lines. |
|
| `[patch.lines]` | `Array<object>` | The new delivery lines. |
|
||||||
|
|
||||||
**Returns**
|
**Returns**
|
||||||
|
|
||||||
`Promise<{id: number, number: string, type: string, entityId: number, date: string, lines: Array<object>}>` — The updated delivery.
|
`Promise<{id: number, number: string, type: string, entityId: number, externalNumber: string|null, date: string, lines: Array<object>}>` — The updated delivery.
|
||||||
|
|
||||||
**Throws**
|
**Throws**
|
||||||
|
|
||||||
|
|||||||
16
API.order.md
16
API.order.md
@@ -17,11 +17,12 @@ Creates a new order for the user's selected company with its lines.
|
|||||||
| `body.number` | `string` | The order number. |
|
| `body.number` | `string` | The order number. |
|
||||||
| `body.date` | `string` | The order date. |
|
| `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<object>` | The order lines. |
|
| `[body.lines]` | `Array<object>` | The order lines. |
|
||||||
|
|
||||||
**Returns**
|
**Returns**
|
||||||
|
|
||||||
`Promise<{id: number, number: string, type: string, entityId: number|null, date: string, lines: Array<object>}>` — The created order.
|
`Promise<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string, lines: Array<object>}>` — The created order.
|
||||||
|
|
||||||
**Throws**
|
**Throws**
|
||||||
|
|
||||||
@@ -31,7 +32,7 @@ Creates a new order for the user's selected company with its lines.
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
const order = await store.order.create(42, { number: 'B-2026-001', date: '2026-09-15', entityId: 12, lines: [...] });
|
const order = await store.order.create(42, { number: 'B-2026-001', date: '2026-09-15', entityId: 12, lines: [...] });
|
||||||
// => { id, number, type, entityId, date, lines: [...] }
|
// => { id, number, type, entityId, externalNumber, date, lines: [...] }
|
||||||
```
|
```
|
||||||
|
|
||||||
## `order.delete`
|
## `order.delete`
|
||||||
@@ -76,7 +77,7 @@ Returns a single order by its id within the user's selected company.
|
|||||||
|
|
||||||
**Returns**
|
**Returns**
|
||||||
|
|
||||||
`Promise<{id: number, number: string, type: string, entityId: number|null, date: string, lines: Array<object>}>` — The order with its lines.
|
`Promise<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string, lines: Array<object>}>` — The order with its lines.
|
||||||
|
|
||||||
**Throws**
|
**Throws**
|
||||||
|
|
||||||
@@ -86,7 +87,7 @@ Returns a single order by its id within the user's selected company.
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
const order = await store.order.getById(42, 5);
|
const order = await store.order.getById(42, 5);
|
||||||
// => { id, number, type, entityId, date, lines: [...] }
|
// => { id, number, type, entityId, externalNumber, date, lines: [...] }
|
||||||
```
|
```
|
||||||
|
|
||||||
## `order.list`
|
## `order.list`
|
||||||
@@ -103,13 +104,13 @@ Lists the orders of the user's selected company.
|
|||||||
|
|
||||||
**Returns**
|
**Returns**
|
||||||
|
|
||||||
`Promise<Array<{id: number, number: string, type: string, entityId: number|null, date: string}>>` — The orders.
|
`Promise<Array<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string}>>` — The orders.
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const orders = await store.order.list(42);
|
const orders = await store.order.list(42);
|
||||||
// => [{ id, number, type, entityId, date }]
|
// => [{ id, number, type, entityId, externalNumber, date }]
|
||||||
```
|
```
|
||||||
|
|
||||||
## `order.update`
|
## `order.update`
|
||||||
@@ -128,11 +129,12 @@ Updates an order's header and/or lines.
|
|||||||
| `[patch.number]` | `string` | The new order number. |
|
| `[patch.number]` | `string` | The new order number. |
|
||||||
| `[patch.date]` | `string` | The new order date. |
|
| `[patch.date]` | `string` | The new order date. |
|
||||||
| `[patch.entityId]` | `number` | The new customer entity id. |
|
| `[patch.entityId]` | `number` | The new customer entity id. |
|
||||||
|
| `[patch.externalNumber]` | `string` | The new external (customer) reference number. |
|
||||||
| `[patch.lines]` | `Array<object>` | The new order lines. |
|
| `[patch.lines]` | `Array<object>` | The new order lines. |
|
||||||
|
|
||||||
**Returns**
|
**Returns**
|
||||||
|
|
||||||
`Promise<{id: number, number: string, type: string, entityId: number|null, date: string, lines: Array<object>}>` — The updated order.
|
`Promise<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string, lines: Array<object>}>` — The updated order.
|
||||||
|
|
||||||
**Throws**
|
**Throws**
|
||||||
|
|
||||||
|
|||||||
16
API.quote.md
16
API.quote.md
@@ -17,11 +17,12 @@ Creates a new quote for the user's selected company with its lines.
|
|||||||
| `body.number` | `string` | The quote number. |
|
| `body.number` | `string` | The quote number. |
|
||||||
| `body.date` | `string` | The quote date. |
|
| `body.date` | `string` | The quote 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<object>` | The quote lines. |
|
| `[body.lines]` | `Array<object>` | The quote lines. |
|
||||||
|
|
||||||
**Returns**
|
**Returns**
|
||||||
|
|
||||||
`Promise<{id: number, number: string, type: string, entityId: number|null, date: string, lines: Array<object>}>` — The created quote.
|
`Promise<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string, lines: Array<object>}>` — The created quote.
|
||||||
|
|
||||||
**Throws**
|
**Throws**
|
||||||
|
|
||||||
@@ -31,7 +32,7 @@ Creates a new quote for the user's selected company with its lines.
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
const quote = await store.quote.create(42, { number: 'A-2026-001', date: '2026-09-01', entityId: 12, lines: [...] });
|
const quote = await store.quote.create(42, { number: 'A-2026-001', date: '2026-09-01', entityId: 12, lines: [...] });
|
||||||
// => { id, number, type, entityId, date, lines: [...] }
|
// => { id, number, type, entityId, externalNumber, date, lines: [...] }
|
||||||
```
|
```
|
||||||
|
|
||||||
## `quote.delete`
|
## `quote.delete`
|
||||||
@@ -76,7 +77,7 @@ Returns a single quote by its id within the user's selected company.
|
|||||||
|
|
||||||
**Returns**
|
**Returns**
|
||||||
|
|
||||||
`Promise<{id: number, number: string, type: string, entityId: number|null, date: string, lines: Array<object>}>` — The quote with its lines.
|
`Promise<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string, lines: Array<object>}>` — The quote with its lines.
|
||||||
|
|
||||||
**Throws**
|
**Throws**
|
||||||
|
|
||||||
@@ -86,7 +87,7 @@ Returns a single quote by its id within the user's selected company.
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
const quote = await store.quote.getById(42, 5);
|
const quote = await store.quote.getById(42, 5);
|
||||||
// => { id, number, type, entityId, date, lines: [...] }
|
// => { id, number, type, entityId, externalNumber, date, lines: [...] }
|
||||||
```
|
```
|
||||||
|
|
||||||
## `quote.list`
|
## `quote.list`
|
||||||
@@ -103,13 +104,13 @@ Lists the quotes of the user's selected company.
|
|||||||
|
|
||||||
**Returns**
|
**Returns**
|
||||||
|
|
||||||
`Promise<Array<{id: number, number: string, type: string, entityId: number|null, date: string}>>` — The quotes.
|
`Promise<Array<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string}>>` — The quotes.
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const quotes = await store.quote.list(42);
|
const quotes = await store.quote.list(42);
|
||||||
// => [{ id, number, type, entityId, date }]
|
// => [{ id, number, type, entityId, externalNumber, date }]
|
||||||
```
|
```
|
||||||
|
|
||||||
## `quote.update`
|
## `quote.update`
|
||||||
@@ -128,11 +129,12 @@ Updates a quote's header and/or lines.
|
|||||||
| `[patch.number]` | `string` | The new quote number. |
|
| `[patch.number]` | `string` | The new quote number. |
|
||||||
| `[patch.date]` | `string` | The new quote date. |
|
| `[patch.date]` | `string` | The new quote date. |
|
||||||
| `[patch.entityId]` | `number` | The new customer entity id. |
|
| `[patch.entityId]` | `number` | The new customer entity id. |
|
||||||
|
| `[patch.externalNumber]` | `string` | The new external (customer) reference number. |
|
||||||
| `[patch.lines]` | `Array<object>` | The new quote lines. |
|
| `[patch.lines]` | `Array<object>` | The new quote lines. |
|
||||||
|
|
||||||
**Returns**
|
**Returns**
|
||||||
|
|
||||||
`Promise<{id: number, number: string, type: string, entityId: number|null, date: string, lines: Array<object>}>` — The updated quote.
|
`Promise<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string, lines: Array<object>}>` — The updated quote.
|
||||||
|
|
||||||
**Throws**
|
**Throws**
|
||||||
|
|
||||||
|
|||||||
15
README.md
15
README.md
@@ -293,8 +293,8 @@ Company-scoped goods receipts on `manifest` / `manifestarticle` with fixed `type
|
|||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| `list` | `(googleAuthId)` | `DeliverySummary[]` |
|
| `list` | `(googleAuthId)` | `DeliverySummary[]` |
|
||||||
| `getById` | `(googleAuthId, id)` | `Delivery` |
|
| `getById` | `(googleAuthId, id)` | `Delivery` |
|
||||||
| `create` | `(googleAuthId, { number, date, supplierId?, lines })` | `Delivery` |
|
| `create` | `(googleAuthId, { number, date, supplierId?, externalNumber?, lines })` | `Delivery` |
|
||||||
| `update` | `(googleAuthId, id, { number?, date?, supplierId?, lines? })` | `Delivery` |
|
| `update` | `(googleAuthId, id, { number?, date?, supplierId?, externalNumber?, lines? })` | `Delivery` |
|
||||||
| `delete` | `(googleAuthId, id)` | `void` |
|
| `delete` | `(googleAuthId, id)` | `void` |
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
@@ -303,6 +303,7 @@ type DeliverySummary = {
|
|||||||
number: string,
|
number: string,
|
||||||
type: 'delivery',
|
type: 'delivery',
|
||||||
supplierId: number | null, // manifest.entity_id
|
supplierId: number | null, // manifest.entity_id
|
||||||
|
externalNumber: string | null, // manifest.external_number
|
||||||
date: Date,
|
date: Date,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -336,8 +337,8 @@ Company-scoped quotes on `manifest` / `manifestarticle` with fixed `type = 'quot
|
|||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| `list` | `(googleAuthId)` | `QuoteSummary[]` |
|
| `list` | `(googleAuthId)` | `QuoteSummary[]` |
|
||||||
| `getById` | `(googleAuthId, id)` | `Quote` |
|
| `getById` | `(googleAuthId, id)` | `Quote` |
|
||||||
| `create` | `(googleAuthId, { number, date, entityId?, lines })` | `Quote` |
|
| `create` | `(googleAuthId, { number, date, entityId?, externalNumber?, lines })` | `Quote` |
|
||||||
| `update` | `(googleAuthId, id, { number?, date?, entityId?, lines? })` | `Quote` |
|
| `update` | `(googleAuthId, id, { number?, date?, entityId?, externalNumber?, lines? })` | `Quote` |
|
||||||
| `delete` | `(googleAuthId, id)` | `void` |
|
| `delete` | `(googleAuthId, id)` | `void` |
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
@@ -346,6 +347,7 @@ type QuoteSummary = {
|
|||||||
number: string,
|
number: string,
|
||||||
type: 'quote',
|
type: 'quote',
|
||||||
entityId: number | null, // manifest.entity_id — customer
|
entityId: number | null, // manifest.entity_id — customer
|
||||||
|
externalNumber: string | null, // manifest.external_number
|
||||||
date: Date,
|
date: Date,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -377,8 +379,8 @@ Company-scoped orders on `manifest` / `manifestarticle` with fixed `type = 'orde
|
|||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| `list` | `(googleAuthId)` | `OrderSummary[]` |
|
| `list` | `(googleAuthId)` | `OrderSummary[]` |
|
||||||
| `getById` | `(googleAuthId, id)` | `Order` |
|
| `getById` | `(googleAuthId, id)` | `Order` |
|
||||||
| `create` | `(googleAuthId, { number, date, entityId?, lines })` | `Order` |
|
| `create` | `(googleAuthId, { number, date, entityId?, externalNumber?, lines })` | `Order` |
|
||||||
| `update` | `(googleAuthId, id, { number?, date?, entityId?, lines? })` | `Order` |
|
| `update` | `(googleAuthId, id, { number?, date?, entityId?, externalNumber?, lines? })` | `Order` |
|
||||||
| `delete` | `(googleAuthId, id)` | `void` |
|
| `delete` | `(googleAuthId, id)` | `void` |
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
@@ -387,6 +389,7 @@ type OrderSummary = {
|
|||||||
number: string,
|
number: string,
|
||||||
type: 'order',
|
type: 'order',
|
||||||
entityId: number | null,
|
entityId: number | null,
|
||||||
|
externalNumber: string | null, // manifest.external_number
|
||||||
date: Date,
|
date: Date,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ digraph schema {
|
|||||||
fontcolor="#1a365d"; margin=14;
|
fontcolor="#1a365d"; margin=14;
|
||||||
ledger [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4" COLOR="#a0aec0"><TR><TD COLSPAN="2" BGCOLOR="#bee3f8" ALIGN="CENTER" CELLPADDING="4" BORDER="1"><FONT COLOR="#1a365d" POINT-SIZE="12"><B>ledger</B></FONT></TD></TR><TR><TD PORT="id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>PK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="manifestarticle_id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>manifestarticle_id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>FK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="transaction_type" COLSPAN="2" BGCOLOR="#ffffff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">transaction_type</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">NVARCHAR(100)</FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="amount" COLSPAN="2" BGCOLOR="#f7fafc" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">amount</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">FLOAT</FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="transaction_text" COLSPAN="2" BGCOLOR="#ffffff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">transaction_text</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">NVARCHAR(MAX)</FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="hash_version" COLSPAN="2" BGCOLOR="#f7fafc" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">hash_version</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT</FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="prev_hash" COLSPAN="2" BGCOLOR="#ffffff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">prev_hash?</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">NVARCHAR(128)</FONT></TD></TR></TABLE></TD></TR></TABLE>>];
|
ledger [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4" COLOR="#a0aec0"><TR><TD COLSPAN="2" BGCOLOR="#bee3f8" ALIGN="CENTER" CELLPADDING="4" BORDER="1"><FONT COLOR="#1a365d" POINT-SIZE="12"><B>ledger</B></FONT></TD></TR><TR><TD PORT="id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>PK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="manifestarticle_id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>manifestarticle_id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>FK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="transaction_type" COLSPAN="2" BGCOLOR="#ffffff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">transaction_type</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">NVARCHAR(100)</FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="amount" COLSPAN="2" BGCOLOR="#f7fafc" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">amount</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">FLOAT</FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="transaction_text" COLSPAN="2" BGCOLOR="#ffffff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">transaction_text</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">NVARCHAR(MAX)</FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="hash_version" COLSPAN="2" BGCOLOR="#f7fafc" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">hash_version</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT</FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="prev_hash" COLSPAN="2" BGCOLOR="#ffffff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">prev_hash?</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">NVARCHAR(128)</FONT></TD></TR></TABLE></TD></TR></TABLE>>];
|
||||||
manifestarticle [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4" COLOR="#a0aec0"><TR><TD COLSPAN="2" BGCOLOR="#bee3f8" ALIGN="CENTER" CELLPADDING="1" BORDER="1"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD PORT="in0" BGCOLOR="#bee3f8" BORDER="0" WIDTH="10" HEIGHT="4" CELLPADDING="0"></TD></TR><TR><TD COLSPAN="1" ALIGN="CENTER" CELLPADDING="3"><FONT COLOR="#1a365d" POINT-SIZE="12"><B>manifestarticle</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>PK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="manifest_id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>manifest_id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>FK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="tax_id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>tax_id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>FK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="article_id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>article_id</B>?</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>FK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="amount" COLSPAN="2" BGCOLOR="#ffffff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">amount</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">FLOAT</FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="net" COLSPAN="2" BGCOLOR="#f7fafc" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">net</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">FLOAT</FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="comment" COLSPAN="2" BGCOLOR="#ffffff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">comment?</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">NVARCHAR(MAX)</FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="rebate" COLSPAN="2" BGCOLOR="#f7fafc" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">rebate</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">FLOAT</FONT></TD></TR></TABLE></TD></TR></TABLE>>];
|
manifestarticle [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4" COLOR="#a0aec0"><TR><TD COLSPAN="2" BGCOLOR="#bee3f8" ALIGN="CENTER" CELLPADDING="1" BORDER="1"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD PORT="in0" BGCOLOR="#bee3f8" BORDER="0" WIDTH="10" HEIGHT="4" CELLPADDING="0"></TD></TR><TR><TD COLSPAN="1" ALIGN="CENTER" CELLPADDING="3"><FONT COLOR="#1a365d" POINT-SIZE="12"><B>manifestarticle</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>PK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="manifest_id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>manifest_id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>FK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="tax_id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>tax_id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>FK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="article_id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>article_id</B>?</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>FK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="amount" COLSPAN="2" BGCOLOR="#ffffff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">amount</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">FLOAT</FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="net" COLSPAN="2" BGCOLOR="#f7fafc" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">net</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">FLOAT</FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="comment" COLSPAN="2" BGCOLOR="#ffffff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">comment?</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">NVARCHAR(MAX)</FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="rebate" COLSPAN="2" BGCOLOR="#f7fafc" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">rebate</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">FLOAT</FONT></TD></TR></TABLE></TD></TR></TABLE>>];
|
||||||
manifest [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4" COLOR="#a0aec0"><TR><TD COLSPAN="2" BGCOLOR="#bee3f8" ALIGN="CENTER" CELLPADDING="1" BORDER="1"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD PORT="in0" BGCOLOR="#bee3f8" BORDER="0" WIDTH="10" HEIGHT="4" CELLPADDING="0"></TD></TR><TR><TD COLSPAN="1" ALIGN="CENTER" CELLPADDING="3"><FONT COLOR="#1a365d" POINT-SIZE="12"><B>manifest</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>PK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="entity_id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>entity_id</B>?</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>FK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="company_id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>company_id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>FK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="number" COLSPAN="2" BGCOLOR="#f7fafc" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">number</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">NVARCHAR(100)</FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="type" COLSPAN="2" BGCOLOR="#ffffff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">type</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">NVARCHAR(100)</FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="date" COLSPAN="2" BGCOLOR="#f7fafc" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">date</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">DATETIME2</FONT></TD></TR></TABLE></TD></TR></TABLE>>];
|
manifest [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4" COLOR="#a0aec0"><TR><TD COLSPAN="2" BGCOLOR="#bee3f8" ALIGN="CENTER" CELLPADDING="1" BORDER="1"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD PORT="in0" BGCOLOR="#bee3f8" BORDER="0" WIDTH="10" HEIGHT="4" CELLPADDING="0"></TD></TR><TR><TD COLSPAN="1" ALIGN="CENTER" CELLPADDING="3"><FONT COLOR="#1a365d" POINT-SIZE="12"><B>manifest</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>PK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="entity_id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>entity_id</B>?</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>FK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="company_id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>company_id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>FK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="number" COLSPAN="2" BGCOLOR="#f7fafc" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">number</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">NVARCHAR(100)</FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="type" COLSPAN="2" BGCOLOR="#ffffff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">type</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">NVARCHAR(100)</FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="external_number" COLSPAN="2" BGCOLOR="#f7fafc" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">external_number?</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">NVARCHAR(100)</FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="date" COLSPAN="2" BGCOLOR="#ffffff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">date</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">DATETIME2</FONT></TD></TR></TABLE></TD></TR></TABLE>>];
|
||||||
price [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4" COLOR="#a0aec0"><TR><TD COLSPAN="2" BGCOLOR="#bee3f8" ALIGN="CENTER" CELLPADDING="4" BORDER="1"><FONT COLOR="#1a365d" POINT-SIZE="12"><B>price</B></FONT></TD></TR><TR><TD PORT="id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>PK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="tax_id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>tax_id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>FK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="customergroup_id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>customergroup_id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>FK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="article_id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>article_id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>FK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="minmultiplier" COLSPAN="2" BGCOLOR="#ffffff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">minmultiplier</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">DECIMAL(18,4)</FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="net" COLSPAN="2" BGCOLOR="#f7fafc" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">net</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">FLOAT</FONT></TD></TR></TABLE></TD></TR></TABLE>>];
|
price [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4" COLOR="#a0aec0"><TR><TD COLSPAN="2" BGCOLOR="#bee3f8" ALIGN="CENTER" CELLPADDING="4" BORDER="1"><FONT COLOR="#1a365d" POINT-SIZE="12"><B>price</B></FONT></TD></TR><TR><TD PORT="id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>PK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="tax_id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>tax_id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>FK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="customergroup_id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>customergroup_id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>FK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="article_id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>article_id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>FK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="minmultiplier" COLSPAN="2" BGCOLOR="#ffffff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">minmultiplier</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">DECIMAL(18,4)</FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="net" COLSPAN="2" BGCOLOR="#f7fafc" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">net</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">FLOAT</FONT></TD></TR></TABLE></TD></TR></TABLE>>];
|
||||||
tax [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4" COLOR="#a0aec0"><TR><TD COLSPAN="2" BGCOLOR="#bee3f8" ALIGN="CENTER" CELLPADDING="1" BORDER="1"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD PORT="in0" BGCOLOR="#bee3f8" BORDER="0" WIDTH="10" HEIGHT="4" CELLPADDING="0"></TD><TD PORT="in1" BGCOLOR="#bee3f8" BORDER="0" WIDTH="10" HEIGHT="4" CELLPADDING="0"></TD><TD PORT="in2" BGCOLOR="#bee3f8" BORDER="0" WIDTH="10" HEIGHT="4" CELLPADDING="0"></TD><TD PORT="in3" BGCOLOR="#bee3f8" BORDER="0" WIDTH="10" HEIGHT="4" CELLPADDING="0"></TD><TD PORT="in4" BGCOLOR="#bee3f8" BORDER="0" WIDTH="10" HEIGHT="4" CELLPADDING="0"></TD></TR><TR><TD COLSPAN="5" ALIGN="CENTER" CELLPADDING="3"><FONT COLOR="#1a365d" POINT-SIZE="12"><B>tax</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>PK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="rate" COLSPAN="2" BGCOLOR="#f7fafc" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">rate</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">DECIMAL(18,4)</FONT></TD></TR></TABLE></TD></TR></TABLE>>];
|
tax [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4" COLOR="#a0aec0"><TR><TD COLSPAN="2" BGCOLOR="#bee3f8" ALIGN="CENTER" CELLPADDING="1" BORDER="1"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD PORT="in0" BGCOLOR="#bee3f8" BORDER="0" WIDTH="10" HEIGHT="4" CELLPADDING="0"></TD><TD PORT="in1" BGCOLOR="#bee3f8" BORDER="0" WIDTH="10" HEIGHT="4" CELLPADDING="0"></TD><TD PORT="in2" BGCOLOR="#bee3f8" BORDER="0" WIDTH="10" HEIGHT="4" CELLPADDING="0"></TD><TD PORT="in3" BGCOLOR="#bee3f8" BORDER="0" WIDTH="10" HEIGHT="4" CELLPADDING="0"></TD><TD PORT="in4" BGCOLOR="#bee3f8" BORDER="0" WIDTH="10" HEIGHT="4" CELLPADDING="0"></TD></TR><TR><TD COLSPAN="5" ALIGN="CENTER" CELLPADDING="3"><FONT COLOR="#1a365d" POINT-SIZE="12"><B>tax</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="id" COLSPAN="2" BGCOLOR="#ebf8ff" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748"><B>id</B></FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">INT <B>PK</B></FONT></TD></TR></TABLE></TD></TR><TR><TD PORT="rate" COLSPAN="2" BGCOLOR="#f7fafc" BORDER="1" CELLPADDING="0"><TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" FIXEDSIZE="FALSE"><TR><TD ALIGN="LEFT" CELLPADDING="4"><FONT COLOR="#2d3748">rate</FONT></TD><TD ALIGN="RIGHT" CELLPADDING="4"><FONT COLOR="#718096" POINT-SIZE="9">DECIMAL(18,4)</FONT></TD></TR></TABLE></TD></TR></TABLE>>];
|
||||||
}
|
}
|
||||||
@@ -118,7 +118,7 @@ digraph schema {
|
|||||||
categorytext:language_id:e -> language:in3:n [color="#1a365d", fontcolor="#1a365d", tooltip="FK_categorytext_language", constraint=false, weight=1];
|
categorytext:language_id:e -> language:in3:n [color="#1a365d", fontcolor="#1a365d", tooltip="FK_categorytext_language", constraint=false, weight=1];
|
||||||
articletext:article_id:e -> article:in9:n [color="#702459", fontcolor="#702459", tooltip="FK_articletext_article", weight=3];
|
articletext:article_id:e -> article:in9:n [color="#702459", fontcolor="#702459", tooltip="FK_articletext_article", weight=3];
|
||||||
articletext:language_id:w -> language:in2:n [color="#744210", fontcolor="#744210", tooltip="FK_articletext_language", constraint=false, weight=1];
|
articletext:language_id:w -> language:in2:n [color="#744210", fontcolor="#744210", tooltip="FK_articletext_language", constraint=false, weight=1];
|
||||||
price:tax_id:nw -> tax:in1:n [color="#285e61", fontcolor="#285e61", tooltip="FK_price_tax", constraint=false, weight=1];
|
price:tax_id:sw -> tax:in1:n [color="#285e61", fontcolor="#285e61", tooltip="FK_price_tax", constraint=false, weight=1];
|
||||||
price:article_id:w -> article:in1:n [color="#d53f8c", fontcolor="#d53f8c", tooltip="FK_price_article", weight=3];
|
price:article_id:w -> article:in1:n [color="#d53f8c", fontcolor="#d53f8c", tooltip="FK_price_article", weight=3];
|
||||||
price:customergroup_id:se -> customergroup:in0:n [color="#dd6b20", fontcolor="#dd6b20", tooltip="FK_price_customergroup", constraint=false, weight=1];
|
price:customergroup_id:se -> customergroup:in0:n [color="#dd6b20", fontcolor="#dd6b20", tooltip="FK_price_customergroup", constraint=false, weight=1];
|
||||||
manifest:company_id:e -> company:in0:n [color="#38a169", fontcolor="#38a169", tooltip="FK_manifest_company", weight=3];
|
manifest:company_id:e -> company:in0:n [color="#38a169", fontcolor="#38a169", tooltip="FK_manifest_company", weight=3];
|
||||||
|
|||||||
176
schema-graph.svg
176
schema-graph.svg
@@ -1513,54 +1513,54 @@
|
|||||||
<!-- manifestarticle -->
|
<!-- manifestarticle -->
|
||||||
<g id="node32" class="node">
|
<g id="node32" class="node">
|
||||||
<title>manifestarticle</title>
|
<title>manifestarticle</title>
|
||||||
<polygon fill="#bee3f8" stroke="none" points="147.32,-1088.2 147.32,-1116.6 306.68,-1116.6 306.68,-1088.2 147.32,-1088.2"/>
|
<polygon fill="#bee3f8" stroke="none" points="143.32,-1088.2 143.32,-1116.6 302.68,-1116.6 302.68,-1088.2 143.32,-1088.2"/>
|
||||||
<polygon fill="none" stroke="#a0aec0" points="147.32,-1088.2 147.32,-1116.6 306.68,-1116.6 306.68,-1088.2 147.32,-1088.2"/>
|
<polygon fill="none" stroke="#a0aec0" points="143.32,-1088.2 143.32,-1116.6 302.68,-1116.6 302.68,-1088.2 143.32,-1088.2"/>
|
||||||
<polygon fill="#bee3f8" stroke="none" points="149.32,-1110.6 149.32,-1114.6 304.68,-1114.6 304.68,-1110.6 149.32,-1110.6"/>
|
<polygon fill="#bee3f8" stroke="none" points="145.32,-1110.6 145.32,-1114.6 300.68,-1114.6 300.68,-1110.6 145.32,-1110.6"/>
|
||||||
<text xml:space="preserve" text-anchor="start" x="184.65" y="-1097.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00" fill="#1a365d">manifestarticle</text>
|
<text xml:space="preserve" text-anchor="start" x="180.65" y="-1097.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00" fill="#1a365d">manifestarticle</text>
|
||||||
<polygon fill="#ebf8ff" stroke="none" points="147.32,-1061.4 147.32,-1088.2 306.68,-1088.2 306.68,-1061.4 147.32,-1061.4"/>
|
<polygon fill="#ebf8ff" stroke="none" points="143.32,-1061.4 143.32,-1088.2 302.68,-1088.2 302.68,-1061.4 143.32,-1061.4"/>
|
||||||
<polygon fill="none" stroke="#a0aec0" points="147.32,-1061.4 147.32,-1088.2 306.68,-1088.2 306.68,-1061.4 147.32,-1061.4"/>
|
<polygon fill="none" stroke="#a0aec0" points="143.32,-1061.4 143.32,-1088.2 302.68,-1088.2 302.68,-1061.4 143.32,-1061.4"/>
|
||||||
<text xml:space="preserve" text-anchor="start" x="152.32" y="-1071.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="14.00" fill="#2d3748">id</text>
|
<text xml:space="preserve" text-anchor="start" x="148.32" y="-1071.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="14.00" fill="#2d3748">id</text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="272.18" y="-1073.1" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">INT </text>
|
<text xml:space="preserve" text-anchor="start" x="268.18" y="-1073.1" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">INT </text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="289.18" y="-1073.1" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#718096">PK</text>
|
<text xml:space="preserve" text-anchor="start" x="285.18" y="-1073.1" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#718096">PK</text>
|
||||||
<polygon fill="#ebf8ff" stroke="none" points="147.32,-1034.6 147.32,-1061.4 306.68,-1061.4 306.68,-1034.6 147.32,-1034.6"/>
|
<polygon fill="#ebf8ff" stroke="none" points="143.32,-1034.6 143.32,-1061.4 302.68,-1061.4 302.68,-1034.6 143.32,-1034.6"/>
|
||||||
<polygon fill="none" stroke="#a0aec0" points="147.32,-1034.6 147.32,-1061.4 306.68,-1061.4 306.68,-1034.6 147.32,-1034.6"/>
|
<polygon fill="none" stroke="#a0aec0" points="143.32,-1034.6 143.32,-1061.4 302.68,-1061.4 302.68,-1034.6 143.32,-1034.6"/>
|
||||||
<text xml:space="preserve" text-anchor="start" x="152.32" y="-1044.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="14.00" fill="#2d3748">manifest_id</text>
|
<text xml:space="preserve" text-anchor="start" x="148.32" y="-1044.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="14.00" fill="#2d3748">manifest_id</text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="272.69" y="-1046.3" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">INT </text>
|
<text xml:space="preserve" text-anchor="start" x="268.69" y="-1046.3" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">INT </text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="289.68" y="-1046.3" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#718096">FK</text>
|
<text xml:space="preserve" text-anchor="start" x="285.68" y="-1046.3" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#718096">FK</text>
|
||||||
<polygon fill="#ebf8ff" stroke="none" points="147.32,-1007.8 147.32,-1034.6 306.68,-1034.6 306.68,-1007.8 147.32,-1007.8"/>
|
<polygon fill="#ebf8ff" stroke="none" points="143.32,-1007.8 143.32,-1034.6 302.68,-1034.6 302.68,-1007.8 143.32,-1007.8"/>
|
||||||
<polygon fill="none" stroke="#a0aec0" points="147.32,-1007.8 147.32,-1034.6 306.68,-1034.6 306.68,-1007.8 147.32,-1007.8"/>
|
<polygon fill="none" stroke="#a0aec0" points="143.32,-1007.8 143.32,-1034.6 302.68,-1034.6 302.68,-1007.8 143.32,-1007.8"/>
|
||||||
<text xml:space="preserve" text-anchor="start" x="152.32" y="-1018" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="14.00" fill="#2d3748">tax_id</text>
|
<text xml:space="preserve" text-anchor="start" x="148.32" y="-1018" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="14.00" fill="#2d3748">tax_id</text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="272.69" y="-1019.5" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">INT </text>
|
<text xml:space="preserve" text-anchor="start" x="268.69" y="-1019.5" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">INT </text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="289.68" y="-1019.5" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#718096">FK</text>
|
<text xml:space="preserve" text-anchor="start" x="285.68" y="-1019.5" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#718096">FK</text>
|
||||||
<polygon fill="#ebf8ff" stroke="none" points="147.32,-981 147.32,-1007.8 306.68,-1007.8 306.68,-981 147.32,-981"/>
|
<polygon fill="#ebf8ff" stroke="none" points="143.32,-981 143.32,-1007.8 302.68,-1007.8 302.68,-981 143.32,-981"/>
|
||||||
<polygon fill="none" stroke="#a0aec0" points="147.32,-981 147.32,-1007.8 306.68,-1007.8 306.68,-981 147.32,-981"/>
|
<polygon fill="none" stroke="#a0aec0" points="143.32,-981 143.32,-1007.8 302.68,-1007.8 302.68,-981 143.32,-981"/>
|
||||||
<text xml:space="preserve" text-anchor="start" x="152.32" y="-991.2" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="14.00" fill="#2d3748">article_id</text>
|
<text xml:space="preserve" text-anchor="start" x="148.32" y="-991.2" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="14.00" fill="#2d3748">article_id</text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="213.79" y="-991.2" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#2d3748">?</text>
|
<text xml:space="preserve" text-anchor="start" x="209.79" y="-991.2" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#2d3748">?</text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="272.69" y="-992.7" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">INT </text>
|
<text xml:space="preserve" text-anchor="start" x="268.69" y="-992.7" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">INT </text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="289.68" y="-992.7" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#718096">FK</text>
|
<text xml:space="preserve" text-anchor="start" x="285.68" y="-992.7" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#718096">FK</text>
|
||||||
<polygon fill="#ffffff" stroke="none" points="147.32,-954.2 147.32,-981 306.68,-981 306.68,-954.2 147.32,-954.2"/>
|
<polygon fill="#ffffff" stroke="none" points="143.32,-954.2 143.32,-981 302.68,-981 302.68,-954.2 143.32,-954.2"/>
|
||||||
<polygon fill="none" stroke="#a0aec0" points="147.32,-954.2 147.32,-981 306.68,-981 306.68,-954.2 147.32,-954.2"/>
|
<polygon fill="none" stroke="#a0aec0" points="143.32,-954.2 143.32,-981 302.68,-981 302.68,-954.2 143.32,-954.2"/>
|
||||||
<text xml:space="preserve" text-anchor="start" x="152.32" y="-962" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#2d3748">amount</text>
|
<text xml:space="preserve" text-anchor="start" x="148.32" y="-962" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#2d3748">amount</text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="272.68" y="-964" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">FLOAT</text>
|
<text xml:space="preserve" text-anchor="start" x="268.68" y="-964" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">FLOAT</text>
|
||||||
<polygon fill="#f7fafc" stroke="none" points="147.32,-927.4 147.32,-954.2 306.68,-954.2 306.68,-927.4 147.32,-927.4"/>
|
<polygon fill="#f7fafc" stroke="none" points="143.32,-927.4 143.32,-954.2 302.68,-954.2 302.68,-927.4 143.32,-927.4"/>
|
||||||
<polygon fill="none" stroke="#a0aec0" points="147.32,-927.4 147.32,-954.2 306.68,-954.2 306.68,-927.4 147.32,-927.4"/>
|
<polygon fill="none" stroke="#a0aec0" points="143.32,-927.4 143.32,-954.2 302.68,-954.2 302.68,-927.4 143.32,-927.4"/>
|
||||||
<text xml:space="preserve" text-anchor="start" x="152.32" y="-935.2" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#2d3748">net</text>
|
<text xml:space="preserve" text-anchor="start" x="148.32" y="-935.2" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#2d3748">net</text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="272.68" y="-937.2" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">FLOAT</text>
|
<text xml:space="preserve" text-anchor="start" x="268.68" y="-937.2" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">FLOAT</text>
|
||||||
<polygon fill="#ffffff" stroke="none" points="147.32,-900.6 147.32,-927.4 306.68,-927.4 306.68,-900.6 147.32,-900.6"/>
|
<polygon fill="#ffffff" stroke="none" points="143.32,-900.6 143.32,-927.4 302.68,-927.4 302.68,-900.6 143.32,-900.6"/>
|
||||||
<polygon fill="none" stroke="#a0aec0" points="147.32,-900.6 147.32,-927.4 306.68,-927.4 306.68,-900.6 147.32,-900.6"/>
|
<polygon fill="none" stroke="#a0aec0" points="143.32,-900.6 143.32,-927.4 302.68,-927.4 302.68,-900.6 143.32,-900.6"/>
|
||||||
<text xml:space="preserve" text-anchor="start" x="152.32" y="-908.4" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#2d3748">comment?</text>
|
<text xml:space="preserve" text-anchor="start" x="148.32" y="-908.4" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#2d3748">comment?</text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="225.68" y="-910.4" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">NVARCHAR(MAX)</text>
|
<text xml:space="preserve" text-anchor="start" x="221.68" y="-910.4" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">NVARCHAR(MAX)</text>
|
||||||
<polygon fill="#f7fafc" stroke="none" points="147.32,-873.8 147.32,-900.6 306.68,-900.6 306.68,-873.8 147.32,-873.8"/>
|
<polygon fill="#f7fafc" stroke="none" points="143.32,-873.8 143.32,-900.6 302.68,-900.6 302.68,-873.8 143.32,-873.8"/>
|
||||||
<polygon fill="none" stroke="#a0aec0" points="147.32,-873.8 147.32,-900.6 306.68,-900.6 306.68,-873.8 147.32,-873.8"/>
|
<polygon fill="none" stroke="#a0aec0" points="143.32,-873.8 143.32,-900.6 302.68,-900.6 302.68,-873.8 143.32,-873.8"/>
|
||||||
<text xml:space="preserve" text-anchor="start" x="152.32" y="-881.6" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#2d3748">rebate</text>
|
<text xml:space="preserve" text-anchor="start" x="148.32" y="-881.6" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#2d3748">rebate</text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="272.68" y="-883.6" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">FLOAT</text>
|
<text xml:space="preserve" text-anchor="start" x="268.68" y="-883.6" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">FLOAT</text>
|
||||||
</g>
|
</g>
|
||||||
<!-- ledger->manifestarticle -->
|
<!-- ledger->manifestarticle -->
|
||||||
<g id="edge51" class="edge">
|
<g id="edge51" class="edge">
|
||||||
<title>ledger:ne->manifestarticle:n</title>
|
<title>ledger:ne->manifestarticle:n</title>
|
||||||
<g id="a_edge51"><a xlink:title="FK_ledger_manifestarticle">
|
<g id="a_edge51"><a xlink:title="FK_ledger_manifestarticle">
|
||||||
<path fill="none" stroke="#2b6cb0" stroke-width="1.4" d="M223.42,-1480C223.42,-1480 226.36,-1180.72 226.91,-1124.61"/>
|
<path fill="none" stroke="#2b6cb0" stroke-width="1.4" d="M223.42,-1480C223.42,-1480 223.07,-1180.72 223.01,-1124.61"/>
|
||||||
<polygon fill="#2b6cb0" stroke="#2b6cb0" stroke-width="1.4" points="229.36,-1124.74 226.98,-1117.72 224.46,-1124.69 229.36,-1124.74"/>
|
<polygon fill="#2b6cb0" stroke="#2b6cb0" stroke-width="1.4" points="225.46,-1124.72 223,-1117.72 220.56,-1124.72 225.46,-1124.72"/>
|
||||||
</a>
|
</a>
|
||||||
</g>
|
</g>
|
||||||
</g>
|
</g>
|
||||||
@@ -1568,7 +1568,7 @@
|
|||||||
<g id="edge49" class="edge">
|
<g id="edge49" class="edge">
|
||||||
<title>manifestarticle:e->article:n</title>
|
<title>manifestarticle:e->article:n</title>
|
||||||
<g id="a_edge49"><a xlink:title="FK_manifestarticle_article">
|
<g id="a_edge49"><a xlink:title="FK_manifestarticle_article">
|
||||||
<path fill="none" stroke="#c53030" stroke-width="1.4" d="M307.68,-994.4C447.45,-994.4 394.65,-1168.27 523,-1223.6 637.08,-1272.77 2637.84,-1251.01 2759,-1223.6 2797.07,-1214.99 2838.02,-1223.39 2844.19,-1191.59"/>
|
<path fill="none" stroke="#c53030" stroke-width="1.4" d="M303.68,-994.4C444.67,-994.4 393.34,-1168.21 523,-1223.6 637.24,-1272.4 2637.84,-1251.01 2759,-1223.6 2797.07,-1214.99 2838.02,-1223.39 2844.19,-1191.59"/>
|
||||||
<polygon fill="#c53030" stroke="#c53030" stroke-width="1.4" points="2846.62,-1191.9 2844.79,-1184.71 2841.74,-1191.47 2846.62,-1191.9"/>
|
<polygon fill="#c53030" stroke="#c53030" stroke-width="1.4" points="2846.62,-1191.9 2844.79,-1184.71 2841.74,-1191.47 2846.62,-1191.9"/>
|
||||||
</a>
|
</a>
|
||||||
</g>
|
</g>
|
||||||
@@ -1576,45 +1576,49 @@
|
|||||||
<!-- manifest -->
|
<!-- manifest -->
|
||||||
<g id="node33" class="node">
|
<g id="node33" class="node">
|
||||||
<title>manifest</title>
|
<title>manifest</title>
|
||||||
<polygon fill="#bee3f8" stroke="none" points="84.51,-685 84.51,-713.4 221.49,-713.4 221.49,-685 84.51,-685"/>
|
<polygon fill="#bee3f8" stroke="none" points="45.82,-698.4 45.82,-726.8 248.18,-726.8 248.18,-698.4 45.82,-698.4"/>
|
||||||
<polygon fill="none" stroke="#a0aec0" points="84.51,-685 84.51,-713.4 221.49,-713.4 221.49,-685 84.51,-685"/>
|
<polygon fill="none" stroke="#a0aec0" points="45.82,-698.4 45.82,-726.8 248.18,-726.8 248.18,-698.4 45.82,-698.4"/>
|
||||||
<polygon fill="#bee3f8" stroke="none" points="86.51,-707.4 86.51,-711.4 219.49,-711.4 219.49,-707.4 86.51,-707.4"/>
|
<polygon fill="#bee3f8" stroke="none" points="47.82,-720.8 47.82,-724.8 246.18,-724.8 246.18,-720.8 47.82,-720.8"/>
|
||||||
<text xml:space="preserve" text-anchor="start" x="128.33" y="-694.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00" fill="#1a365d">manifest</text>
|
<text xml:space="preserve" text-anchor="start" x="122.33" y="-708" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00" fill="#1a365d">manifest</text>
|
||||||
<polygon fill="#ebf8ff" stroke="none" points="84.51,-658.2 84.51,-685 221.49,-685 221.49,-658.2 84.51,-658.2"/>
|
<polygon fill="#ebf8ff" stroke="none" points="45.82,-671.6 45.82,-698.4 248.18,-698.4 248.18,-671.6 45.82,-671.6"/>
|
||||||
<polygon fill="none" stroke="#a0aec0" points="84.51,-658.2 84.51,-685 221.49,-685 221.49,-658.2 84.51,-658.2"/>
|
<polygon fill="none" stroke="#a0aec0" points="45.82,-671.6 45.82,-698.4 248.18,-698.4 248.18,-671.6 45.82,-671.6"/>
|
||||||
<text xml:space="preserve" text-anchor="start" x="89.51" y="-668.4" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="14.00" fill="#2d3748">id</text>
|
<text xml:space="preserve" text-anchor="start" x="50.82" y="-681.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="14.00" fill="#2d3748">id</text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="186.99" y="-669.9" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">INT </text>
|
<text xml:space="preserve" text-anchor="start" x="213.68" y="-683.3" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">INT </text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="203.99" y="-669.9" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#718096">PK</text>
|
<text xml:space="preserve" text-anchor="start" x="230.68" y="-683.3" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#718096">PK</text>
|
||||||
<polygon fill="#ebf8ff" stroke="none" points="84.51,-631.4 84.51,-658.2 221.49,-658.2 221.49,-631.4 84.51,-631.4"/>
|
<polygon fill="#ebf8ff" stroke="none" points="45.82,-644.8 45.82,-671.6 248.18,-671.6 248.18,-644.8 45.82,-644.8"/>
|
||||||
<polygon fill="none" stroke="#a0aec0" points="84.51,-631.4 84.51,-658.2 221.49,-658.2 221.49,-631.4 84.51,-631.4"/>
|
<polygon fill="none" stroke="#a0aec0" points="45.82,-644.8 45.82,-671.6 248.18,-671.6 248.18,-644.8 45.82,-644.8"/>
|
||||||
<text xml:space="preserve" text-anchor="start" x="89.51" y="-641.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="14.00" fill="#2d3748">entity_id</text>
|
<text xml:space="preserve" text-anchor="start" x="50.82" y="-655" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="14.00" fill="#2d3748">entity_id</text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="147.07" y="-641.6" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#2d3748">?</text>
|
<text xml:space="preserve" text-anchor="start" x="108.38" y="-655" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#2d3748">?</text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="187.5" y="-643.1" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">INT </text>
|
<text xml:space="preserve" text-anchor="start" x="214.19" y="-656.5" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">INT </text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="204.5" y="-643.1" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#718096">FK</text>
|
<text xml:space="preserve" text-anchor="start" x="231.19" y="-656.5" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#718096">FK</text>
|
||||||
<polygon fill="#ebf8ff" stroke="none" points="84.51,-604.6 84.51,-631.4 221.49,-631.4 221.49,-604.6 84.51,-604.6"/>
|
<polygon fill="#ebf8ff" stroke="none" points="45.82,-618 45.82,-644.8 248.18,-644.8 248.18,-618 45.82,-618"/>
|
||||||
<polygon fill="none" stroke="#a0aec0" points="84.51,-604.6 84.51,-631.4 221.49,-631.4 221.49,-604.6 84.51,-604.6"/>
|
<polygon fill="none" stroke="#a0aec0" points="45.82,-618 45.82,-644.8 248.18,-644.8 248.18,-618 45.82,-618"/>
|
||||||
<text xml:space="preserve" text-anchor="start" x="89.51" y="-614.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="14.00" fill="#2d3748">company_id</text>
|
<text xml:space="preserve" text-anchor="start" x="50.82" y="-628.2" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="14.00" fill="#2d3748">company_id</text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="187.5" y="-616.3" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">INT </text>
|
<text xml:space="preserve" text-anchor="start" x="214.19" y="-629.7" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">INT </text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="204.5" y="-616.3" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#718096">FK</text>
|
<text xml:space="preserve" text-anchor="start" x="231.19" y="-629.7" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="9.00" fill="#718096">FK</text>
|
||||||
<polygon fill="#f7fafc" stroke="none" points="84.51,-577.8 84.51,-604.6 221.49,-604.6 221.49,-577.8 84.51,-577.8"/>
|
<polygon fill="#f7fafc" stroke="none" points="45.82,-591.2 45.82,-618 248.18,-618 248.18,-591.2 45.82,-591.2"/>
|
||||||
<polygon fill="none" stroke="#a0aec0" points="84.51,-577.8 84.51,-604.6 221.49,-604.6 221.49,-577.8 84.51,-577.8"/>
|
<polygon fill="none" stroke="#a0aec0" points="45.82,-591.2 45.82,-618 248.18,-618 248.18,-591.2 45.82,-591.2"/>
|
||||||
<text xml:space="preserve" text-anchor="start" x="89.51" y="-585.6" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#2d3748">number</text>
|
<text xml:space="preserve" text-anchor="start" x="50.82" y="-599" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#2d3748">number</text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="144.98" y="-587.6" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">NVARCHAR(100)</text>
|
<text xml:space="preserve" text-anchor="start" x="171.67" y="-601" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">NVARCHAR(100)</text>
|
||||||
<polygon fill="#ffffff" stroke="none" points="84.51,-551 84.51,-577.8 221.49,-577.8 221.49,-551 84.51,-551"/>
|
<polygon fill="#ffffff" stroke="none" points="45.82,-564.4 45.82,-591.2 248.18,-591.2 248.18,-564.4 45.82,-564.4"/>
|
||||||
<polygon fill="none" stroke="#a0aec0" points="84.51,-551 84.51,-577.8 221.49,-577.8 221.49,-551 84.51,-551"/>
|
<polygon fill="none" stroke="#a0aec0" points="45.82,-564.4 45.82,-591.2 248.18,-591.2 248.18,-564.4 45.82,-564.4"/>
|
||||||
<text xml:space="preserve" text-anchor="start" x="89.51" y="-558.8" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#2d3748">type</text>
|
<text xml:space="preserve" text-anchor="start" x="50.82" y="-572.2" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#2d3748">type</text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="144.98" y="-560.8" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">NVARCHAR(100)</text>
|
<text xml:space="preserve" text-anchor="start" x="171.67" y="-574.2" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">NVARCHAR(100)</text>
|
||||||
<polygon fill="#f7fafc" stroke="none" points="84.51,-524.2 84.51,-551 221.49,-551 221.49,-524.2 84.51,-524.2"/>
|
<polygon fill="#f7fafc" stroke="none" points="45.82,-537.6 45.82,-564.4 248.18,-564.4 248.18,-537.6 45.82,-537.6"/>
|
||||||
<polygon fill="none" stroke="#a0aec0" points="84.51,-524.2 84.51,-551 221.49,-551 221.49,-524.2 84.51,-524.2"/>
|
<polygon fill="none" stroke="#a0aec0" points="45.82,-537.6 45.82,-564.4 248.18,-564.4 248.18,-537.6 45.82,-537.6"/>
|
||||||
<text xml:space="preserve" text-anchor="start" x="89.51" y="-532" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#2d3748">date</text>
|
<text xml:space="preserve" text-anchor="start" x="50.82" y="-545.4" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#2d3748">external_number?</text>
|
||||||
<text xml:space="preserve" text-anchor="start" x="165.99" y="-534" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">DATETIME2</text>
|
<text xml:space="preserve" text-anchor="start" x="171.67" y="-547.4" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">NVARCHAR(100)</text>
|
||||||
|
<polygon fill="#ffffff" stroke="none" points="45.82,-510.8 45.82,-537.6 248.18,-537.6 248.18,-510.8 45.82,-510.8"/>
|
||||||
|
<polygon fill="none" stroke="#a0aec0" points="45.82,-510.8 45.82,-537.6 248.18,-537.6 248.18,-510.8 45.82,-510.8"/>
|
||||||
|
<text xml:space="preserve" text-anchor="start" x="50.82" y="-518.6" font-family="Helvetica,sans-Serif" font-size="14.00" fill="#2d3748">date</text>
|
||||||
|
<text xml:space="preserve" text-anchor="start" x="192.68" y="-520.6" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#718096">DATETIME2</text>
|
||||||
</g>
|
</g>
|
||||||
<!-- manifestarticle->manifest -->
|
<!-- manifestarticle->manifest -->
|
||||||
<g id="edge48" class="edge">
|
<g id="edge48" class="edge">
|
||||||
<title>manifestarticle:sw->manifest:n</title>
|
<title>manifestarticle:sw->manifest:n</title>
|
||||||
<g id="a_edge48"><a xlink:title="FK_manifestarticle_manifest">
|
<g id="a_edge48"><a xlink:title="FK_manifestarticle_manifest">
|
||||||
<path fill="none" stroke="#805ad5" stroke-width="1.4" d="M146.32,-1034.6C47.12,-935.4 148.66,-858.83 152.87,-721.13"/>
|
<path fill="none" stroke="#805ad5" stroke-width="1.4" d="M142.32,-1034.6C47.35,-939.63 142.72,-866.27 146.86,-734.56"/>
|
||||||
<polygon fill="#805ad5" stroke="#805ad5" stroke-width="1.4" points="155.31,-721.56 152.97,-714.52 150.41,-721.48 155.31,-721.56"/>
|
<polygon fill="#805ad5" stroke="#805ad5" stroke-width="1.4" points="149.31,-734.96 146.97,-727.92 144.41,-734.88 149.31,-734.96"/>
|
||||||
</a>
|
</a>
|
||||||
</g>
|
</g>
|
||||||
</g>
|
</g>
|
||||||
@@ -1622,8 +1626,8 @@
|
|||||||
<g id="edge50" class="edge">
|
<g id="edge50" class="edge">
|
||||||
<title>manifestarticle:sw->tax:n</title>
|
<title>manifestarticle:sw->tax:n</title>
|
||||||
<g id="a_edge50"><a xlink:title="FK_manifestarticle_tax">
|
<g id="a_edge50"><a xlink:title="FK_manifestarticle_tax">
|
||||||
<path fill="none" stroke="#2f855a" stroke-width="1.4" d="M146.32,-1007.8C102.95,-964.43 124.83,-926.86 147.32,-869.8 175.17,-799.13 228.98,-811.91 263,-744 294.15,-681.82 376.45,-212.72 382.04,-115.85"/>
|
<path fill="none" stroke="#2f855a" stroke-width="1.4" d="M142.32,-1007.8C98.95,-964.43 117.5,-925.43 143.32,-869.8 179.48,-791.9 248.61,-819.25 290,-744 357.53,-621.25 381.36,-265.05 382.31,-116.08"/>
|
||||||
<polygon fill="#2f855a" stroke="#2f855a" stroke-width="1.4" points="384.48,-116.2 382.27,-109.12 379.59,-116.03 384.48,-116.2"/>
|
<polygon fill="#2f855a" stroke="#2f855a" stroke-width="1.4" points="384.76,-116.13 382.34,-109.12 379.86,-116.11 384.76,-116.13"/>
|
||||||
</a>
|
</a>
|
||||||
</g>
|
</g>
|
||||||
</g>
|
</g>
|
||||||
@@ -1631,7 +1635,7 @@
|
|||||||
<g id="edge47" class="edge">
|
<g id="edge47" class="edge">
|
||||||
<title>manifest:e->entity:n</title>
|
<title>manifest:e->entity:n</title>
|
||||||
<g id="a_edge47"><a xlink:title="FK_manifest_entity">
|
<g id="a_edge47"><a xlink:title="FK_manifest_entity">
|
||||||
<path fill="none" stroke="#3182ce" stroke-width="1.4" d="M222.49,-644.8C370.25,-644.8 406.12,-702.91 515,-802.8 631.93,-910.08 572.64,-1023.59 711.05,-1101.2 719.06,-1105.69 730.18,-1110.77 736.62,-1109.47"/>
|
<path fill="none" stroke="#3182ce" stroke-width="1.4" d="M249.18,-658.2C383.67,-658.2 416.03,-711.73 515,-802.8 631.77,-910.25 572.64,-1023.59 711.05,-1101.2 719.06,-1105.69 730.18,-1110.77 736.62,-1109.47"/>
|
||||||
<polygon fill="#3182ce" stroke="#3182ce" stroke-width="1.4" points="738.5,-1111.05 740.56,-1103.93 734.51,-1108.21 738.5,-1111.05"/>
|
<polygon fill="#3182ce" stroke="#3182ce" stroke-width="1.4" points="738.5,-1111.05 740.56,-1103.93 734.51,-1108.21 738.5,-1111.05"/>
|
||||||
</a>
|
</a>
|
||||||
</g>
|
</g>
|
||||||
@@ -1640,8 +1644,8 @@
|
|||||||
<g id="edge46" class="edge">
|
<g id="edge46" class="edge">
|
||||||
<title>manifest:e->company:n</title>
|
<title>manifest:e->company:n</title>
|
||||||
<g id="a_edge46"><a xlink:title="FK_manifest_company">
|
<g id="a_edge46"><a xlink:title="FK_manifest_company">
|
||||||
<path fill="none" stroke="#38a169" stroke-width="1.4" d="M222.49,-618C350.84,-618 364.57,-538.25 489,-506.8 569.24,-486.52 1209.73,-513.54 1254.66,-438.43"/>
|
<path fill="none" stroke="#38a169" stroke-width="1.4" d="M249.18,-631.4C369.3,-631.4 373.89,-541.09 489,-506.8 568.32,-483.17 1209.66,-513.31 1254.66,-438.41"/>
|
||||||
<polygon fill="#38a169" stroke="#38a169" stroke-width="1.4" points="1256.98,-439.24 1256.56,-431.84 1252.27,-437.88 1256.98,-439.24"/>
|
<polygon fill="#38a169" stroke="#38a169" stroke-width="1.4" points="1256.97,-439.24 1256.56,-431.84 1252.26,-437.88 1256.97,-439.24"/>
|
||||||
</a>
|
</a>
|
||||||
</g>
|
</g>
|
||||||
</g>
|
</g>
|
||||||
@@ -1700,10 +1704,10 @@
|
|||||||
</g>
|
</g>
|
||||||
<!-- price->tax -->
|
<!-- price->tax -->
|
||||||
<g id="edge43" class="edge">
|
<g id="edge43" class="edge">
|
||||||
<title>price:nw->tax:n</title>
|
<title>price:sw->tax:n</title>
|
||||||
<g id="a_edge43"><a xlink:title="FK_price_tax">
|
<g id="a_edge43"><a xlink:title="FK_price_tax">
|
||||||
<path fill="none" stroke="#285e61" stroke-width="1.4" d="M305.05,-1466.6C305.05,-1466.6 306.05,-1328.6 306.05,-1328.6 315.94,-1263.84 337.75,-1252.14 349,-1187.6 431.08,-716.9 403.03,-589.47 402.67,-116.11"/>
|
<path fill="none" stroke="#285e61" stroke-width="1.4" d="M305.05,-1439.8C224.8,-1359.55 326.4,-1299.55 345,-1187.6 423.31,-716.16 402.94,-589.55 402.67,-116.12"/>
|
||||||
<polygon fill="#285e61" stroke="#285e61" stroke-width="1.4" points="405.13,-116.12 402.67,-109.12 400.23,-116.12 405.13,-116.12"/>
|
<polygon fill="#285e61" stroke="#285e61" stroke-width="1.4" points="405.12,-116.12 402.67,-109.12 400.22,-116.12 405.12,-116.12"/>
|
||||||
</a>
|
</a>
|
||||||
</g>
|
</g>
|
||||||
</g>
|
</g>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 187 KiB After Width: | Height: | Size: 188 KiB |
@@ -537,6 +537,7 @@ BEGIN
|
|||||||
[number] NVARCHAR(100) NOT NULL,
|
[number] NVARCHAR(100) NOT NULL,
|
||||||
[type] NVARCHAR(100) NOT NULL,
|
[type] NVARCHAR(100) NOT NULL,
|
||||||
entity_id INT NULL,
|
entity_id INT NULL,
|
||||||
|
external_number NVARCHAR(100) NULL,
|
||||||
[date] DATETIME2 NOT NULL CONSTRAINT DF_manifest_date DEFAULT SYSUTCDATETIME(),
|
[date] DATETIME2 NOT NULL CONSTRAINT DF_manifest_date DEFAULT SYSUTCDATETIME(),
|
||||||
CONSTRAINT FK_manifest_company FOREIGN KEY (company_id) REFERENCES company(id) ON DELETE NO ACTION,
|
CONSTRAINT FK_manifest_company FOREIGN KEY (company_id) REFERENCES company(id) ON DELETE NO ACTION,
|
||||||
CONSTRAINT FK_manifest_entity FOREIGN KEY (entity_id) REFERENCES entity(id) ON DELETE SET NULL
|
CONSTRAINT FK_manifest_entity FOREIGN KEY (entity_id) REFERENCES entity(id) ON DELETE SET NULL
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ SELECT
|
|||||||
m.[number],
|
m.[number],
|
||||||
m.[type],
|
m.[type],
|
||||||
m.entity_id AS supplierId,
|
m.entity_id AS supplierId,
|
||||||
|
m.external_number AS externalNumber,
|
||||||
m.[date]
|
m.[date]
|
||||||
FROM manifest m
|
FROM manifest m
|
||||||
WHERE m.company_id = @companyId
|
WHERE m.company_id = @companyId
|
||||||
@@ -19,6 +20,7 @@ SELECT
|
|||||||
m.[number],
|
m.[number],
|
||||||
m.[type],
|
m.[type],
|
||||||
m.entity_id AS supplierId,
|
m.entity_id AS supplierId,
|
||||||
|
m.external_number AS externalNumber,
|
||||||
m.[date]
|
m.[date]
|
||||||
FROM manifest m
|
FROM manifest m
|
||||||
WHERE m.id = @id
|
WHERE m.id = @id
|
||||||
@@ -44,9 +46,9 @@ ORDER BY ma.id
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
export const CREATE_MANIFEST = `
|
export const CREATE_MANIFEST = `
|
||||||
INSERT INTO manifest (company_id, [number], [type], entity_id, [date])
|
INSERT INTO manifest (company_id, [number], [type], entity_id, external_number, [date])
|
||||||
OUTPUT INSERTED.id
|
OUTPUT INSERTED.id
|
||||||
VALUES (@companyId, @number, @type, @entityId, @date)
|
VALUES (@companyId, @number, @type, @entityId, @externalNumber, @date)
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const UPDATE_MANIFEST = `
|
export const UPDATE_MANIFEST = `
|
||||||
@@ -54,6 +56,7 @@ UPDATE manifest
|
|||||||
SET
|
SET
|
||||||
[number] = @number,
|
[number] = @number,
|
||||||
entity_id = @entityId,
|
entity_id = @entityId,
|
||||||
|
external_number = @externalNumber,
|
||||||
[date] = @date
|
[date] = @date
|
||||||
WHERE id = @id
|
WHERE id = @id
|
||||||
AND company_id = @companyId
|
AND company_id = @companyId
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ SELECT
|
|||||||
m.[number],
|
m.[number],
|
||||||
m.[type],
|
m.[type],
|
||||||
m.entity_id AS entityId,
|
m.entity_id AS entityId,
|
||||||
|
m.external_number AS externalNumber,
|
||||||
m.[date]
|
m.[date]
|
||||||
FROM manifest m
|
FROM manifest m
|
||||||
WHERE m.company_id = @companyId
|
WHERE m.company_id = @companyId
|
||||||
@@ -25,6 +26,7 @@ SELECT
|
|||||||
m.[number],
|
m.[number],
|
||||||
m.[type],
|
m.[type],
|
||||||
m.entity_id AS entityId,
|
m.entity_id AS entityId,
|
||||||
|
m.external_number AS externalNumber,
|
||||||
m.[date]
|
m.[date]
|
||||||
FROM manifest m
|
FROM manifest m
|
||||||
WHERE m.id = @id
|
WHERE m.id = @id
|
||||||
@@ -50,9 +52,9 @@ ORDER BY ma.id
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
export const CREATE_MANIFEST = `
|
export const CREATE_MANIFEST = `
|
||||||
INSERT INTO manifest (company_id, [number], [type], entity_id, [date])
|
INSERT INTO manifest (company_id, [number], [type], entity_id, external_number, [date])
|
||||||
OUTPUT INSERTED.id
|
OUTPUT INSERTED.id
|
||||||
VALUES (@companyId, @number, @type, @entityId, @date)
|
VALUES (@companyId, @number, @type, @entityId, @externalNumber, @date)
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const UPDATE_MANIFEST = `
|
export const UPDATE_MANIFEST = `
|
||||||
@@ -60,6 +62,7 @@ UPDATE manifest
|
|||||||
SET
|
SET
|
||||||
[number] = @number,
|
[number] = @number,
|
||||||
entity_id = @entityId,
|
entity_id = @entityId,
|
||||||
|
external_number = @externalNumber,
|
||||||
[date] = @date
|
[date] = @date
|
||||||
WHERE id = @id
|
WHERE id = @id
|
||||||
AND company_id = @companyId
|
AND company_id = @companyId
|
||||||
|
|||||||
@@ -18,13 +18,14 @@ export default function create(pool) {
|
|||||||
* @param {string} body.number - The delivery number.
|
* @param {string} body.number - The delivery number.
|
||||||
* @param {string} body.date - The delivery date.
|
* @param {string} body.date - The delivery date.
|
||||||
* @param {number} body.supplierId - The id of the supplier.
|
* @param {number} body.supplierId - The id of the supplier.
|
||||||
|
* @param {string} [body.externalNumber] - An external (supplier) reference number.
|
||||||
* @param {Array<object>} [body.lines] - The delivery lines.
|
* @param {Array<object>} [body.lines] - The delivery lines.
|
||||||
* @returns {Promise<{id: number, number: string, type: string, entityId: number, date: string, lines: Array<object>}>} The created delivery.
|
* @returns {Promise<{id: number, number: string, type: string, entityId: number, externalNumber: string|null, date: string, lines: Array<object>}>} The created delivery.
|
||||||
* @throws {Error} If the delivery is invalid.
|
* @throws {Error} If the delivery is invalid.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* const delivery = await store.delivery.create(42, { number: 'D-1', date: '2026-01-01', supplierId: 5, lines: [...] });
|
* const delivery = await store.delivery.create(42, { number: 'D-1', date: '2026-01-01', supplierId: 5, lines: [...] });
|
||||||
* // => { id, number, type, entityId, date, lines: [...] }
|
* // => { id, number, type, entityId, externalNumber, date, lines: [...] }
|
||||||
*/
|
*/
|
||||||
return async (googleAuthId, body = {}) => {
|
return async (googleAuthId, body = {}) => {
|
||||||
const number = body.number?.trim?.() ? body.number.trim() : null;
|
const number = body.number?.trim?.() ? body.number.trim() : null;
|
||||||
@@ -32,6 +33,9 @@ export default function create(pool) {
|
|||||||
if (!number || !date) {
|
if (!number || !date) {
|
||||||
throw new Error('Invalid delivery');
|
throw new Error('Invalid delivery');
|
||||||
}
|
}
|
||||||
|
const externalNumber = body.externalNumber?.trim?.()
|
||||||
|
? body.externalNumber.trim()
|
||||||
|
: null;
|
||||||
|
|
||||||
const lines = normalizeLines(body.lines ?? []);
|
const lines = normalizeLines(body.lines ?? []);
|
||||||
|
|
||||||
@@ -53,6 +57,7 @@ export default function create(pool) {
|
|||||||
.input('number', number)
|
.input('number', number)
|
||||||
.input('type', DELIVERY_TYPE)
|
.input('type', DELIVERY_TYPE)
|
||||||
.input('entityId', supplierId)
|
.input('entityId', supplierId)
|
||||||
|
.input('externalNumber', externalNumber)
|
||||||
.input('date', date)
|
.input('date', date)
|
||||||
.query(CREATE_MANIFEST);
|
.query(CREATE_MANIFEST);
|
||||||
|
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ export default function getById(pool) {
|
|||||||
*
|
*
|
||||||
* @param {number} googleAuthId - The id of the Google auth user.
|
* @param {number} googleAuthId - The id of the Google auth user.
|
||||||
* @param {number} id - The id of the delivery.
|
* @param {number} id - The id of the delivery.
|
||||||
* @returns {Promise<{id: number, number: string, type: string, entityId: number, date: string, lines: Array<object>}>} The delivery.
|
* @returns {Promise<{id: number, number: string, type: string, entityId: number, externalNumber: string|null, date: string, lines: Array<object>}>} The delivery.
|
||||||
* @throws {Error} If the delivery is not found.
|
* @throws {Error} If the delivery is not found.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* const delivery = await store.delivery.getById(42, 5);
|
* const delivery = await store.delivery.getById(42, 5);
|
||||||
* // => { id, number, type, entityId, date, lines: [...] }
|
* // => { id, number, type, entityId, externalNumber, date, lines: [...] }
|
||||||
*/
|
*/
|
||||||
return async (googleAuthId, id) => {
|
return async (googleAuthId, id) => {
|
||||||
if (!Number.isFinite(id)) {
|
if (!Number.isFinite(id)) {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ export function shapeSummary(row) {
|
|||||||
number: row.number,
|
number: row.number,
|
||||||
type: DELIVERY_TYPE,
|
type: DELIVERY_TYPE,
|
||||||
supplierId: row.supplierId ?? null,
|
supplierId: row.supplierId ?? null,
|
||||||
|
externalNumber: row.externalNumber ?? null,
|
||||||
date: row.date,
|
date: row.date,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ export default function list(pool) {
|
|||||||
* Lists the deliveries of the user's selected company.
|
* Lists the deliveries of the user's selected company.
|
||||||
*
|
*
|
||||||
* @param {number} googleAuthId - The id of the Google auth user.
|
* @param {number} googleAuthId - The id of the Google auth user.
|
||||||
* @returns {Promise<Array<{id: number, number: string, type: string, entityId: number, date: string}>>} The deliveries.
|
* @returns {Promise<Array<{id: number, number: string, type: string, entityId: number, externalNumber: string|null, date: string}>>} The deliveries.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* const deliveries = await store.delivery.list(42);
|
* const deliveries = await store.delivery.list(42);
|
||||||
* // => [{ id, number, type, entityId, date }]
|
* // => [{ id, number, type, entityId, externalNumber, date }]
|
||||||
*/
|
*/
|
||||||
return async (googleAuthId) => {
|
return async (googleAuthId) => {
|
||||||
const { companyId } = await access(googleAuthId);
|
const { companyId } = await access(googleAuthId);
|
||||||
|
|||||||
@@ -24,8 +24,9 @@ export default function update(pool) {
|
|||||||
* @param {string} [patch.number] - The new delivery number.
|
* @param {string} [patch.number] - The new delivery number.
|
||||||
* @param {string} [patch.date] - The new delivery date.
|
* @param {string} [patch.date] - The new delivery date.
|
||||||
* @param {number} [patch.supplierId] - The new supplier id.
|
* @param {number} [patch.supplierId] - The new supplier id.
|
||||||
|
* @param {string} [patch.externalNumber] - The new external (supplier) reference number.
|
||||||
* @param {Array<object>} [patch.lines] - The new delivery lines.
|
* @param {Array<object>} [patch.lines] - The new delivery lines.
|
||||||
* @returns {Promise<{id: number, number: string, type: string, entityId: number, date: string, lines: Array<object>}>} The updated delivery.
|
* @returns {Promise<{id: number, number: string, type: string, entityId: number, externalNumber: string|null, date: string, lines: Array<object>}>} The updated delivery.
|
||||||
* @throws {Error} If the delivery is not found.
|
* @throws {Error} If the delivery is not found.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
@@ -43,9 +44,10 @@ export default function update(pool) {
|
|||||||
patch,
|
patch,
|
||||||
'supplierId',
|
'supplierId',
|
||||||
);
|
);
|
||||||
|
const hasExternalNumber = Object.prototype.hasOwnProperty.call(patch, 'externalNumber');
|
||||||
const hasLines = Object.prototype.hasOwnProperty.call(patch, 'lines');
|
const hasLines = Object.prototype.hasOwnProperty.call(patch, 'lines');
|
||||||
|
|
||||||
if (!hasNumber && !hasDate && !hasSupplierId && !hasLines) {
|
if (!hasNumber && !hasDate && !hasSupplierId && !hasExternalNumber && !hasLines) {
|
||||||
throw new Error('Invalid delivery');
|
throw new Error('Invalid delivery');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,12 +101,20 @@ export default function update(pool) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let externalNumber = summary.externalNumber;
|
||||||
|
if (hasExternalNumber) {
|
||||||
|
externalNumber = patch.externalNumber?.trim?.()
|
||||||
|
? patch.externalNumber.trim()
|
||||||
|
: null;
|
||||||
|
}
|
||||||
|
|
||||||
await request(pool, tx)
|
await request(pool, tx)
|
||||||
.input('id', id)
|
.input('id', id)
|
||||||
.input('companyId', companyId)
|
.input('companyId', companyId)
|
||||||
.input('type', DELIVERY_TYPE)
|
.input('type', DELIVERY_TYPE)
|
||||||
.input('number', number)
|
.input('number', number)
|
||||||
.input('entityId', supplierId)
|
.input('entityId', supplierId)
|
||||||
|
.input('externalNumber', externalNumber)
|
||||||
.input('date', date)
|
.input('date', date)
|
||||||
.query(UPDATE_MANIFEST);
|
.query(UPDATE_MANIFEST);
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ export function shapeSummary(type, row) {
|
|||||||
number: row.number,
|
number: row.number,
|
||||||
type,
|
type,
|
||||||
entityId: row.entityId ?? null,
|
entityId: row.entityId ?? null,
|
||||||
|
externalNumber: row.externalNumber ?? null,
|
||||||
date: row.date,
|
date: row.date,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,13 +17,14 @@ export default function create(pool) {
|
|||||||
* @param {string} body.number - The order number.
|
* @param {string} body.number - The order number.
|
||||||
* @param {string} body.date - The order date.
|
* @param {string} body.date - The order date.
|
||||||
* @param {number} [body.entityId] - The id of the customer entity.
|
* @param {number} [body.entityId] - The id of the customer entity.
|
||||||
|
* @param {string} [body.externalNumber] - An external (customer) reference number.
|
||||||
* @param {Array<object>} [body.lines] - The order lines.
|
* @param {Array<object>} [body.lines] - The order lines.
|
||||||
* @returns {Promise<{id: number, number: string, type: string, entityId: number|null, date: string, lines: Array<object>}>} The created order.
|
* @returns {Promise<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string, lines: Array<object>}>} The created order.
|
||||||
* @throws {Error} If the order is invalid.
|
* @throws {Error} If the order is invalid.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* const order = await store.order.create(42, { number: 'B-2026-001', date: '2026-09-15', entityId: 12, lines: [...] });
|
* const order = await store.order.create(42, { number: 'B-2026-001', date: '2026-09-15', entityId: 12, lines: [...] });
|
||||||
* // => { id, number, type, entityId, date, lines: [...] }
|
* // => { id, number, type, entityId, externalNumber, date, lines: [...] }
|
||||||
*/
|
*/
|
||||||
return async (googleAuthId, body = {}) => {
|
return async (googleAuthId, body = {}) => {
|
||||||
const number = body.number?.trim?.() ? body.number.trim() : null;
|
const number = body.number?.trim?.() ? body.number.trim() : null;
|
||||||
@@ -31,6 +32,9 @@ export default function create(pool) {
|
|||||||
if (!number || !date) {
|
if (!number || !date) {
|
||||||
throw new Error('Invalid order');
|
throw new Error('Invalid order');
|
||||||
}
|
}
|
||||||
|
const externalNumber = body.externalNumber?.trim?.()
|
||||||
|
? body.externalNumber.trim()
|
||||||
|
: null;
|
||||||
|
|
||||||
const lines = normalizeLines(body.lines ?? []);
|
const lines = normalizeLines(body.lines ?? []);
|
||||||
const { companyId, rootCategoryId } = await access(googleAuthId);
|
const { companyId, rootCategoryId } = await access(googleAuthId);
|
||||||
@@ -51,6 +55,7 @@ export default function create(pool) {
|
|||||||
.input('number', number)
|
.input('number', number)
|
||||||
.input('type', ORDER_TYPE)
|
.input('type', ORDER_TYPE)
|
||||||
.input('entityId', entityId)
|
.input('entityId', entityId)
|
||||||
|
.input('externalNumber', externalNumber)
|
||||||
.input('date', date)
|
.input('date', date)
|
||||||
.query(CREATE_MANIFEST);
|
.query(CREATE_MANIFEST);
|
||||||
|
|
||||||
|
|||||||
@@ -10,12 +10,12 @@ export default function getById(pool) {
|
|||||||
*
|
*
|
||||||
* @param {number} googleAuthId - The id of the Google auth user.
|
* @param {number} googleAuthId - The id of the Google auth user.
|
||||||
* @param {number} id - The id of the order.
|
* @param {number} id - The id of the order.
|
||||||
* @returns {Promise<{id: number, number: string, type: string, entityId: number|null, date: string, lines: Array<object>}>} The order with its lines.
|
* @returns {Promise<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string, lines: Array<object>}>} The order with its lines.
|
||||||
* @throws {Error} If the order is not found.
|
* @throws {Error} If the order is not found.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* const order = await store.order.getById(42, 5);
|
* const order = await store.order.getById(42, 5);
|
||||||
* // => { id, number, type, entityId, date, lines: [...] }
|
* // => { id, number, type, entityId, externalNumber, date, lines: [...] }
|
||||||
*/
|
*/
|
||||||
return async (googleAuthId, id) => {
|
return async (googleAuthId, id) => {
|
||||||
if (!Number.isFinite(id)) {
|
if (!Number.isFinite(id)) {
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ export default function list(pool) {
|
|||||||
* Lists the orders of the user's selected company.
|
* Lists the orders of the user's selected company.
|
||||||
*
|
*
|
||||||
* @param {number} googleAuthId - The id of the Google auth user.
|
* @param {number} googleAuthId - The id of the Google auth user.
|
||||||
* @returns {Promise<Array<{id: number, number: string, type: string, entityId: number|null, date: string}>>} The orders.
|
* @returns {Promise<Array<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string}>>} The orders.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* const orders = await store.order.list(42);
|
* const orders = await store.order.list(42);
|
||||||
* // => [{ id, number, type, entityId, date }]
|
* // => [{ id, number, type, entityId, externalNumber, date }]
|
||||||
*/
|
*/
|
||||||
return async (googleAuthId) => {
|
return async (googleAuthId) => {
|
||||||
const { companyId } = await access(googleAuthId);
|
const { companyId } = await access(googleAuthId);
|
||||||
|
|||||||
@@ -23,8 +23,9 @@ export default function update(pool) {
|
|||||||
* @param {string} [patch.number] - The new order number.
|
* @param {string} [patch.number] - The new order number.
|
||||||
* @param {string} [patch.date] - The new order date.
|
* @param {string} [patch.date] - The new order date.
|
||||||
* @param {number} [patch.entityId] - The new customer entity id.
|
* @param {number} [patch.entityId] - The new customer entity id.
|
||||||
|
* @param {string} [patch.externalNumber] - The new external (customer) reference number.
|
||||||
* @param {Array<object>} [patch.lines] - The new order lines.
|
* @param {Array<object>} [patch.lines] - The new order lines.
|
||||||
* @returns {Promise<{id: number, number: string, type: string, entityId: number|null, date: string, lines: Array<object>}>} The updated order.
|
* @returns {Promise<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string, lines: Array<object>}>} The updated order.
|
||||||
* @throws {Error} If the order is not found.
|
* @throws {Error} If the order is not found.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
@@ -39,9 +40,10 @@ export default function update(pool) {
|
|||||||
const hasNumber = Object.prototype.hasOwnProperty.call(patch, 'number');
|
const hasNumber = Object.prototype.hasOwnProperty.call(patch, 'number');
|
||||||
const hasDate = Object.prototype.hasOwnProperty.call(patch, 'date');
|
const hasDate = Object.prototype.hasOwnProperty.call(patch, 'date');
|
||||||
const hasEntityId = Object.prototype.hasOwnProperty.call(patch, 'entityId');
|
const hasEntityId = Object.prototype.hasOwnProperty.call(patch, 'entityId');
|
||||||
|
const hasExternalNumber = Object.prototype.hasOwnProperty.call(patch, 'externalNumber');
|
||||||
const hasLines = Object.prototype.hasOwnProperty.call(patch, 'lines');
|
const hasLines = Object.prototype.hasOwnProperty.call(patch, 'lines');
|
||||||
|
|
||||||
if (!hasNumber && !hasDate && !hasEntityId && !hasLines) {
|
if (!hasNumber && !hasDate && !hasEntityId && !hasExternalNumber && !hasLines) {
|
||||||
throw new Error('Invalid order');
|
throw new Error('Invalid order');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,12 +97,20 @@ export default function update(pool) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let externalNumber = summary.externalNumber;
|
||||||
|
if (hasExternalNumber) {
|
||||||
|
externalNumber = patch.externalNumber?.trim?.()
|
||||||
|
? patch.externalNumber.trim()
|
||||||
|
: null;
|
||||||
|
}
|
||||||
|
|
||||||
await request(pool, tx)
|
await request(pool, tx)
|
||||||
.input('id', id)
|
.input('id', id)
|
||||||
.input('companyId', companyId)
|
.input('companyId', companyId)
|
||||||
.input('type', ORDER_TYPE)
|
.input('type', ORDER_TYPE)
|
||||||
.input('number', number)
|
.input('number', number)
|
||||||
.input('entityId', entityId)
|
.input('entityId', entityId)
|
||||||
|
.input('externalNumber', externalNumber)
|
||||||
.input('date', date)
|
.input('date', date)
|
||||||
.query(UPDATE_MANIFEST);
|
.query(UPDATE_MANIFEST);
|
||||||
|
|
||||||
|
|||||||
@@ -17,13 +17,14 @@ export default function create(pool) {
|
|||||||
* @param {string} body.number - The quote number.
|
* @param {string} body.number - The quote number.
|
||||||
* @param {string} body.date - The quote date.
|
* @param {string} body.date - The quote date.
|
||||||
* @param {number} [body.entityId] - The id of the customer entity.
|
* @param {number} [body.entityId] - The id of the customer entity.
|
||||||
|
* @param {string} [body.externalNumber] - An external (customer) reference number.
|
||||||
* @param {Array<object>} [body.lines] - The quote lines.
|
* @param {Array<object>} [body.lines] - The quote lines.
|
||||||
* @returns {Promise<{id: number, number: string, type: string, entityId: number|null, date: string, lines: Array<object>}>} The created quote.
|
* @returns {Promise<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string, lines: Array<object>}>} The created quote.
|
||||||
* @throws {Error} If the quote is invalid.
|
* @throws {Error} If the quote is invalid.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* const quote = await store.quote.create(42, { number: 'A-2026-001', date: '2026-09-01', entityId: 12, lines: [...] });
|
* const quote = await store.quote.create(42, { number: 'A-2026-001', date: '2026-09-01', entityId: 12, lines: [...] });
|
||||||
* // => { id, number, type, entityId, date, lines: [...] }
|
* // => { id, number, type, entityId, externalNumber, date, lines: [...] }
|
||||||
*/
|
*/
|
||||||
return async (googleAuthId, body = {}) => {
|
return async (googleAuthId, body = {}) => {
|
||||||
const number = body.number?.trim?.() ? body.number.trim() : null;
|
const number = body.number?.trim?.() ? body.number.trim() : null;
|
||||||
@@ -31,6 +32,9 @@ export default function create(pool) {
|
|||||||
if (!number || !date) {
|
if (!number || !date) {
|
||||||
throw new Error('Invalid quote');
|
throw new Error('Invalid quote');
|
||||||
}
|
}
|
||||||
|
const externalNumber = body.externalNumber?.trim?.()
|
||||||
|
? body.externalNumber.trim()
|
||||||
|
: null;
|
||||||
|
|
||||||
const lines = normalizeLines(body.lines ?? []);
|
const lines = normalizeLines(body.lines ?? []);
|
||||||
const { companyId, rootCategoryId } = await access(googleAuthId);
|
const { companyId, rootCategoryId } = await access(googleAuthId);
|
||||||
@@ -51,6 +55,7 @@ export default function create(pool) {
|
|||||||
.input('number', number)
|
.input('number', number)
|
||||||
.input('type', QUOTE_TYPE)
|
.input('type', QUOTE_TYPE)
|
||||||
.input('entityId', entityId)
|
.input('entityId', entityId)
|
||||||
|
.input('externalNumber', externalNumber)
|
||||||
.input('date', date)
|
.input('date', date)
|
||||||
.query(CREATE_MANIFEST);
|
.query(CREATE_MANIFEST);
|
||||||
|
|
||||||
|
|||||||
@@ -10,12 +10,12 @@ export default function getById(pool) {
|
|||||||
*
|
*
|
||||||
* @param {number} googleAuthId - The id of the Google auth user.
|
* @param {number} googleAuthId - The id of the Google auth user.
|
||||||
* @param {number} id - The id of the quote.
|
* @param {number} id - The id of the quote.
|
||||||
* @returns {Promise<{id: number, number: string, type: string, entityId: number|null, date: string, lines: Array<object>}>} The quote with its lines.
|
* @returns {Promise<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string, lines: Array<object>}>} The quote with its lines.
|
||||||
* @throws {Error} If the quote is not found.
|
* @throws {Error} If the quote is not found.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* const quote = await store.quote.getById(42, 5);
|
* const quote = await store.quote.getById(42, 5);
|
||||||
* // => { id, number, type, entityId, date, lines: [...] }
|
* // => { id, number, type, entityId, externalNumber, date, lines: [...] }
|
||||||
*/
|
*/
|
||||||
return async (googleAuthId, id) => {
|
return async (googleAuthId, id) => {
|
||||||
if (!Number.isFinite(id)) {
|
if (!Number.isFinite(id)) {
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ export default function list(pool) {
|
|||||||
* Lists the quotes of the user's selected company.
|
* Lists the quotes of the user's selected company.
|
||||||
*
|
*
|
||||||
* @param {number} googleAuthId - The id of the Google auth user.
|
* @param {number} googleAuthId - The id of the Google auth user.
|
||||||
* @returns {Promise<Array<{id: number, number: string, type: string, entityId: number|null, date: string}>>} The quotes.
|
* @returns {Promise<Array<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string}>>} The quotes.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* const quotes = await store.quote.list(42);
|
* const quotes = await store.quote.list(42);
|
||||||
* // => [{ id, number, type, entityId, date }]
|
* // => [{ id, number, type, entityId, externalNumber, date }]
|
||||||
*/
|
*/
|
||||||
return async (googleAuthId) => {
|
return async (googleAuthId) => {
|
||||||
const { companyId } = await access(googleAuthId);
|
const { companyId } = await access(googleAuthId);
|
||||||
|
|||||||
@@ -23,8 +23,9 @@ export default function update(pool) {
|
|||||||
* @param {string} [patch.number] - The new quote number.
|
* @param {string} [patch.number] - The new quote number.
|
||||||
* @param {string} [patch.date] - The new quote date.
|
* @param {string} [patch.date] - The new quote date.
|
||||||
* @param {number} [patch.entityId] - The new customer entity id.
|
* @param {number} [patch.entityId] - The new customer entity id.
|
||||||
|
* @param {string} [patch.externalNumber] - The new external (customer) reference number.
|
||||||
* @param {Array<object>} [patch.lines] - The new quote lines.
|
* @param {Array<object>} [patch.lines] - The new quote lines.
|
||||||
* @returns {Promise<{id: number, number: string, type: string, entityId: number|null, date: string, lines: Array<object>}>} The updated quote.
|
* @returns {Promise<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string, lines: Array<object>}>} The updated quote.
|
||||||
* @throws {Error} If the quote is not found.
|
* @throws {Error} If the quote is not found.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
@@ -39,9 +40,10 @@ export default function update(pool) {
|
|||||||
const hasNumber = Object.prototype.hasOwnProperty.call(patch, 'number');
|
const hasNumber = Object.prototype.hasOwnProperty.call(patch, 'number');
|
||||||
const hasDate = Object.prototype.hasOwnProperty.call(patch, 'date');
|
const hasDate = Object.prototype.hasOwnProperty.call(patch, 'date');
|
||||||
const hasEntityId = Object.prototype.hasOwnProperty.call(patch, 'entityId');
|
const hasEntityId = Object.prototype.hasOwnProperty.call(patch, 'entityId');
|
||||||
|
const hasExternalNumber = Object.prototype.hasOwnProperty.call(patch, 'externalNumber');
|
||||||
const hasLines = Object.prototype.hasOwnProperty.call(patch, 'lines');
|
const hasLines = Object.prototype.hasOwnProperty.call(patch, 'lines');
|
||||||
|
|
||||||
if (!hasNumber && !hasDate && !hasEntityId && !hasLines) {
|
if (!hasNumber && !hasDate && !hasEntityId && !hasExternalNumber && !hasLines) {
|
||||||
throw new Error('Invalid quote');
|
throw new Error('Invalid quote');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,12 +97,20 @@ export default function update(pool) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let externalNumber = summary.externalNumber;
|
||||||
|
if (hasExternalNumber) {
|
||||||
|
externalNumber = patch.externalNumber?.trim?.()
|
||||||
|
? patch.externalNumber.trim()
|
||||||
|
: null;
|
||||||
|
}
|
||||||
|
|
||||||
await request(pool, tx)
|
await request(pool, tx)
|
||||||
.input('id', id)
|
.input('id', id)
|
||||||
.input('companyId', companyId)
|
.input('companyId', companyId)
|
||||||
.input('type', QUOTE_TYPE)
|
.input('type', QUOTE_TYPE)
|
||||||
.input('number', number)
|
.input('number', number)
|
||||||
.input('entityId', entityId)
|
.input('entityId', entityId)
|
||||||
|
.input('externalNumber', externalNumber)
|
||||||
.input('date', date)
|
.input('date', date)
|
||||||
.query(UPDATE_MANIFEST);
|
.query(UPDATE_MANIFEST);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user