@tolinax/ayoune-interfaces 2026.26.0 → 2026.27.0
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/data/modelNames.d.ts +4 -0
- package/data/modelNames.js +4 -0
- package/data/modelsAndRights.js +40 -0
- package/interfaces/IMaterialCommissioning.d.ts +58 -0
- package/interfaces/IMaterialCommissioning.js +2 -0
- package/interfaces/IPickList.d.ts +68 -0
- package/interfaces/IPickList.js +2 -0
- package/interfaces/IPutAwayOrder.d.ts +58 -0
- package/interfaces/IPutAwayOrder.js +2 -0
- package/interfaces/IStock.d.ts +8 -0
- package/interfaces/IStockLog.d.ts +28 -0
- package/interfaces/IStockLog.js +30 -0
- package/interfaces/IStockReservation.d.ts +35 -0
- package/interfaces/IStockReservation.js +2 -0
- package/interfaces/index.d.ts +4 -0
- package/interfaces/index.js +4 -0
- package/package.json +1 -1
package/data/modelNames.d.ts
CHANGED
|
@@ -406,6 +406,7 @@ export declare enum aMN {
|
|
|
406
406
|
IndustryKPIs = "IndustryKPIs",
|
|
407
407
|
MarketResearches = "MarketResearches",
|
|
408
408
|
Markets = "Markets",
|
|
409
|
+
MaterialCommissionings = "MaterialCommissionings",
|
|
409
410
|
MeetingLocations = "MeetingLocations",
|
|
410
411
|
MeetingMinutes = "MeetingMinutes",
|
|
411
412
|
Meetings = "Meetings",
|
|
@@ -449,6 +450,7 @@ export declare enum aMN {
|
|
|
449
450
|
PaymentGroups = "PaymentGroups",
|
|
450
451
|
PaymentProviders = "PaymentProviders",
|
|
451
452
|
PermissionRequests = "PermissionRequests",
|
|
453
|
+
PickLists = "PickLists",
|
|
452
454
|
PimSelections = "PimSelections",
|
|
453
455
|
Pipelines = "Pipelines",
|
|
454
456
|
Polls = "Polls",
|
|
@@ -495,6 +497,7 @@ export declare enum aMN {
|
|
|
495
497
|
PublicationRuns = "PublicationRuns",
|
|
496
498
|
Publications = "Publications",
|
|
497
499
|
PublisherAPIs = "PublisherAPIs",
|
|
500
|
+
PutAwayOrders = "PutAwayOrders",
|
|
498
501
|
PushClicks = "PushClicks",
|
|
499
502
|
PushDeliveries = "PushDeliveries",
|
|
500
503
|
PushErrors = "PushErrors",
|
|
@@ -571,6 +574,7 @@ export declare enum aMN {
|
|
|
571
574
|
StateLogs = "StateLogs",
|
|
572
575
|
States = "States",
|
|
573
576
|
StockLogs = "StockLogs",
|
|
577
|
+
StockReservations = "StockReservations",
|
|
574
578
|
Stocks = "Stocks",
|
|
575
579
|
StorageAreas = "StorageAreas",
|
|
576
580
|
StoreAssets = "StoreAssets",
|
package/data/modelNames.js
CHANGED
|
@@ -410,6 +410,7 @@ var aMN;
|
|
|
410
410
|
aMN["IndustryKPIs"] = "IndustryKPIs";
|
|
411
411
|
aMN["MarketResearches"] = "MarketResearches";
|
|
412
412
|
aMN["Markets"] = "Markets";
|
|
413
|
+
aMN["MaterialCommissionings"] = "MaterialCommissionings";
|
|
413
414
|
aMN["MeetingLocations"] = "MeetingLocations";
|
|
414
415
|
aMN["MeetingMinutes"] = "MeetingMinutes";
|
|
415
416
|
aMN["Meetings"] = "Meetings";
|
|
@@ -453,6 +454,7 @@ var aMN;
|
|
|
453
454
|
aMN["PaymentGroups"] = "PaymentGroups";
|
|
454
455
|
aMN["PaymentProviders"] = "PaymentProviders";
|
|
455
456
|
aMN["PermissionRequests"] = "PermissionRequests";
|
|
457
|
+
aMN["PickLists"] = "PickLists";
|
|
456
458
|
aMN["PimSelections"] = "PimSelections";
|
|
457
459
|
aMN["Pipelines"] = "Pipelines";
|
|
458
460
|
aMN["Polls"] = "Polls";
|
|
@@ -499,6 +501,7 @@ var aMN;
|
|
|
499
501
|
aMN["PublicationRuns"] = "PublicationRuns";
|
|
500
502
|
aMN["Publications"] = "Publications";
|
|
501
503
|
aMN["PublisherAPIs"] = "PublisherAPIs";
|
|
504
|
+
aMN["PutAwayOrders"] = "PutAwayOrders";
|
|
502
505
|
aMN["PushClicks"] = "PushClicks";
|
|
503
506
|
aMN["PushDeliveries"] = "PushDeliveries";
|
|
504
507
|
aMN["PushErrors"] = "PushErrors";
|
|
@@ -575,6 +578,7 @@ var aMN;
|
|
|
575
578
|
aMN["StateLogs"] = "StateLogs";
|
|
576
579
|
aMN["States"] = "States";
|
|
577
580
|
aMN["StockLogs"] = "StockLogs";
|
|
581
|
+
aMN["StockReservations"] = "StockReservations";
|
|
578
582
|
aMN["Stocks"] = "Stocks";
|
|
579
583
|
aMN["StorageAreas"] = "StorageAreas";
|
|
580
584
|
aMN["StoreAssets"] = "StoreAssets";
|
package/data/modelsAndRights.js
CHANGED
|
@@ -4266,6 +4266,16 @@ const modelsAndRights = [
|
|
|
4266
4266
|
allowDuplicate: false,
|
|
4267
4267
|
updateBy: "_id",
|
|
4268
4268
|
},
|
|
4269
|
+
{
|
|
4270
|
+
plural: "MaterialCommissionings",
|
|
4271
|
+
singular: "MaterialCommissioning",
|
|
4272
|
+
module: "warehouse",
|
|
4273
|
+
right: "warehouse.materialcommissionings",
|
|
4274
|
+
readOnly: false,
|
|
4275
|
+
importable: false,
|
|
4276
|
+
allowDuplicate: false,
|
|
4277
|
+
updateBy: "_id",
|
|
4278
|
+
},
|
|
4269
4279
|
{
|
|
4270
4280
|
plural: "MeetingLocations",
|
|
4271
4281
|
singular: "MeetingLocation",
|
|
@@ -4693,6 +4703,16 @@ const modelsAndRights = [
|
|
|
4693
4703
|
allowDuplicate: false,
|
|
4694
4704
|
updateBy: "_id",
|
|
4695
4705
|
},
|
|
4706
|
+
{
|
|
4707
|
+
plural: "PickLists",
|
|
4708
|
+
singular: "PickList",
|
|
4709
|
+
module: "warehouse",
|
|
4710
|
+
right: "warehouse.picklists",
|
|
4711
|
+
readOnly: false,
|
|
4712
|
+
importable: false,
|
|
4713
|
+
allowDuplicate: false,
|
|
4714
|
+
updateBy: "_id",
|
|
4715
|
+
},
|
|
4696
4716
|
{
|
|
4697
4717
|
plural: "PimSelections",
|
|
4698
4718
|
singular: "PimSelection",
|
|
@@ -5151,6 +5171,16 @@ const modelsAndRights = [
|
|
|
5151
5171
|
allowDuplicate: false,
|
|
5152
5172
|
updateBy: "_id",
|
|
5153
5173
|
},
|
|
5174
|
+
{
|
|
5175
|
+
plural: "PutAwayOrders",
|
|
5176
|
+
singular: "PutAwayOrder",
|
|
5177
|
+
module: "warehouse",
|
|
5178
|
+
right: "warehouse.putawayorders",
|
|
5179
|
+
readOnly: false,
|
|
5180
|
+
importable: false,
|
|
5181
|
+
allowDuplicate: false,
|
|
5182
|
+
updateBy: "_id",
|
|
5183
|
+
},
|
|
5154
5184
|
{
|
|
5155
5185
|
plural: "PushClicks",
|
|
5156
5186
|
singular: "PushClick",
|
|
@@ -5843,6 +5873,16 @@ const modelsAndRights = [
|
|
|
5843
5873
|
allowDuplicate: false,
|
|
5844
5874
|
updateBy: "_id",
|
|
5845
5875
|
},
|
|
5876
|
+
{
|
|
5877
|
+
plural: "StockReservations",
|
|
5878
|
+
singular: "StockReservation",
|
|
5879
|
+
module: "warehouse",
|
|
5880
|
+
right: "warehouse.stockreservations",
|
|
5881
|
+
readOnly: false,
|
|
5882
|
+
importable: false,
|
|
5883
|
+
allowDuplicate: false,
|
|
5884
|
+
updateBy: "_id",
|
|
5885
|
+
},
|
|
5846
5886
|
{
|
|
5847
5887
|
plural: "Stocks",
|
|
5848
5888
|
singular: "Stock",
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { IDefaultFields } from "./IDefaultFields";
|
|
2
|
+
/**
|
|
3
|
+
* Material Commissioning Position — single material line in a commissioning order.
|
|
4
|
+
*/
|
|
5
|
+
export interface IMaterialCommissioningPosition {
|
|
6
|
+
pos: number;
|
|
7
|
+
product: ObjectId;
|
|
8
|
+
productSKU?: string;
|
|
9
|
+
productTitle?: string;
|
|
10
|
+
qtyRequired: number;
|
|
11
|
+
qtyReserved?: number;
|
|
12
|
+
qtyPicked?: number;
|
|
13
|
+
qtyDelivered?: number;
|
|
14
|
+
qtyConsumed?: number;
|
|
15
|
+
qtyReturned?: number;
|
|
16
|
+
unit?: string;
|
|
17
|
+
lot?: ObjectId;
|
|
18
|
+
storageArea?: ObjectId;
|
|
19
|
+
warehouse?: ObjectId;
|
|
20
|
+
stockReservation?: ObjectId;
|
|
21
|
+
status: "pending" | "reserved" | "picked" | "delivered" | "consumed" | "returned" | "short";
|
|
22
|
+
pickedAt?: Date;
|
|
23
|
+
deliveredAt?: Date;
|
|
24
|
+
consumedAt?: Date;
|
|
25
|
+
note?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Material Commissioning — formal workflow for picking and delivering material to a production step.
|
|
29
|
+
*
|
|
30
|
+
* Solves the gap that material is currently embedded as a subdocument in IProductionOrder.material[]
|
|
31
|
+
* and IProductionOrdersPosition.material[] without standalone CRUD or audit trail.
|
|
32
|
+
*
|
|
33
|
+
* Lifecycle: planned → reserved → picking → delivered → consumed
|
|
34
|
+
*/
|
|
35
|
+
export interface IMaterialCommissioning extends IDefaultFields {
|
|
36
|
+
_customerID: ObjectId;
|
|
37
|
+
_clientID?: ObjectId[];
|
|
38
|
+
_subID?: ObjectId[];
|
|
39
|
+
nbr?: string;
|
|
40
|
+
status: "planned" | "reserved" | "picking" | "delivered" | "consumed" | "cancelled";
|
|
41
|
+
productionOrder: ObjectId;
|
|
42
|
+
productionOrderPosition?: number;
|
|
43
|
+
productionOrderPositionStep?: number;
|
|
44
|
+
workCenter?: ObjectId;
|
|
45
|
+
machine?: ObjectId;
|
|
46
|
+
positions: IMaterialCommissioningPosition[];
|
|
47
|
+
totalLines?: number;
|
|
48
|
+
completedLines?: number;
|
|
49
|
+
progress?: number;
|
|
50
|
+
pickList?: ObjectId;
|
|
51
|
+
plannedFor?: Date;
|
|
52
|
+
reservedAt?: Date;
|
|
53
|
+
pickedAt?: Date;
|
|
54
|
+
deliveredAt?: Date;
|
|
55
|
+
consumedAt?: Date;
|
|
56
|
+
deliveredBy?: ObjectId;
|
|
57
|
+
note?: string;
|
|
58
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { IDefaultFields } from "./IDefaultFields";
|
|
2
|
+
/**
|
|
3
|
+
* Pick List Position — single line in a pick list.
|
|
4
|
+
*/
|
|
5
|
+
export interface IPickListPosition {
|
|
6
|
+
pos: number;
|
|
7
|
+
product: ObjectId;
|
|
8
|
+
productSKU?: string;
|
|
9
|
+
productTitle?: string;
|
|
10
|
+
storageArea?: ObjectId;
|
|
11
|
+
warehouse?: ObjectId;
|
|
12
|
+
qtyRequested: number;
|
|
13
|
+
qtyPicked?: number;
|
|
14
|
+
qtyMissing?: number;
|
|
15
|
+
unit?: string;
|
|
16
|
+
lot?: ObjectId;
|
|
17
|
+
lotNumber?: string;
|
|
18
|
+
serialNumbers?: string[];
|
|
19
|
+
sourceType: "assignment" | "productionOrder" | "shipping" | "internalOrder" | "manual";
|
|
20
|
+
sourceId: ObjectId;
|
|
21
|
+
sourcePosition?: number;
|
|
22
|
+
sourceStep?: number;
|
|
23
|
+
stockReservation?: ObjectId;
|
|
24
|
+
status: "pending" | "picked" | "short" | "skipped" | "cancelled";
|
|
25
|
+
pickedAt?: Date;
|
|
26
|
+
pickedBy?: ObjectId;
|
|
27
|
+
note?: string;
|
|
28
|
+
skipReason?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Pick List — formal picking instruction for warehouse workers.
|
|
32
|
+
*
|
|
33
|
+
* Replaces the gap where IPackList was used loosely for both picking and packing.
|
|
34
|
+
* IPickList is strictly for picking; IPackList stays for packing.
|
|
35
|
+
*
|
|
36
|
+
* Picking strategies:
|
|
37
|
+
* - single_order: one assignment / production order per pick
|
|
38
|
+
* - wave: multiple orders grouped, picker walks once
|
|
39
|
+
* - batch: same product across many orders, then sort
|
|
40
|
+
* - cluster: multiple bins on a cart, sorted in real-time
|
|
41
|
+
*/
|
|
42
|
+
export interface IPickList extends IDefaultFields {
|
|
43
|
+
_customerID: ObjectId;
|
|
44
|
+
_clientID?: ObjectId[];
|
|
45
|
+
_subID?: ObjectId[];
|
|
46
|
+
nbr?: string;
|
|
47
|
+
name?: string;
|
|
48
|
+
status: "open" | "in_progress" | "completed" | "cancelled";
|
|
49
|
+
type: "single_order" | "wave" | "batch" | "cluster";
|
|
50
|
+
warehouse: ObjectId;
|
|
51
|
+
assignedTo?: ObjectId;
|
|
52
|
+
assignments?: ObjectId[];
|
|
53
|
+
productionOrders?: ObjectId[];
|
|
54
|
+
shippings?: ObjectId[];
|
|
55
|
+
internalOrders?: ObjectId[];
|
|
56
|
+
pickWave?: ObjectId;
|
|
57
|
+
positions: IPickListPosition[];
|
|
58
|
+
totalLines?: number;
|
|
59
|
+
pickedLines?: number;
|
|
60
|
+
progress?: number;
|
|
61
|
+
pickingStrategy?: "fifo" | "lifo" | "fefo" | "random" | "shortest_path";
|
|
62
|
+
walkingPath?: ObjectId[];
|
|
63
|
+
startedAt?: Date;
|
|
64
|
+
completedAt?: Date;
|
|
65
|
+
deadline?: Date;
|
|
66
|
+
pickConfirmation?: ObjectId;
|
|
67
|
+
note?: string;
|
|
68
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { IDefaultFields } from "./IDefaultFields";
|
|
2
|
+
/**
|
|
3
|
+
* Put-Away Position — single line in a put-away order.
|
|
4
|
+
*/
|
|
5
|
+
export interface IPutAwayPosition {
|
|
6
|
+
pos: number;
|
|
7
|
+
product: ObjectId;
|
|
8
|
+
productSKU?: string;
|
|
9
|
+
productTitle?: string;
|
|
10
|
+
qty: number;
|
|
11
|
+
unit?: string;
|
|
12
|
+
lot?: ObjectId;
|
|
13
|
+
lotNumber?: string;
|
|
14
|
+
serialNumbers?: string[];
|
|
15
|
+
sourceArea?: ObjectId;
|
|
16
|
+
suggestedArea?: ObjectId;
|
|
17
|
+
suggestedReason?: "empty_bin" | "same_product" | "abc_class" | "fefo" | "fifo" | "manual";
|
|
18
|
+
actualArea?: ObjectId;
|
|
19
|
+
placedAt?: Date;
|
|
20
|
+
placedBy?: ObjectId;
|
|
21
|
+
status: "pending" | "placed" | "skipped";
|
|
22
|
+
note?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Put-Away Order — instruction for warehouse workers to place received goods in storage.
|
|
26
|
+
*
|
|
27
|
+
* Solves the gap that after a GoodsReceipt is approved, there is no formal instruction
|
|
28
|
+
* where to put the items. Receiving area accumulates without systematic placement.
|
|
29
|
+
*
|
|
30
|
+
* Strategies:
|
|
31
|
+
* - empty_bin: prefer empty storage areas first
|
|
32
|
+
* - same_product: consolidate with existing stock of same product
|
|
33
|
+
* - abc_class: place high-velocity items in close locations
|
|
34
|
+
* - fefo: first-expiry-first-out (for perishables)
|
|
35
|
+
* - fifo: first-in-first-out
|
|
36
|
+
* - manual: warehouse worker decides
|
|
37
|
+
*/
|
|
38
|
+
export interface IPutAwayOrder extends IDefaultFields {
|
|
39
|
+
_customerID: ObjectId;
|
|
40
|
+
_clientID?: ObjectId[];
|
|
41
|
+
_subID?: ObjectId[];
|
|
42
|
+
nbr?: string;
|
|
43
|
+
status: "pending" | "in_progress" | "completed" | "cancelled";
|
|
44
|
+
warehouse: ObjectId;
|
|
45
|
+
assignedTo?: ObjectId;
|
|
46
|
+
goodsReceipt?: ObjectId;
|
|
47
|
+
productionOrder?: ObjectId;
|
|
48
|
+
internalOrder?: ObjectId;
|
|
49
|
+
returnOrder?: ObjectId;
|
|
50
|
+
strategy?: "empty_bin" | "same_product" | "abc_class" | "fefo" | "fifo" | "manual";
|
|
51
|
+
positions: IPutAwayPosition[];
|
|
52
|
+
totalLines?: number;
|
|
53
|
+
completedLines?: number;
|
|
54
|
+
progress?: number;
|
|
55
|
+
startedAt?: Date;
|
|
56
|
+
completedAt?: Date;
|
|
57
|
+
note?: string;
|
|
58
|
+
}
|
package/interfaces/IStock.d.ts
CHANGED
|
@@ -8,6 +8,14 @@ export interface IStock extends IDefaultFields {
|
|
|
8
8
|
warehouse?: ObjectId;
|
|
9
9
|
storageArea?: ObjectId;
|
|
10
10
|
amount?: number;
|
|
11
|
+
/** Sum of active stock reservations against this stock record (computed). */
|
|
12
|
+
amountReserved?: number;
|
|
13
|
+
/** amount - amountReserved (computed). Authoritative for available-to-promise. */
|
|
14
|
+
amountAvailable?: number;
|
|
15
|
+
/** Quantity currently in quality control. */
|
|
16
|
+
amountInQC?: number;
|
|
17
|
+
/** Quantity currently in quarantine. */
|
|
18
|
+
amountInQuarantine?: number;
|
|
11
19
|
unit?: string;
|
|
12
20
|
serialNumber?: string;
|
|
13
21
|
lotNumber?: string;
|
|
@@ -1,4 +1,32 @@
|
|
|
1
1
|
import { IDefaultFields } from "./IDefaultFields";
|
|
2
|
+
/**
|
|
3
|
+
* Canonical movement types for stock log entries.
|
|
4
|
+
*
|
|
5
|
+
* Use these constants instead of free-form strings to prevent typos.
|
|
6
|
+
* The `kindofmovement` field on IStockLog stays a `string` for backward compat —
|
|
7
|
+
* but new code should use values from this enum.
|
|
8
|
+
*/
|
|
9
|
+
export declare enum StockMovementKind {
|
|
10
|
+
Incoming = "incoming",
|
|
11
|
+
Outgoing = "outgoing",
|
|
12
|
+
Transfer = "transfer",
|
|
13
|
+
Reservation = "reservation",
|
|
14
|
+
ReservationRelease = "reservation_release",
|
|
15
|
+
Production = "production",
|
|
16
|
+
Consumption = "consumption",
|
|
17
|
+
PutAway = "putaway",
|
|
18
|
+
Picking = "picking",
|
|
19
|
+
Pack = "pack",
|
|
20
|
+
Ship = "ship",
|
|
21
|
+
Return = "return",
|
|
22
|
+
Adjustment = "adjustment",
|
|
23
|
+
QuarantineIn = "quarantine_in",
|
|
24
|
+
QuarantineOut = "quarantine_out",
|
|
25
|
+
QcIn = "qc_in",
|
|
26
|
+
QcOut = "qc_out",
|
|
27
|
+
Replenishment = "replenishment",
|
|
28
|
+
InventoryCount = "inventory_count"
|
|
29
|
+
}
|
|
2
30
|
export interface IStockLog extends IDefaultFields {
|
|
3
31
|
_customerID: ObjectId;
|
|
4
32
|
_clientID?: ObjectId[];
|
package/interfaces/IStockLog.js
CHANGED
|
@@ -1,2 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StockMovementKind = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Canonical movement types for stock log entries.
|
|
6
|
+
*
|
|
7
|
+
* Use these constants instead of free-form strings to prevent typos.
|
|
8
|
+
* The `kindofmovement` field on IStockLog stays a `string` for backward compat —
|
|
9
|
+
* but new code should use values from this enum.
|
|
10
|
+
*/
|
|
11
|
+
var StockMovementKind;
|
|
12
|
+
(function (StockMovementKind) {
|
|
13
|
+
StockMovementKind["Incoming"] = "incoming";
|
|
14
|
+
StockMovementKind["Outgoing"] = "outgoing";
|
|
15
|
+
StockMovementKind["Transfer"] = "transfer";
|
|
16
|
+
StockMovementKind["Reservation"] = "reservation";
|
|
17
|
+
StockMovementKind["ReservationRelease"] = "reservation_release";
|
|
18
|
+
StockMovementKind["Production"] = "production";
|
|
19
|
+
StockMovementKind["Consumption"] = "consumption";
|
|
20
|
+
StockMovementKind["PutAway"] = "putaway";
|
|
21
|
+
StockMovementKind["Picking"] = "picking";
|
|
22
|
+
StockMovementKind["Pack"] = "pack";
|
|
23
|
+
StockMovementKind["Ship"] = "ship";
|
|
24
|
+
StockMovementKind["Return"] = "return";
|
|
25
|
+
StockMovementKind["Adjustment"] = "adjustment";
|
|
26
|
+
StockMovementKind["QuarantineIn"] = "quarantine_in";
|
|
27
|
+
StockMovementKind["QuarantineOut"] = "quarantine_out";
|
|
28
|
+
StockMovementKind["QcIn"] = "qc_in";
|
|
29
|
+
StockMovementKind["QcOut"] = "qc_out";
|
|
30
|
+
StockMovementKind["Replenishment"] = "replenishment";
|
|
31
|
+
StockMovementKind["InventoryCount"] = "inventory_count";
|
|
32
|
+
})(StockMovementKind || (exports.StockMovementKind = StockMovementKind = {}));
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { IDefaultFields } from "./IDefaultFields";
|
|
2
|
+
/**
|
|
3
|
+
* Stock Reservation — quantitative reservation of stock for a specific source document.
|
|
4
|
+
*
|
|
5
|
+
* Solves the gap that IStock only knows `amount` (no available vs. reserved distinction)
|
|
6
|
+
* and IAssignment.stock_booked is just a boolean flag.
|
|
7
|
+
*
|
|
8
|
+
* Lifecycle: active → fulfilled (when picked) | released (manual cancel) | expired (TTL).
|
|
9
|
+
*/
|
|
10
|
+
export interface IStockReservation extends IDefaultFields {
|
|
11
|
+
_customerID: ObjectId;
|
|
12
|
+
_clientID?: ObjectId[];
|
|
13
|
+
_subID?: ObjectId[];
|
|
14
|
+
product: ObjectId;
|
|
15
|
+
warehouse: ObjectId;
|
|
16
|
+
storageArea?: ObjectId;
|
|
17
|
+
lot?: ObjectId;
|
|
18
|
+
serialNumbers?: string[];
|
|
19
|
+
qtyReserved: number;
|
|
20
|
+
qtyFulfilled?: number;
|
|
21
|
+
unit?: string;
|
|
22
|
+
sourceType: "assignment" | "productionOrder" | "internalOrder" | "shipping" | "manual";
|
|
23
|
+
sourceId: ObjectId;
|
|
24
|
+
sourcePosition?: number;
|
|
25
|
+
sourceStep?: number;
|
|
26
|
+
status: "active" | "released" | "fulfilled" | "expired";
|
|
27
|
+
reservedAt?: Date;
|
|
28
|
+
expiresAt?: Date;
|
|
29
|
+
releasedAt?: Date;
|
|
30
|
+
fulfilledAt?: Date;
|
|
31
|
+
priority?: number;
|
|
32
|
+
pickList?: ObjectId;
|
|
33
|
+
reservedBy?: ObjectId;
|
|
34
|
+
note?: string;
|
|
35
|
+
}
|
package/interfaces/index.d.ts
CHANGED
|
@@ -429,6 +429,7 @@ export * from "./IMarketBudgetByIndustry";
|
|
|
429
429
|
export * from "./IIndustryKPI";
|
|
430
430
|
export * from "./IMarketResearch";
|
|
431
431
|
export * from "./IMaterial";
|
|
432
|
+
export * from "./IMaterialCommissioning";
|
|
432
433
|
export * from "./IMeeting";
|
|
433
434
|
export * from "./IMeetingGroup";
|
|
434
435
|
export * from "./IEventRegisterView";
|
|
@@ -476,6 +477,7 @@ export * from "./IPAT";
|
|
|
476
477
|
export * from "./IPaymentGroup";
|
|
477
478
|
export * from "./IPaymentProvider";
|
|
478
479
|
export * from "./IPermissionRequest";
|
|
480
|
+
export * from "./IPickList";
|
|
479
481
|
export * from "./IPimSelection";
|
|
480
482
|
export * from "./IPipeline";
|
|
481
483
|
export * from "./IPoints";
|
|
@@ -527,6 +529,7 @@ export * from "./IPublication";
|
|
|
527
529
|
export * from "./IPublicationOptions";
|
|
528
530
|
export * from "./IPublicationRun";
|
|
529
531
|
export * from "./IPublisherAPI";
|
|
532
|
+
export * from "./IPutAwayOrder";
|
|
530
533
|
export * from "./IPushClick";
|
|
531
534
|
export * from "./IPushDelivery";
|
|
532
535
|
export * from "./IPushError";
|
|
@@ -609,6 +612,7 @@ export * from "./IState";
|
|
|
609
612
|
export * from "./IStateLog";
|
|
610
613
|
export * from "./IStock";
|
|
611
614
|
export * from "./IStockLog";
|
|
615
|
+
export * from "./IStockReservation";
|
|
612
616
|
export * from "./IStorageArea";
|
|
613
617
|
export * from "./IStore";
|
|
614
618
|
export * from "./IStoreAsset";
|
package/interfaces/index.js
CHANGED
|
@@ -445,6 +445,7 @@ __exportStar(require("./IMarketBudgetByIndustry"), exports);
|
|
|
445
445
|
__exportStar(require("./IIndustryKPI"), exports);
|
|
446
446
|
__exportStar(require("./IMarketResearch"), exports);
|
|
447
447
|
__exportStar(require("./IMaterial"), exports);
|
|
448
|
+
__exportStar(require("./IMaterialCommissioning"), exports);
|
|
448
449
|
__exportStar(require("./IMeeting"), exports);
|
|
449
450
|
__exportStar(require("./IMeetingGroup"), exports);
|
|
450
451
|
__exportStar(require("./IEventRegisterView"), exports);
|
|
@@ -492,6 +493,7 @@ __exportStar(require("./IPAT"), exports);
|
|
|
492
493
|
__exportStar(require("./IPaymentGroup"), exports);
|
|
493
494
|
__exportStar(require("./IPaymentProvider"), exports);
|
|
494
495
|
__exportStar(require("./IPermissionRequest"), exports);
|
|
496
|
+
__exportStar(require("./IPickList"), exports);
|
|
495
497
|
__exportStar(require("./IPimSelection"), exports);
|
|
496
498
|
__exportStar(require("./IPipeline"), exports);
|
|
497
499
|
__exportStar(require("./IPoints"), exports);
|
|
@@ -543,6 +545,7 @@ __exportStar(require("./IPublication"), exports);
|
|
|
543
545
|
__exportStar(require("./IPublicationOptions"), exports);
|
|
544
546
|
__exportStar(require("./IPublicationRun"), exports);
|
|
545
547
|
__exportStar(require("./IPublisherAPI"), exports);
|
|
548
|
+
__exportStar(require("./IPutAwayOrder"), exports);
|
|
546
549
|
__exportStar(require("./IPushClick"), exports);
|
|
547
550
|
__exportStar(require("./IPushDelivery"), exports);
|
|
548
551
|
__exportStar(require("./IPushError"), exports);
|
|
@@ -625,6 +628,7 @@ __exportStar(require("./IState"), exports);
|
|
|
625
628
|
__exportStar(require("./IStateLog"), exports);
|
|
626
629
|
__exportStar(require("./IStock"), exports);
|
|
627
630
|
__exportStar(require("./IStockLog"), exports);
|
|
631
|
+
__exportStar(require("./IStockReservation"), exports);
|
|
628
632
|
__exportStar(require("./IStorageArea"), exports);
|
|
629
633
|
__exportStar(require("./IStore"), exports);
|
|
630
634
|
__exportStar(require("./IStoreAsset"), exports);
|