u
This commit is contained in:
9
API.articlewarehousesummary.md
Normal file
9
API.articlewarehousesummary.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# articlewarehousesummary
|
||||
|
||||
This document is auto-generated from the JSDoc comments in `src/store` by running `npm run api-doc`.
|
||||
|
||||
## `articlewarehousesummary.syncSummary`
|
||||
|
||||
*Source: `src/store/articlewarehousesummary/syncSummary.js`*
|
||||
|
||||
Centralized sync and rebuild logic for the materialized `articlewarehousesummary` table. Keeps `articlewarehousesummary` in sync with ledger movements, track_stock status, and warehouses.
|
||||
@@ -55,7 +55,7 @@ Deletes an entity by its id within the user's selected company.
|
||||
|
||||
**Throws**
|
||||
|
||||
`Error` — If the entity is not found.
|
||||
`Error` — If the entity is not found or is in use.
|
||||
|
||||
**Example**
|
||||
|
||||
|
||||
4
API.md
4
API.md
@@ -36,6 +36,7 @@ The store is exposed as a `LibDashStore` instance (see `src/index.js`). Each met
|
||||
- **companysetting**: `id PK, company_id->company, key:s(255), value:txt, frontend:b=0, writeonly:b=0, UQ(company_id, key)`
|
||||
- **companyuser**: `id PK, google_auth_id->google_auth, company_id->company, UQ(google_auth_id, company_id)`
|
||||
- **customergroup**: `id PK, name:s(255), sort:i=0, company_id?->company`
|
||||
- **articlewarehousesummary**: `id PK, article_id->article, warehouse_id->warehouse, stock:f=0, UQ(article_id, warehouse_id)`
|
||||
- **deliverysummary**: `id PK, company_id->company, manifest_id->manifest UQ, delivery_number:s(100), external_number?:s(100), delivery_date:dt, created_at:dt, supplier_id?->entity, supplier_name?:s(255), positions:i=0, gross_total:f=0, net_total:f=0, total_quantity:f=0, stock_positions:i=0, booked_positions:i=0, unbooked_positions:i=0, stock_quantity:f=0, booked_quantity:f=0, unbooked_quantity:f=0, is_booked:b=0`
|
||||
- **entity**: `id PK, customergroup_id->customergroup, first_name?:s(255), name:s(255), number?:s(100), created_at:dt, updated_at:dt, UQ(company_id, number)`
|
||||
- **entityaddress**: `id PK, entity_id->entity, first_name?:s(255), name?:s(255), street?:s(255), streetnumber?:s(50), zip?:s(50), city?:s(255), county?:s(255), addresstype:s(50), sort:i=0`
|
||||
@@ -247,6 +248,7 @@ The store is exposed as a `LibDashStore` instance (see `src/index.js`). Each met
|
||||
- [stock](API.stock.md)
|
||||
- `accept(provider: object): Function`
|
||||
- `adjust(googleAuthId: number, input: {sku?: string, warehouseId?: number, amount?: number, text?: string, externalNumber?: string, date?: string|Date, lines?: Array<object>}, tx?: object): Promise<{manifest: {id: number, number: string, type: string, date: string, createdAt: string}, lines: Array<object>, ledger: Array<object>}>`
|
||||
- `rebuildSummaries(provider: import('../../providers/provider.js').DatabaseProvider): void`
|
||||
- `ship(provider: object): Function`
|
||||
- [posterminal](API.posterminal.md)
|
||||
- `delete(googleAuthId: number, id: number, tx?: object): Promise<void>`
|
||||
@@ -335,6 +337,8 @@ The store is exposed as a `LibDashStore` instance (see `src/index.js`). Each met
|
||||
- [articlelist](API.articlelist.md)
|
||||
- `getItemsByArticleSku(googleAuthId: number, sku: string, tx?: object): Promise<Array<{id: number, articleId: number, sku: string, name: string|null, count: number, sort: number}>>`
|
||||
- `setItemsByArticleSku(googleAuthId: number, sku: string, items?: Array<{articleId?: number, sku?: string, count?: number, sort?: number}>, tx?: object): Promise<Array<{id: number, articleId: number, sku: string, name: string|null, count: number, sort: number}>>`
|
||||
- [articlewarehousesummary](API.articlewarehousesummary.md)
|
||||
- `syncSummary(): void`
|
||||
- [carrier](API.carrier.md)
|
||||
- `create(googleAuthId: number, input: {name: string, sort?: number, hasPackages?: boolean, isReverse?: boolean}, tx?: object): Promise<{id: number, name: string, sort: number, hasPackages: boolean, isReverse: boolean}>`
|
||||
- `delete(googleAuthId: number, id: number, tx?: object): Promise<void>`
|
||||
|
||||
12
API.stock.md
12
API.stock.md
@@ -43,6 +43,18 @@ Adjusts article stock manually by creating an implicit manifest of type "adjustm
|
||||
|
||||
`Promise<{manifest: {id: number, number: string, type: string, date: string, createdAt: string}, lines: Array<object>, ledger: Array<object>}>`
|
||||
|
||||
## `stock.rebuildSummaries`
|
||||
|
||||
*Source: `src/store/stock/rebuildSummaries.js`*
|
||||
|
||||
Rebuilds the `articlewarehousesummary` table for the user's selected company.
|
||||
|
||||
**Parameters**
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| `provider` | `import('../../providers/provider.js').DatabaseProvider` | |
|
||||
|
||||
## `stock.ship`
|
||||
|
||||
*Source: `src/store/stock/ship.js`*
|
||||
|
||||
@@ -52,7 +52,7 @@ Deletes a supplier by its id within the user's selected company.
|
||||
|
||||
**Throws**
|
||||
|
||||
`Error` — If the supplier is not found.
|
||||
`Error` — If the supplier is not found or is in use.
|
||||
|
||||
**Example**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user