types-salon-management 1.0.65 → 1.0.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/inventory/index.d.ts +3 -0
- package/dist/api/inventory/index.d.ts.map +1 -1
- package/dist/api/inventory/index.js +3 -0
- package/dist/api/inventory/index.js.map +1 -1
- package/dist/api/inventory/product.dto.d.ts +2 -2
- package/dist/api/inventory/product.dto.d.ts.map +1 -1
- package/dist/api/inventory/product.picker.d.ts +2 -2
- package/dist/api/inventory/product.picker.d.ts.map +1 -1
- package/dist/api/inventory/product.requests.d.ts +2 -2
- package/dist/api/inventory/product.requests.d.ts.map +1 -1
- package/dist/api/inventory/purchase-order.constants.d.ts +33 -0
- package/dist/api/inventory/purchase-order.constants.d.ts.map +1 -0
- package/dist/api/inventory/purchase-order.constants.js +29 -0
- package/dist/api/inventory/purchase-order.constants.js.map +1 -0
- package/dist/api/inventory/purchase-order.dto.d.ts +72 -0
- package/dist/api/inventory/purchase-order.dto.d.ts.map +1 -0
- package/dist/api/inventory/purchase-order.dto.js +3 -0
- package/dist/api/inventory/purchase-order.dto.js.map +1 -0
- package/dist/api/inventory/purchase-order.requests.d.ts +66 -0
- package/dist/api/inventory/purchase-order.requests.d.ts.map +1 -0
- package/dist/api/inventory/purchase-order.requests.js +3 -0
- package/dist/api/inventory/purchase-order.requests.js.map +1 -0
- package/dist/models/stock-level.model.d.ts +2 -2
- package/dist/models/stock-level.model.d.ts.map +1 -1
- package/dist/models/warehouse-stock-level.model.d.ts +2 -2
- package/dist/models/warehouse-stock-level.model.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/api/inventory/index.ts +3 -0
- package/src/api/inventory/product.dto.ts +2 -2
- package/src/api/inventory/product.picker.ts +2 -2
- package/src/api/inventory/product.requests.ts +2 -2
- package/src/api/inventory/purchase-order.constants.ts +44 -0
- package/src/api/inventory/purchase-order.dto.ts +82 -0
- package/src/api/inventory/purchase-order.requests.ts +85 -0
- package/src/models/stock-level.model.ts +2 -2
- package/src/models/warehouse-stock-level.model.ts +2 -2
|
@@ -12,4 +12,7 @@ export * from './product.picker';
|
|
|
12
12
|
export * from './product.requests';
|
|
13
13
|
export * from './stock-movement.dto';
|
|
14
14
|
export * from './stock-movement.requests';
|
|
15
|
+
export * from './purchase-order.constants';
|
|
16
|
+
export * from './purchase-order.dto';
|
|
17
|
+
export * from './purchase-order.requests';
|
|
15
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/inventory/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/inventory/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC"}
|
|
@@ -28,4 +28,7 @@ __exportStar(require("./product.picker"), exports);
|
|
|
28
28
|
__exportStar(require("./product.requests"), exports);
|
|
29
29
|
__exportStar(require("./stock-movement.dto"), exports);
|
|
30
30
|
__exportStar(require("./stock-movement.requests"), exports);
|
|
31
|
+
__exportStar(require("./purchase-order.constants"), exports);
|
|
32
|
+
__exportStar(require("./purchase-order.dto"), exports);
|
|
33
|
+
__exportStar(require("./purchase-order.requests"), exports);
|
|
31
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/inventory/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,yDAAuC;AACvC,8DAA4C;AAC5C,8CAA4B;AAC5B,mDAAiC;AACjC,iDAA+B;AAC/B,sDAAoC;AACpC,kDAAgC;AAChC,uDAAqC;AACrC,gDAA8B;AAC9B,mDAAiC;AACjC,qDAAmC;AACnC,uDAAqC;AACrC,4DAA0C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/inventory/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,yDAAuC;AACvC,8DAA4C;AAC5C,8CAA4B;AAC5B,mDAAiC;AACjC,iDAA+B;AAC/B,sDAAoC;AACpC,kDAAgC;AAChC,uDAAqC;AACrC,gDAA8B;AAC9B,mDAAiC;AACjC,qDAAmC;AACnC,uDAAqC;AACrC,4DAA0C;AAC1C,6DAA2C;AAC3C,uDAAqC;AACrC,4DAA0C"}
|
|
@@ -17,8 +17,8 @@ export interface StockPositionDto {
|
|
|
17
17
|
locationName: string | null;
|
|
18
18
|
warehouseName: string | null;
|
|
19
19
|
onHand: number;
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
lowStockLevel: number;
|
|
21
|
+
reorderQuantity: number | null;
|
|
22
22
|
}
|
|
23
23
|
/** Present only when taxMode is custom — one row per company location. taxId null = no tax. */
|
|
24
24
|
export interface ProductLocationTaxDto {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.dto.d.ts","sourceRoot":"","sources":["../../../src/api/inventory/product.dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EACV,uBAAuB,EACvB,aAAa,EACb,cAAc,EACd,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,
|
|
1
|
+
{"version":3,"file":"product.dto.d.ts","sourceRoot":"","sources":["../../../src/api/inventory/product.dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EACV,uBAAuB,EACvB,aAAa,EACb,cAAc,EACd,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM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AAG,IAAI,CAAC;IACnB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,eAAe,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAC/C,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,cAAc,EAAE,gBAAgB,EAAE,CAAC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,uBAAuB,CAAC;CACzC;AAED,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,UAAU,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,UAAU,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,UAAU,GAAG,IAAI,CAAC;CAC9B"}
|
|
@@ -19,8 +19,8 @@ export interface ProductPickerItemDto {
|
|
|
19
19
|
barcode: string | null;
|
|
20
20
|
sku: string | null;
|
|
21
21
|
locationOnHand: number;
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
lowStockLevel: number;
|
|
23
|
+
reorderQuantity: number | null;
|
|
24
24
|
}
|
|
25
25
|
export type ProductPickerResult = PaginatedResult<ProductPickerItemDto>;
|
|
26
26
|
//# sourceMappingURL=product.picker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.picker.d.ts","sourceRoot":"","sources":["../../../src/api/inventory/product.picker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzD,MAAM,WAAW,wBAAwB;IACvC,MAA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;IAChC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACrC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -23,8 +23,8 @@ export interface ProductPhotoInput {
|
|
|
23
23
|
export interface StockPositionInput {
|
|
24
24
|
locationId?: string | null;
|
|
25
25
|
warehouseId?: string | null;
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
lowStockLevel?: number;
|
|
27
|
+
reorderQuantity?: number | null;
|
|
28
28
|
}
|
|
29
29
|
export interface ProductLocationTaxInput {
|
|
30
30
|
locationId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.requests.d.ts","sourceRoot":"","sources":["../../../src/api/inventory/product.requests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACnG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC;AAEnE,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,
|
|
1
|
+
{"version":3,"file":"product.requests.d.ts","sourceRoot":"","sources":["../../../src/api/inventory/product.requests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACnG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC;AAEnE,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MA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kBAAkB,EAAE,CAAC;IACtC,uFAAuF;IACvF,iBAAiB,CAAC,EAAE,oBAAoB,EAAE,CAAC;CAC5C;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,aAAa,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAC1C,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAChD,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,MAAM,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC7B,cAAc,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACvC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare const PurchaseOrderStatus: {
|
|
2
|
+
readonly DRAFT: "draft";
|
|
3
|
+
readonly ORDERED: "ordered";
|
|
4
|
+
readonly PARTIAL: "partial";
|
|
5
|
+
readonly RECEIVED: "received";
|
|
6
|
+
readonly CANCELED: "canceled";
|
|
7
|
+
};
|
|
8
|
+
export type PurchaseOrderStatus = (typeof PurchaseOrderStatus)[keyof typeof PurchaseOrderStatus];
|
|
9
|
+
export declare const PurchaseOrderPaymentStatus: {
|
|
10
|
+
readonly UNPAID: "unpaid";
|
|
11
|
+
readonly PARTIAL: "partial";
|
|
12
|
+
readonly PAID: "paid";
|
|
13
|
+
};
|
|
14
|
+
export type PurchaseOrderPaymentStatus = (typeof PurchaseOrderPaymentStatus)[keyof typeof PurchaseOrderPaymentStatus];
|
|
15
|
+
/** Derived at read — not stored. */
|
|
16
|
+
export declare const PurchaseOrderPaymentDisplayStatus: {
|
|
17
|
+
readonly OVERDUE: "overdue";
|
|
18
|
+
readonly UNPAID: "unpaid";
|
|
19
|
+
readonly PARTIAL: "partial";
|
|
20
|
+
readonly PAID: "paid";
|
|
21
|
+
};
|
|
22
|
+
export type PurchaseOrderPaymentDisplayStatus = (typeof PurchaseOrderPaymentDisplayStatus)[keyof typeof PurchaseOrderPaymentDisplayStatus];
|
|
23
|
+
export declare const PurchaseOrderReceiveCloseAs: {
|
|
24
|
+
readonly PARTIAL: "partial";
|
|
25
|
+
readonly COMPLETED: "completed";
|
|
26
|
+
};
|
|
27
|
+
export type PurchaseOrderReceiveCloseAs = (typeof PurchaseOrderReceiveCloseAs)[keyof typeof PurchaseOrderReceiveCloseAs];
|
|
28
|
+
export declare const PurchaseOrderPrefillMode: {
|
|
29
|
+
readonly LOW: "low";
|
|
30
|
+
readonly REORDER: "reorder";
|
|
31
|
+
};
|
|
32
|
+
export type PurchaseOrderPrefillMode = (typeof PurchaseOrderPrefillMode)[keyof typeof PurchaseOrderPrefillMode];
|
|
33
|
+
//# sourceMappingURL=purchase-order.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"purchase-order.constants.d.ts","sourceRoot":"","sources":["../../../src/api/inventory/purchase-order.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB;;;;;;CAMtB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEjE,eAAO,MAAM,0BAA0B;;;;CAI7B,CAAC;AAEX,MAAM,MAAM,0BAA0B,GACpC,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,OAAO,0BAA0B,CAAC,CAAC;AAE/E,oCAAoC;AACpC,eAAO,MAAM,iCAAiC;;;;;CAGpC,CAAC;AAEX,MAAM,MAAM,iCAAiC,GAC3C,CAAC,OAAO,iCAAiC,CAAC,CAAC,MAAM,OAAO,iCAAiC,CAAC,CAAC;AAE7F,eAAO,MAAM,2BAA2B;;;CAG9B,CAAC;AAEX,MAAM,MAAM,2BAA2B,GACrC,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,OAAO,2BAA2B,CAAC,CAAC;AAEjF,eAAO,MAAM,wBAAwB;;;CAG3B,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAClC,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PurchaseOrderPrefillMode = exports.PurchaseOrderReceiveCloseAs = exports.PurchaseOrderPaymentDisplayStatus = exports.PurchaseOrderPaymentStatus = exports.PurchaseOrderStatus = void 0;
|
|
4
|
+
exports.PurchaseOrderStatus = {
|
|
5
|
+
DRAFT: 'draft',
|
|
6
|
+
ORDERED: 'ordered',
|
|
7
|
+
PARTIAL: 'partial',
|
|
8
|
+
RECEIVED: 'received',
|
|
9
|
+
CANCELED: 'canceled',
|
|
10
|
+
};
|
|
11
|
+
exports.PurchaseOrderPaymentStatus = {
|
|
12
|
+
UNPAID: 'unpaid',
|
|
13
|
+
PARTIAL: 'partial',
|
|
14
|
+
PAID: 'paid',
|
|
15
|
+
};
|
|
16
|
+
/** Derived at read — not stored. */
|
|
17
|
+
exports.PurchaseOrderPaymentDisplayStatus = {
|
|
18
|
+
...exports.PurchaseOrderPaymentStatus,
|
|
19
|
+
OVERDUE: 'overdue',
|
|
20
|
+
};
|
|
21
|
+
exports.PurchaseOrderReceiveCloseAs = {
|
|
22
|
+
PARTIAL: 'partial',
|
|
23
|
+
COMPLETED: 'completed',
|
|
24
|
+
};
|
|
25
|
+
exports.PurchaseOrderPrefillMode = {
|
|
26
|
+
LOW: 'low',
|
|
27
|
+
REORDER: 'reorder',
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=purchase-order.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"purchase-order.constants.js","sourceRoot":"","sources":["../../../src/api/inventory/purchase-order.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG;IACjC,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;CACZ,CAAC;AAKE,QAAA,0BAA0B,GAAG;IACxC,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;CACJ,CAAC;AAKX,oCAAoC;AACvB,QAAA,iCAAiC,GAAG;IAC/C,GAAG,kCAA0B;IAC7B,OAAO,EAAE,SAAS;CACV,CAAC;AAKE,QAAA,2BAA2B,GAAG;IACzC,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;CACd,CAAC;AAKE,QAAA,wBAAwB,GAAG;IACtC,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,SAAS;CACV,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { AuditActor } from '../audit';
|
|
2
|
+
import type { PurchaseOrderPaymentDisplayStatus, PurchaseOrderStatus } from './purchase-order.constants';
|
|
3
|
+
export interface PurchaseOrderSupplierRefDto {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
email: string | null;
|
|
7
|
+
phoneE164: string | null;
|
|
8
|
+
}
|
|
9
|
+
export interface PurchaseOrderPlaceRefDto {
|
|
10
|
+
locationId: string | null;
|
|
11
|
+
warehouseId: string | null;
|
|
12
|
+
name: string;
|
|
13
|
+
}
|
|
14
|
+
export interface PurchaseOrderLineDto {
|
|
15
|
+
id: string;
|
|
16
|
+
productId: string;
|
|
17
|
+
productName: string;
|
|
18
|
+
featuredPhotoUrl: string | null;
|
|
19
|
+
sortOrder: number;
|
|
20
|
+
orderedQty: number;
|
|
21
|
+
receivedQty: number;
|
|
22
|
+
unitCost: string;
|
|
23
|
+
lineTotal: string;
|
|
24
|
+
}
|
|
25
|
+
export interface PurchaseOrderSummaryDto {
|
|
26
|
+
id: string;
|
|
27
|
+
orderNumber: number;
|
|
28
|
+
status: PurchaseOrderStatus;
|
|
29
|
+
supplier: PurchaseOrderSupplierRefDto;
|
|
30
|
+
place: PurchaseOrderPlaceRefDto;
|
|
31
|
+
orderDate: string;
|
|
32
|
+
expectedDeliveryDate: string | null;
|
|
33
|
+
receivedAt: string | null;
|
|
34
|
+
canceledAt: string | null;
|
|
35
|
+
currencyCode: string;
|
|
36
|
+
subtotal: string;
|
|
37
|
+
totalAmount: string;
|
|
38
|
+
paymentStatus: PurchaseOrderPaymentDisplayStatus | null;
|
|
39
|
+
paidAmount: string;
|
|
40
|
+
dueAmount: string;
|
|
41
|
+
paymentDueDate: string | null;
|
|
42
|
+
paymentTerms: string | null;
|
|
43
|
+
createdAt: string;
|
|
44
|
+
createdBy: AuditActor | null;
|
|
45
|
+
}
|
|
46
|
+
export interface PurchaseOrderDetailDto extends PurchaseOrderSummaryDto {
|
|
47
|
+
lines: PurchaseOrderLineDto[];
|
|
48
|
+
updatedAt: string | null;
|
|
49
|
+
updatedBy: AuditActor | null;
|
|
50
|
+
}
|
|
51
|
+
export interface PurchaseOrderPaymentDto {
|
|
52
|
+
id: string;
|
|
53
|
+
amount: string;
|
|
54
|
+
paidAt: string;
|
|
55
|
+
paymentMethodId: string | null;
|
|
56
|
+
paymentMethodName: string;
|
|
57
|
+
reference: string | null;
|
|
58
|
+
note: string | null;
|
|
59
|
+
createdAt: string;
|
|
60
|
+
createdBy: AuditActor | null;
|
|
61
|
+
}
|
|
62
|
+
export interface PurchaseOrderPrefillLineDto {
|
|
63
|
+
productId: string;
|
|
64
|
+
productName: string;
|
|
65
|
+
featuredPhotoUrl: string | null;
|
|
66
|
+
unitCost: string;
|
|
67
|
+
onHand: number;
|
|
68
|
+
lowStockLevel: number;
|
|
69
|
+
reorderQuantity: number | null;
|
|
70
|
+
suggestedOrderedQty: number;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=purchase-order.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"purchase-order.dto.d.ts","sourceRoot":"","sources":["../../../src/api/inventory/purchase-order.dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EACV,iCAAiC,EAEjC,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,WAAW,2BAA2B;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,Q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AAM,CAAC;IAClB,SAAS,EAAE,UAAU,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,mBAAmB,EAAE,MAAM,CAAC;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"purchase-order.dto.js","sourceRoot":"","sources":["../../../src/api/inventory/purchase-order.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { PaginatedResult } from '../pagination';
|
|
2
|
+
import type { PurchaseOrderPrefillMode, PurchaseOrderReceiveCloseAs, PurchaseOrderStatus } from './purchase-order.constants';
|
|
3
|
+
import type { PurchaseOrderDetailDto, PurchaseOrderPaymentDto, PurchaseOrderPrefillLineDto, PurchaseOrderSummaryDto } from './purchase-order.dto';
|
|
4
|
+
export interface ListPurchaseOrdersQuery {
|
|
5
|
+
page?: number;
|
|
6
|
+
pageSize?: number;
|
|
7
|
+
search?: string;
|
|
8
|
+
status?: PurchaseOrderStatus;
|
|
9
|
+
supplierId?: string;
|
|
10
|
+
locationId?: string;
|
|
11
|
+
warehouseId?: string;
|
|
12
|
+
productId?: string;
|
|
13
|
+
orderDateFrom?: string;
|
|
14
|
+
orderDateTo?: string;
|
|
15
|
+
/** Supplier outstanding report — received orders with outstanding balance. */
|
|
16
|
+
outstandingOnly?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export type PurchaseOrderListResult = PaginatedResult<PurchaseOrderSummaryDto>;
|
|
19
|
+
export interface PurchaseOrderLineInput {
|
|
20
|
+
productId: string;
|
|
21
|
+
orderedQty: number;
|
|
22
|
+
unitCost: string;
|
|
23
|
+
sortOrder?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface CreatePurchaseOrderRequest {
|
|
26
|
+
supplierId: string;
|
|
27
|
+
locationId?: string | null;
|
|
28
|
+
warehouseId?: string | null;
|
|
29
|
+
orderDate: string;
|
|
30
|
+
expectedDeliveryDate?: string | null;
|
|
31
|
+
status?: typeof PurchaseOrderStatus.DRAFT | typeof PurchaseOrderStatus.ORDERED;
|
|
32
|
+
lines: PurchaseOrderLineInput[];
|
|
33
|
+
}
|
|
34
|
+
export interface UpdatePurchaseOrderRequest {
|
|
35
|
+
supplierId?: string;
|
|
36
|
+
locationId?: string | null;
|
|
37
|
+
warehouseId?: string | null;
|
|
38
|
+
orderDate?: string;
|
|
39
|
+
expectedDeliveryDate?: string | null;
|
|
40
|
+
lines?: PurchaseOrderLineInput[];
|
|
41
|
+
}
|
|
42
|
+
export interface ReceivePurchaseOrderLineInput {
|
|
43
|
+
lineId: string;
|
|
44
|
+
quantityReceived: number;
|
|
45
|
+
}
|
|
46
|
+
export interface ReceivePurchaseOrderRequest {
|
|
47
|
+
lines: ReceivePurchaseOrderLineInput[];
|
|
48
|
+
closeAs: PurchaseOrderReceiveCloseAs;
|
|
49
|
+
}
|
|
50
|
+
export interface CreatePurchaseOrderPaymentRequest {
|
|
51
|
+
amount: string;
|
|
52
|
+
paidAt: string;
|
|
53
|
+
paymentMethodId: string;
|
|
54
|
+
reference?: string | null;
|
|
55
|
+
note?: string | null;
|
|
56
|
+
}
|
|
57
|
+
export interface PrefillPurchaseOrdersQuery {
|
|
58
|
+
locationId?: string;
|
|
59
|
+
warehouseId?: string;
|
|
60
|
+
mode: PurchaseOrderPrefillMode;
|
|
61
|
+
supplierId?: string;
|
|
62
|
+
}
|
|
63
|
+
export type PurchaseOrderPrefillResult = PurchaseOrderPrefillLineDto[];
|
|
64
|
+
export type PurchaseOrderDetailResponse = PurchaseOrderDetailDto;
|
|
65
|
+
export type PurchaseOrderPaymentListResult = PurchaseOrderPaymentDto[];
|
|
66
|
+
//# sourceMappingURL=purchase-order.requests.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"purchase-order.requests.d.ts","sourceRoot":"","sources":["../../../src/api/inventory/purchase-order.requests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EACV,wBAAwB,EACxB,2BAA2B,EAC3B,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,MAAM,uBAAuB,GAAG,eAAe,CAAC,uBAAuB,CAAC,CAAC;AAE/E,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,0BAA0B;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,CAAC,EAA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E,MAAM,MAAM,8BAA8B,GAAG,uBAAuB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"purchase-order.requests.js","sourceRoot":"","sources":["../../../src/api/inventory/purchase-order.requests.ts"],"names":[],"mappings":""}
|
|
@@ -2,7 +2,7 @@ import { OutletModel } from "./outlet.model";
|
|
|
2
2
|
export interface StockLevelModel {
|
|
3
3
|
outlet: OutletModel;
|
|
4
4
|
currentStockCount: number;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
lowStockLevel: number;
|
|
6
|
+
reorderQuantity: number | null;
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=stock-level.model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stock-level.model.d.ts","sourceRoot":"","sources":["../../src/models/stock-level.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAE3C,MAAM,WAAW,eAAe;IAC5B,MAAM,EAAE,WAAW,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,
|
|
1
|
+
{"version":3,"file":"stock-level.model.d.ts","sourceRoot":"","sources":["../../src/models/stock-level.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAE3C,MAAM,WAAW,eAAe;IAC5B,MAAM,EAAE,WAAW,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;CACjC"}
|
|
@@ -2,7 +2,7 @@ import { WarehouseModel } from "./warehouse.model";
|
|
|
2
2
|
export interface WarehouseStockLevelModel {
|
|
3
3
|
warehouse: WarehouseModel;
|
|
4
4
|
currentStockCount: number;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
lowStockLevel: number;
|
|
6
|
+
reorderQuantity: number | null;
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=warehouse-stock-level.model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"warehouse-stock-level.model.d.ts","sourceRoot":"","sources":["../../src/models/warehouse-stock-level.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAEjD,MAAM,WAAW,wBAAwB;IACrC,SAAS,EAAE,cAAc,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,
|
|
1
|
+
{"version":3,"file":"warehouse-stock-level.model.d.ts","sourceRoot":"","sources":["../../src/models/warehouse-stock-level.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAEjD,MAAM,WAAW,wBAAwB;IACrC,SAAS,EAAE,cAAc,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC"}
|
package/package.json
CHANGED
|
@@ -12,3 +12,6 @@ export * from './product.picker';
|
|
|
12
12
|
export * from './product.requests';
|
|
13
13
|
export * from './stock-movement.dto';
|
|
14
14
|
export * from './stock-movement.requests';
|
|
15
|
+
export * from './purchase-order.constants';
|
|
16
|
+
export * from './purchase-order.dto';
|
|
17
|
+
export * from './purchase-order.requests';
|
|
@@ -25,8 +25,8 @@ export interface StockPositionDto {
|
|
|
25
25
|
locationName: string | null;
|
|
26
26
|
warehouseName: string | null;
|
|
27
27
|
onHand: number;
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
lowStockLevel: number;
|
|
29
|
+
reorderQuantity: number | null;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
/** Present only when taxMode is custom — one row per company location. taxId null = no tax. */
|
|
@@ -21,8 +21,8 @@ export interface ProductPickerItemDto {
|
|
|
21
21
|
barcode: string | null;
|
|
22
22
|
sku: string | null;
|
|
23
23
|
locationOnHand: number;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
lowStockLevel: number;
|
|
25
|
+
reorderQuantity: number | null;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export type ProductPickerResult = PaginatedResult<ProductPickerItemDto>;
|
|
@@ -27,8 +27,8 @@ export interface ProductPhotoInput {
|
|
|
27
27
|
export interface StockPositionInput {
|
|
28
28
|
locationId?: string | null;
|
|
29
29
|
warehouseId?: string | null;
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
lowStockLevel?: number;
|
|
31
|
+
reorderQuantity?: number | null;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
export interface ProductLocationTaxInput {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export const PurchaseOrderStatus = {
|
|
2
|
+
DRAFT: 'draft',
|
|
3
|
+
ORDERED: 'ordered',
|
|
4
|
+
PARTIAL: 'partial',
|
|
5
|
+
RECEIVED: 'received',
|
|
6
|
+
CANCELED: 'canceled',
|
|
7
|
+
} as const;
|
|
8
|
+
|
|
9
|
+
export type PurchaseOrderStatus =
|
|
10
|
+
(typeof PurchaseOrderStatus)[keyof typeof PurchaseOrderStatus];
|
|
11
|
+
|
|
12
|
+
export const PurchaseOrderPaymentStatus = {
|
|
13
|
+
UNPAID: 'unpaid',
|
|
14
|
+
PARTIAL: 'partial',
|
|
15
|
+
PAID: 'paid',
|
|
16
|
+
} as const;
|
|
17
|
+
|
|
18
|
+
export type PurchaseOrderPaymentStatus =
|
|
19
|
+
(typeof PurchaseOrderPaymentStatus)[keyof typeof PurchaseOrderPaymentStatus];
|
|
20
|
+
|
|
21
|
+
/** Derived at read — not stored. */
|
|
22
|
+
export const PurchaseOrderPaymentDisplayStatus = {
|
|
23
|
+
...PurchaseOrderPaymentStatus,
|
|
24
|
+
OVERDUE: 'overdue',
|
|
25
|
+
} as const;
|
|
26
|
+
|
|
27
|
+
export type PurchaseOrderPaymentDisplayStatus =
|
|
28
|
+
(typeof PurchaseOrderPaymentDisplayStatus)[keyof typeof PurchaseOrderPaymentDisplayStatus];
|
|
29
|
+
|
|
30
|
+
export const PurchaseOrderReceiveCloseAs = {
|
|
31
|
+
PARTIAL: 'partial',
|
|
32
|
+
COMPLETED: 'completed',
|
|
33
|
+
} as const;
|
|
34
|
+
|
|
35
|
+
export type PurchaseOrderReceiveCloseAs =
|
|
36
|
+
(typeof PurchaseOrderReceiveCloseAs)[keyof typeof PurchaseOrderReceiveCloseAs];
|
|
37
|
+
|
|
38
|
+
export const PurchaseOrderPrefillMode = {
|
|
39
|
+
LOW: 'low',
|
|
40
|
+
REORDER: 'reorder',
|
|
41
|
+
} as const;
|
|
42
|
+
|
|
43
|
+
export type PurchaseOrderPrefillMode =
|
|
44
|
+
(typeof PurchaseOrderPrefillMode)[keyof typeof PurchaseOrderPrefillMode];
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { AuditActor } from '../audit';
|
|
2
|
+
import type {
|
|
3
|
+
PurchaseOrderPaymentDisplayStatus,
|
|
4
|
+
PurchaseOrderPaymentStatus,
|
|
5
|
+
PurchaseOrderStatus,
|
|
6
|
+
} from './purchase-order.constants';
|
|
7
|
+
|
|
8
|
+
export interface PurchaseOrderSupplierRefDto {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
email: string | null;
|
|
12
|
+
phoneE164: string | null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface PurchaseOrderPlaceRefDto {
|
|
16
|
+
locationId: string | null;
|
|
17
|
+
warehouseId: string | null;
|
|
18
|
+
name: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface PurchaseOrderLineDto {
|
|
22
|
+
id: string;
|
|
23
|
+
productId: string;
|
|
24
|
+
productName: string;
|
|
25
|
+
featuredPhotoUrl: string | null;
|
|
26
|
+
sortOrder: number;
|
|
27
|
+
orderedQty: number;
|
|
28
|
+
receivedQty: number;
|
|
29
|
+
unitCost: string;
|
|
30
|
+
lineTotal: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface PurchaseOrderSummaryDto {
|
|
34
|
+
id: string;
|
|
35
|
+
orderNumber: number;
|
|
36
|
+
status: PurchaseOrderStatus;
|
|
37
|
+
supplier: PurchaseOrderSupplierRefDto;
|
|
38
|
+
place: PurchaseOrderPlaceRefDto;
|
|
39
|
+
orderDate: string;
|
|
40
|
+
expectedDeliveryDate: string | null;
|
|
41
|
+
receivedAt: string | null;
|
|
42
|
+
canceledAt: string | null;
|
|
43
|
+
currencyCode: string;
|
|
44
|
+
subtotal: string;
|
|
45
|
+
totalAmount: string;
|
|
46
|
+
paymentStatus: PurchaseOrderPaymentDisplayStatus | null;
|
|
47
|
+
paidAmount: string;
|
|
48
|
+
dueAmount: string;
|
|
49
|
+
paymentDueDate: string | null;
|
|
50
|
+
paymentTerms: string | null;
|
|
51
|
+
createdAt: string;
|
|
52
|
+
createdBy: AuditActor | null;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface PurchaseOrderDetailDto extends PurchaseOrderSummaryDto {
|
|
56
|
+
lines: PurchaseOrderLineDto[];
|
|
57
|
+
updatedAt: string | null;
|
|
58
|
+
updatedBy: AuditActor | null;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface PurchaseOrderPaymentDto {
|
|
62
|
+
id: string;
|
|
63
|
+
amount: string;
|
|
64
|
+
paidAt: string;
|
|
65
|
+
paymentMethodId: string | null;
|
|
66
|
+
paymentMethodName: string;
|
|
67
|
+
reference: string | null;
|
|
68
|
+
note: string | null;
|
|
69
|
+
createdAt: string;
|
|
70
|
+
createdBy: AuditActor | null;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface PurchaseOrderPrefillLineDto {
|
|
74
|
+
productId: string;
|
|
75
|
+
productName: string;
|
|
76
|
+
featuredPhotoUrl: string | null;
|
|
77
|
+
unitCost: string;
|
|
78
|
+
onHand: number;
|
|
79
|
+
lowStockLevel: number;
|
|
80
|
+
reorderQuantity: number | null;
|
|
81
|
+
suggestedOrderedQty: number;
|
|
82
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { PaginatedResult } from '../pagination';
|
|
2
|
+
import type {
|
|
3
|
+
PurchaseOrderPrefillMode,
|
|
4
|
+
PurchaseOrderReceiveCloseAs,
|
|
5
|
+
PurchaseOrderStatus,
|
|
6
|
+
} from './purchase-order.constants';
|
|
7
|
+
import type {
|
|
8
|
+
PurchaseOrderDetailDto,
|
|
9
|
+
PurchaseOrderPaymentDto,
|
|
10
|
+
PurchaseOrderPrefillLineDto,
|
|
11
|
+
PurchaseOrderSummaryDto,
|
|
12
|
+
} from './purchase-order.dto';
|
|
13
|
+
|
|
14
|
+
export interface ListPurchaseOrdersQuery {
|
|
15
|
+
page?: number;
|
|
16
|
+
pageSize?: number;
|
|
17
|
+
search?: string;
|
|
18
|
+
status?: PurchaseOrderStatus;
|
|
19
|
+
supplierId?: string;
|
|
20
|
+
locationId?: string;
|
|
21
|
+
warehouseId?: string;
|
|
22
|
+
productId?: string;
|
|
23
|
+
orderDateFrom?: string;
|
|
24
|
+
orderDateTo?: string;
|
|
25
|
+
/** Supplier outstanding report — received orders with outstanding balance. */
|
|
26
|
+
outstandingOnly?: boolean;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type PurchaseOrderListResult = PaginatedResult<PurchaseOrderSummaryDto>;
|
|
30
|
+
|
|
31
|
+
export interface PurchaseOrderLineInput {
|
|
32
|
+
productId: string;
|
|
33
|
+
orderedQty: number;
|
|
34
|
+
unitCost: string;
|
|
35
|
+
sortOrder?: number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface CreatePurchaseOrderRequest {
|
|
39
|
+
supplierId: string;
|
|
40
|
+
locationId?: string | null;
|
|
41
|
+
warehouseId?: string | null;
|
|
42
|
+
orderDate: string;
|
|
43
|
+
expectedDeliveryDate?: string | null;
|
|
44
|
+
status?: typeof PurchaseOrderStatus.DRAFT | typeof PurchaseOrderStatus.ORDERED;
|
|
45
|
+
lines: PurchaseOrderLineInput[];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface UpdatePurchaseOrderRequest {
|
|
49
|
+
supplierId?: string;
|
|
50
|
+
locationId?: string | null;
|
|
51
|
+
warehouseId?: string | null;
|
|
52
|
+
orderDate?: string;
|
|
53
|
+
expectedDeliveryDate?: string | null;
|
|
54
|
+
lines?: PurchaseOrderLineInput[];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface ReceivePurchaseOrderLineInput {
|
|
58
|
+
lineId: string;
|
|
59
|
+
quantityReceived: number;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface ReceivePurchaseOrderRequest {
|
|
63
|
+
lines: ReceivePurchaseOrderLineInput[];
|
|
64
|
+
closeAs: PurchaseOrderReceiveCloseAs;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface CreatePurchaseOrderPaymentRequest {
|
|
68
|
+
amount: string;
|
|
69
|
+
paidAt: string;
|
|
70
|
+
paymentMethodId: string;
|
|
71
|
+
reference?: string | null;
|
|
72
|
+
note?: string | null;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface PrefillPurchaseOrdersQuery {
|
|
76
|
+
locationId?: string;
|
|
77
|
+
warehouseId?: string;
|
|
78
|
+
mode: PurchaseOrderPrefillMode;
|
|
79
|
+
supplierId?: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type PurchaseOrderPrefillResult = PurchaseOrderPrefillLineDto[];
|
|
83
|
+
|
|
84
|
+
export type PurchaseOrderDetailResponse = PurchaseOrderDetailDto;
|
|
85
|
+
export type PurchaseOrderPaymentListResult = PurchaseOrderPaymentDto[];
|
|
@@ -3,6 +3,6 @@ import {WarehouseModel} from "./warehouse.model";
|
|
|
3
3
|
export interface WarehouseStockLevelModel {
|
|
4
4
|
warehouse: WarehouseModel;
|
|
5
5
|
currentStockCount: number;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
lowStockLevel: number;
|
|
7
|
+
reorderQuantity: number | null;
|
|
8
8
|
}
|