@managesome/eposmatic-toolkit 0.2.363 → 0.2.365
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/lib/constants/ENUMS.d.ts +221 -0
- package/lib/constants/ENUMS.js +270 -4
- package/lib/constants/PURCHASE_ORDER.js +12 -3
- package/lib/helpers/store/common-purchase-order-actions.d.ts +2 -2
- package/lib/helpers/store/purchase-orders-cart-actions.d.ts +7 -6
- package/lib/helpers/utils/common.d.ts +1 -0
- package/lib/helpers/utils/common.js +14 -1
- package/lib/helpers/utils/items-comparison-report-helpers.js +5 -7
- package/lib/schemas/models/index.d.ts +11 -0
- package/lib/schemas/models/index.js +11 -0
- package/lib/schemas/models/internal_movements.d.ts +357 -0
- package/lib/schemas/models/internal_movements.js +323 -0
- package/lib/schemas/models/inventory_lot_serial_numbers.d.ts +154 -0
- package/lib/schemas/models/inventory_lot_serial_numbers.js +193 -0
- package/lib/schemas/models/item_transactions.d.ts +3 -3
- package/lib/schemas/models/purchase_order_receipts.d.ts +165 -0
- package/lib/schemas/models/purchase_order_receipts.js +151 -0
- package/lib/schemas/models/purchase_order_rfq.d.ts +1938 -0
- package/lib/schemas/models/purchase_order_rfq.js +309 -0
- package/lib/schemas/models/purchase_order_vendor_returns.d.ts +234 -0
- package/lib/schemas/models/purchase_order_vendor_returns.js +188 -0
- package/lib/schemas/models/purchase_orders.d.ts +6 -3
- package/lib/schemas/models/purchase_orders.js +10 -1
- package/lib/schemas/models/rewards_usage.d.ts +3 -3
- package/lib/schemas/models/rider.d.ts +3 -3
- package/lib/schemas/models/sale_order_deliveries.d.ts +167 -0
- package/lib/schemas/models/sale_order_deliveries.js +155 -0
- package/lib/schemas/models/sale_order_invoices.d.ts +218 -0
- package/lib/schemas/models/sale_order_invoices.js +192 -0
- package/lib/schemas/models/sale_order_rfq.d.ts +1938 -0
- package/lib/schemas/models/sale_order_rfq.js +309 -0
- package/lib/schemas/models/sale_orders.d.ts +1943 -0
- package/lib/schemas/models/sale_orders.js +324 -0
- package/lib/schemas/models/void_purchase_order_items.d.ts +3 -3
- package/lib/schemas/models/void_purchase_order_items.js +2 -1
- package/lib/schemas/models/void_warehouse_invoice_items.d.ts +9 -9
- package/lib/schemas/models/warehouse-activity-logs.d.ts +127 -0
- package/lib/schemas/models/warehouse-activity-logs.js +143 -0
- package/lib/schemas/models/warehouse-communications.d.ts +228 -0
- package/lib/schemas/models/warehouse-communications.js +216 -0
- package/lib/schemas/models/warehouse.d.ts +7 -1
- package/lib/schemas/models/warehouse.js +9 -0
- package/lib/schemas/models/warehouse_categories.d.ts +4 -0
- package/lib/schemas/models/warehouse_categories.js +6 -0
- package/lib/schemas/models/warehouse_clients.d.ts +6 -0
- package/lib/schemas/models/warehouse_clients.js +8 -0
- package/lib/schemas/models/warehouse_inventory_transactions.d.ts +3 -3
- package/lib/schemas/models/warehouse_invoices.d.ts +3 -3
- package/lib/schemas/models/warehouse_item_transactions.d.ts +6 -6
- package/lib/schemas/models/warehouse_items.d.ts +28 -9
- package/lib/schemas/models/warehouse_items.js +29 -0
- package/lib/schemas/models/warehouse_vendors.d.ts +3 -3
- package/lib/schemas/types/index.d.ts +13 -0
- package/lib/schemas/types/index.js +13 -0
- package/lib/schemas/types/internal_movements.d.ts +73 -0
- package/lib/schemas/types/internal_movements.js +2 -0
- package/lib/schemas/types/inventory_lot_serial_numbers.d.ts +85 -0
- package/lib/schemas/types/inventory_lot_serial_numbers.js +4 -0
- package/lib/schemas/types/purchase_order_common.d.ts +39 -0
- package/lib/schemas/types/purchase_order_common.js +2 -0
- package/lib/schemas/types/purchase_order_receipts.d.ts +39 -0
- package/lib/schemas/types/purchase_order_receipts.js +21 -0
- package/lib/schemas/types/purchase_order_rfq.d.ts +25 -0
- package/lib/schemas/types/purchase_order_rfq.js +2 -0
- package/lib/schemas/types/purchase_order_vendor_returns.d.ts +49 -0
- package/lib/schemas/types/purchase_order_vendor_returns.js +42 -0
- package/lib/schemas/types/purchase_orders.d.ts +7 -43
- package/lib/schemas/types/sale_order_common.d.ts +39 -0
- package/lib/schemas/types/sale_order_common.js +2 -0
- package/lib/schemas/types/sale_order_deliveries.d.ts +67 -0
- package/lib/schemas/types/sale_order_deliveries.js +2 -0
- package/lib/schemas/types/sale_order_invoices.d.ts +46 -0
- package/lib/schemas/types/sale_order_invoices.js +2 -0
- package/lib/schemas/types/sale_order_rfq.d.ts +25 -0
- package/lib/schemas/types/sale_order_rfq.js +2 -0
- package/lib/schemas/types/sale_orders.d.ts +30 -0
- package/lib/schemas/types/sale_orders.js +2 -0
- package/lib/schemas/types/warehouse-activity-logs.d.ts +35 -0
- package/lib/schemas/types/warehouse-activity-logs.js +4 -0
- package/lib/schemas/types/warehouse-communications.d.ts +53 -0
- package/lib/schemas/types/warehouse-communications.js +2 -0
- package/lib/schemas/types/warehouse.d.ts +3 -1
- package/lib/schemas/types/warehouse_categories.d.ts +2 -0
- package/lib/schemas/types/warehouse_clients.d.ts +2 -0
- package/lib/schemas/types/warehouse_items.d.ts +7 -1
- package/package.json +1 -1
|
@@ -17,11 +17,11 @@ export declare const WarehouseItemTransactionsSchema: Schema<any, import("mongoo
|
|
|
17
17
|
order_number: number;
|
|
18
18
|
quantity: number;
|
|
19
19
|
item_id: import("mongoose").Types.ObjectId;
|
|
20
|
+
warehouse_id: string;
|
|
21
|
+
selling_price: number;
|
|
20
22
|
item_name: string;
|
|
21
23
|
category_name: string;
|
|
22
|
-
selling_price: number;
|
|
23
24
|
cost_price: number;
|
|
24
|
-
warehouse_id: string;
|
|
25
25
|
order_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
26
26
|
description?: string | null | undefined;
|
|
27
27
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
@@ -38,11 +38,11 @@ export declare const WarehouseItemTransactionsSchema: Schema<any, import("mongoo
|
|
|
38
38
|
order_number: number;
|
|
39
39
|
quantity: number;
|
|
40
40
|
item_id: import("mongoose").Types.ObjectId;
|
|
41
|
+
warehouse_id: string;
|
|
42
|
+
selling_price: number;
|
|
41
43
|
item_name: string;
|
|
42
44
|
category_name: string;
|
|
43
|
-
selling_price: number;
|
|
44
45
|
cost_price: number;
|
|
45
|
-
warehouse_id: string;
|
|
46
46
|
order_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
47
47
|
description?: string | null | undefined;
|
|
48
48
|
}>> & import("mongoose").FlatRecord<{
|
|
@@ -59,11 +59,11 @@ export declare const WarehouseItemTransactionsSchema: Schema<any, import("mongoo
|
|
|
59
59
|
order_number: number;
|
|
60
60
|
quantity: number;
|
|
61
61
|
item_id: import("mongoose").Types.ObjectId;
|
|
62
|
+
warehouse_id: string;
|
|
63
|
+
selling_price: number;
|
|
62
64
|
item_name: string;
|
|
63
65
|
category_name: string;
|
|
64
|
-
selling_price: number;
|
|
65
66
|
cost_price: number;
|
|
66
|
-
warehouse_id: string;
|
|
67
67
|
order_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
68
68
|
description?: string | null | undefined;
|
|
69
69
|
}> & Required<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Schema } from 'mongoose';
|
|
2
|
+
import { TRACKING_MODE_ENUM } from '../../constants';
|
|
2
3
|
export declare const WarehouseItemSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
3
4
|
timestamps: true;
|
|
4
5
|
versionKey: false;
|
|
@@ -31,18 +32,24 @@ export declare const WarehouseItemSchema: Schema<any, import("mongoose").Model<a
|
|
|
31
32
|
}>;
|
|
32
33
|
hide_name: boolean;
|
|
33
34
|
keywords: string[];
|
|
35
|
+
warehouse_id: string;
|
|
34
36
|
unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
|
|
35
37
|
threshold_quantity: number;
|
|
36
38
|
quantity_left: number;
|
|
37
39
|
unit_price: number;
|
|
38
40
|
remaining_stock_price: number;
|
|
39
|
-
|
|
41
|
+
purchase_price: {
|
|
40
42
|
BASE_PRICE: number;
|
|
41
43
|
};
|
|
42
|
-
|
|
43
|
-
purchase_price: {
|
|
44
|
+
selling_price: {
|
|
44
45
|
BASE_PRICE: number;
|
|
45
46
|
};
|
|
47
|
+
tracking_mode: TRACKING_MODE_ENUM;
|
|
48
|
+
expiry_tracked: boolean;
|
|
49
|
+
expiration_days: number;
|
|
50
|
+
best_before_days: number;
|
|
51
|
+
removal_days: number;
|
|
52
|
+
alert_days: number;
|
|
46
53
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
47
54
|
createdAt: NativeDate;
|
|
48
55
|
updatedAt: NativeDate;
|
|
@@ -71,18 +78,24 @@ export declare const WarehouseItemSchema: Schema<any, import("mongoose").Model<a
|
|
|
71
78
|
}>;
|
|
72
79
|
hide_name: boolean;
|
|
73
80
|
keywords: string[];
|
|
81
|
+
warehouse_id: string;
|
|
74
82
|
unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
|
|
75
83
|
threshold_quantity: number;
|
|
76
84
|
quantity_left: number;
|
|
77
85
|
unit_price: number;
|
|
78
86
|
remaining_stock_price: number;
|
|
79
|
-
|
|
87
|
+
purchase_price: {
|
|
80
88
|
BASE_PRICE: number;
|
|
81
89
|
};
|
|
82
|
-
|
|
83
|
-
purchase_price: {
|
|
90
|
+
selling_price: {
|
|
84
91
|
BASE_PRICE: number;
|
|
85
92
|
};
|
|
93
|
+
tracking_mode: TRACKING_MODE_ENUM;
|
|
94
|
+
expiry_tracked: boolean;
|
|
95
|
+
expiration_days: number;
|
|
96
|
+
best_before_days: number;
|
|
97
|
+
removal_days: number;
|
|
98
|
+
alert_days: number;
|
|
86
99
|
}>> & import("mongoose").FlatRecord<{
|
|
87
100
|
createdAt: NativeDate;
|
|
88
101
|
updatedAt: NativeDate;
|
|
@@ -111,18 +124,24 @@ export declare const WarehouseItemSchema: Schema<any, import("mongoose").Model<a
|
|
|
111
124
|
}>;
|
|
112
125
|
hide_name: boolean;
|
|
113
126
|
keywords: string[];
|
|
127
|
+
warehouse_id: string;
|
|
114
128
|
unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
|
|
115
129
|
threshold_quantity: number;
|
|
116
130
|
quantity_left: number;
|
|
117
131
|
unit_price: number;
|
|
118
132
|
remaining_stock_price: number;
|
|
119
|
-
|
|
133
|
+
purchase_price: {
|
|
120
134
|
BASE_PRICE: number;
|
|
121
135
|
};
|
|
122
|
-
|
|
123
|
-
purchase_price: {
|
|
136
|
+
selling_price: {
|
|
124
137
|
BASE_PRICE: number;
|
|
125
138
|
};
|
|
139
|
+
tracking_mode: TRACKING_MODE_ENUM;
|
|
140
|
+
expiry_tracked: boolean;
|
|
141
|
+
expiration_days: number;
|
|
142
|
+
best_before_days: number;
|
|
143
|
+
removal_days: number;
|
|
144
|
+
alert_days: number;
|
|
126
145
|
}> & Required<{
|
|
127
146
|
_id: import("mongoose").Types.ObjectId;
|
|
128
147
|
}> & {
|
|
@@ -108,6 +108,35 @@ exports.WarehouseItemSchema = new mongoose_1.Schema({
|
|
|
108
108
|
type: String,
|
|
109
109
|
default: null,
|
|
110
110
|
},
|
|
111
|
+
tracking_mode: {
|
|
112
|
+
type: String,
|
|
113
|
+
enum: constants_1.ALL_TRACKING_MODES,
|
|
114
|
+
default: constants_1.TRACKING_MODE_ENUM.NONE,
|
|
115
|
+
},
|
|
116
|
+
expiry_tracked: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
default: false,
|
|
119
|
+
},
|
|
120
|
+
expiration_days: {
|
|
121
|
+
type: Number,
|
|
122
|
+
default: 0,
|
|
123
|
+
min: 0,
|
|
124
|
+
},
|
|
125
|
+
best_before_days: {
|
|
126
|
+
type: Number,
|
|
127
|
+
default: 0,
|
|
128
|
+
min: 0,
|
|
129
|
+
},
|
|
130
|
+
removal_days: {
|
|
131
|
+
type: Number,
|
|
132
|
+
default: 0,
|
|
133
|
+
min: 0,
|
|
134
|
+
},
|
|
135
|
+
alert_days: {
|
|
136
|
+
type: Number,
|
|
137
|
+
default: 0,
|
|
138
|
+
min: 0,
|
|
139
|
+
},
|
|
111
140
|
createdAt: {
|
|
112
141
|
type: mongoose_1.Schema.Types.Date,
|
|
113
142
|
required: true,
|
|
@@ -27,8 +27,8 @@ export declare const WarehouseVendorsSchema: Schema<any, import("mongoose").Mode
|
|
|
27
27
|
phone_number: string;
|
|
28
28
|
uid: string;
|
|
29
29
|
email: string;
|
|
30
|
-
tax_business_number: string;
|
|
31
30
|
warehouse_id: string;
|
|
31
|
+
tax_business_number: string;
|
|
32
32
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
33
33
|
createdAt: NativeDate;
|
|
34
34
|
updatedAt: NativeDate;
|
|
@@ -53,8 +53,8 @@ export declare const WarehouseVendorsSchema: Schema<any, import("mongoose").Mode
|
|
|
53
53
|
phone_number: string;
|
|
54
54
|
uid: string;
|
|
55
55
|
email: string;
|
|
56
|
-
tax_business_number: string;
|
|
57
56
|
warehouse_id: string;
|
|
57
|
+
tax_business_number: string;
|
|
58
58
|
}>> & import("mongoose").FlatRecord<{
|
|
59
59
|
createdAt: NativeDate;
|
|
60
60
|
updatedAt: NativeDate;
|
|
@@ -79,8 +79,8 @@ export declare const WarehouseVendorsSchema: Schema<any, import("mongoose").Mode
|
|
|
79
79
|
phone_number: string;
|
|
80
80
|
uid: string;
|
|
81
81
|
email: string;
|
|
82
|
-
tax_business_number: string;
|
|
83
82
|
warehouse_id: string;
|
|
83
|
+
tax_business_number: string;
|
|
84
84
|
}> & Required<{
|
|
85
85
|
_id: import("mongoose").Types.ObjectId;
|
|
86
86
|
}> & {
|
|
@@ -25,8 +25,10 @@ export * from './halfhalf_setup';
|
|
|
25
25
|
export * from './instore_shift_sessions';
|
|
26
26
|
export * from './instore_shifts';
|
|
27
27
|
export * from './internal_leads';
|
|
28
|
+
export * from './internal_movements';
|
|
28
29
|
export * from './inventory';
|
|
29
30
|
export * from './inventory_categories';
|
|
31
|
+
export * from './inventory_lot_serial_numbers';
|
|
30
32
|
export * from './inventory_transactions';
|
|
31
33
|
export * from './item';
|
|
32
34
|
export * from './item_transactions';
|
|
@@ -41,11 +43,20 @@ export * from './operational_roles';
|
|
|
41
43
|
export * from './order';
|
|
42
44
|
export * from './printer_settings';
|
|
43
45
|
export * from './public_holidays';
|
|
46
|
+
export * from './purchase_order_common';
|
|
47
|
+
export * from './purchase_order_receipts';
|
|
48
|
+
export * from './purchase_order_rfq';
|
|
49
|
+
export * from './purchase_order_vendor_returns';
|
|
44
50
|
export * from './purchase_orders';
|
|
45
51
|
export * from './reservations';
|
|
46
52
|
export * from './reviews';
|
|
47
53
|
export * from './rewards_usage';
|
|
48
54
|
export * from './rider';
|
|
55
|
+
export * from './sale_order_common';
|
|
56
|
+
export * from './sale_order_deliveries';
|
|
57
|
+
export * from './sale_order_invoices';
|
|
58
|
+
export * from './sale_order_rfq';
|
|
59
|
+
export * from './sale_orders';
|
|
49
60
|
export * from './specials';
|
|
50
61
|
export * from './staff_shifts';
|
|
51
62
|
export * from './tenant';
|
|
@@ -63,6 +74,8 @@ export * from './vouchers';
|
|
|
63
74
|
export * from './wallet';
|
|
64
75
|
export * from './wallet_transactions';
|
|
65
76
|
export * from './warehouse';
|
|
77
|
+
export * from './warehouse-activity-logs';
|
|
78
|
+
export * from './warehouse-communications';
|
|
66
79
|
export * from './warehouse_categories';
|
|
67
80
|
export * from './warehouse_clients';
|
|
68
81
|
export * from './warehouse_inventory_transactions';
|
|
@@ -41,8 +41,10 @@ __exportStar(require("./halfhalf_setup"), exports);
|
|
|
41
41
|
__exportStar(require("./instore_shift_sessions"), exports);
|
|
42
42
|
__exportStar(require("./instore_shifts"), exports);
|
|
43
43
|
__exportStar(require("./internal_leads"), exports);
|
|
44
|
+
__exportStar(require("./internal_movements"), exports);
|
|
44
45
|
__exportStar(require("./inventory"), exports);
|
|
45
46
|
__exportStar(require("./inventory_categories"), exports);
|
|
47
|
+
__exportStar(require("./inventory_lot_serial_numbers"), exports);
|
|
46
48
|
__exportStar(require("./inventory_transactions"), exports);
|
|
47
49
|
__exportStar(require("./item"), exports);
|
|
48
50
|
__exportStar(require("./item_transactions"), exports);
|
|
@@ -57,11 +59,20 @@ __exportStar(require("./operational_roles"), exports);
|
|
|
57
59
|
__exportStar(require("./order"), exports);
|
|
58
60
|
__exportStar(require("./printer_settings"), exports);
|
|
59
61
|
__exportStar(require("./public_holidays"), exports);
|
|
62
|
+
__exportStar(require("./purchase_order_common"), exports);
|
|
63
|
+
__exportStar(require("./purchase_order_receipts"), exports);
|
|
64
|
+
__exportStar(require("./purchase_order_rfq"), exports);
|
|
65
|
+
__exportStar(require("./purchase_order_vendor_returns"), exports);
|
|
60
66
|
__exportStar(require("./purchase_orders"), exports);
|
|
61
67
|
__exportStar(require("./reservations"), exports);
|
|
62
68
|
__exportStar(require("./reviews"), exports);
|
|
63
69
|
__exportStar(require("./rewards_usage"), exports);
|
|
64
70
|
__exportStar(require("./rider"), exports);
|
|
71
|
+
__exportStar(require("./sale_order_common"), exports);
|
|
72
|
+
__exportStar(require("./sale_order_deliveries"), exports);
|
|
73
|
+
__exportStar(require("./sale_order_invoices"), exports);
|
|
74
|
+
__exportStar(require("./sale_order_rfq"), exports);
|
|
75
|
+
__exportStar(require("./sale_orders"), exports);
|
|
65
76
|
__exportStar(require("./specials"), exports);
|
|
66
77
|
__exportStar(require("./staff_shifts"), exports);
|
|
67
78
|
__exportStar(require("./tenant"), exports);
|
|
@@ -79,6 +90,8 @@ __exportStar(require("./vouchers"), exports);
|
|
|
79
90
|
__exportStar(require("./wallet"), exports);
|
|
80
91
|
__exportStar(require("./wallet_transactions"), exports);
|
|
81
92
|
__exportStar(require("./warehouse"), exports);
|
|
93
|
+
__exportStar(require("./warehouse-activity-logs"), exports);
|
|
94
|
+
__exportStar(require("./warehouse-communications"), exports);
|
|
82
95
|
__exportStar(require("./warehouse_categories"), exports);
|
|
83
96
|
__exportStar(require("./warehouse_clients"), exports);
|
|
84
97
|
__exportStar(require("./warehouse_inventory_transactions"), exports);
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM, INTERNAL_MOVEMENT_FLOW_ENUM, INTERNAL_MOVEMENT_LOCATION_TYPE_ENUM, INTERNAL_MOVEMENT_RECORD_TYPE_ENUM, INTERNAL_MOVEMENT_STATUS_ENUM, REF_TYPE_ENUM } from '../../constants';
|
|
2
|
+
export interface IInternalMovementActorRef {
|
|
3
|
+
uid: string;
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IInternalMovementItem {
|
|
7
|
+
_id: string;
|
|
8
|
+
item_id: string;
|
|
9
|
+
inventory_code: string;
|
|
10
|
+
item_name: string;
|
|
11
|
+
quantity: number;
|
|
12
|
+
received_qty: number;
|
|
13
|
+
notes?: string | null;
|
|
14
|
+
}
|
|
15
|
+
export interface IInternalMovementStatusMeta {
|
|
16
|
+
requested_at?: Date | null;
|
|
17
|
+
approved_at?: Date | null;
|
|
18
|
+
dispatched_at?: Date | null;
|
|
19
|
+
delivered_at?: Date | null;
|
|
20
|
+
received_at?: Date | null;
|
|
21
|
+
cancelled_at?: Date | null;
|
|
22
|
+
requested_by?: IInternalMovementActorRef | null;
|
|
23
|
+
approved_by?: IInternalMovementActorRef | null;
|
|
24
|
+
dispatched_by?: IInternalMovementActorRef | null;
|
|
25
|
+
delivered_by?: IInternalMovementActorRef | null;
|
|
26
|
+
received_by?: IInternalMovementActorRef | null;
|
|
27
|
+
cancelled_by?: IInternalMovementActorRef | null;
|
|
28
|
+
}
|
|
29
|
+
export interface IInternalMovementEditRequestMeta {
|
|
30
|
+
edit_request_status: INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM;
|
|
31
|
+
edit_requested_at?: Date | null;
|
|
32
|
+
edit_requested_by?: IInternalMovementActorRef | null;
|
|
33
|
+
edit_request_note?: string | null;
|
|
34
|
+
edit_request_reviewed_at?: Date | null;
|
|
35
|
+
edit_request_reviewed_by?: IInternalMovementActorRef | null;
|
|
36
|
+
edit_request_decision_note?: string | null;
|
|
37
|
+
edit_approved_for_context_id?: string | null;
|
|
38
|
+
}
|
|
39
|
+
export interface IInternalMovementCancelRequestMeta {
|
|
40
|
+
cancel_request_status: INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM;
|
|
41
|
+
cancel_requested_at?: Date | null;
|
|
42
|
+
cancel_requested_by?: IInternalMovementActorRef | null;
|
|
43
|
+
cancel_request_note?: string | null;
|
|
44
|
+
cancel_request_reviewed_at?: Date | null;
|
|
45
|
+
cancel_request_reviewed_by?: IInternalMovementActorRef | null;
|
|
46
|
+
cancel_request_decision_note?: string | null;
|
|
47
|
+
}
|
|
48
|
+
export interface IInternalMovement extends IInternalMovementStatusMeta, IInternalMovementEditRequestMeta, IInternalMovementCancelRequestMeta {
|
|
49
|
+
_id: string;
|
|
50
|
+
ref_id: string;
|
|
51
|
+
ref_type: REF_TYPE_ENUM;
|
|
52
|
+
doc_number: string;
|
|
53
|
+
record_type: INTERNAL_MOVEMENT_RECORD_TYPE_ENUM;
|
|
54
|
+
status: INTERNAL_MOVEMENT_STATUS_ENUM;
|
|
55
|
+
flow: INTERNAL_MOVEMENT_FLOW_ENUM;
|
|
56
|
+
source_id: string;
|
|
57
|
+
source_type: INTERNAL_MOVEMENT_LOCATION_TYPE_ENUM;
|
|
58
|
+
source_name: string;
|
|
59
|
+
destination_id: string;
|
|
60
|
+
destination_type: INTERNAL_MOVEMENT_LOCATION_TYPE_ENUM;
|
|
61
|
+
destination_name: string;
|
|
62
|
+
items: IInternalMovementItem[];
|
|
63
|
+
total_items: number;
|
|
64
|
+
total_quantity: number;
|
|
65
|
+
parent_movement_id?: string | null;
|
|
66
|
+
notes?: string | null;
|
|
67
|
+
created_by: IInternalMovementActorRef;
|
|
68
|
+
updated_by?: IInternalMovementActorRef | null;
|
|
69
|
+
cancelled_reason?: string | null;
|
|
70
|
+
is_deleted: boolean;
|
|
71
|
+
createdAt: Date;
|
|
72
|
+
updatedAt: Date;
|
|
73
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { LOT_SERIAL_DOC_TYPE_ENUM, LOT_SERIAL_MOVEMENT_SOURCE_ENUM, REF_TYPE_ENUM, TRACKING_MODE_ENUM } from '../../constants';
|
|
2
|
+
export type TTrackedMode = TRACKING_MODE_ENUM.LOT | TRACKING_MODE_ENUM.SERIAL;
|
|
3
|
+
export type TInventoryLotSerialMovementType = 'IN' | 'OUT';
|
|
4
|
+
export interface IInventoryLotSerialActorRef {
|
|
5
|
+
uid: string;
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
export type IInventoryLotSerialNumberCommon = {
|
|
9
|
+
_id: string;
|
|
10
|
+
ref_id: string;
|
|
11
|
+
ref_type: REF_TYPE_ENUM;
|
|
12
|
+
inventory_code: string;
|
|
13
|
+
tracking_mode: TTrackedMode;
|
|
14
|
+
lot_number?: string;
|
|
15
|
+
serial_number?: string;
|
|
16
|
+
expiry_date?: Date | null;
|
|
17
|
+
best_before_date?: Date | null;
|
|
18
|
+
removal_date?: Date | null;
|
|
19
|
+
alert_date?: Date | null;
|
|
20
|
+
created_by?: IInventoryLotSerialActorRef | null;
|
|
21
|
+
updated_by?: IInventoryLotSerialActorRef | null;
|
|
22
|
+
createdAt: Date;
|
|
23
|
+
updatedAt: Date;
|
|
24
|
+
};
|
|
25
|
+
export interface IInventoryLotSerialNumberBalance extends IInventoryLotSerialNumberCommon {
|
|
26
|
+
doc_type: LOT_SERIAL_DOC_TYPE_ENUM.BALANCE;
|
|
27
|
+
quantity_available: number;
|
|
28
|
+
is_available?: boolean;
|
|
29
|
+
received_at?: Date | null;
|
|
30
|
+
received_by?: IInventoryLotSerialActorRef | null;
|
|
31
|
+
last_moved_at?: Date | null;
|
|
32
|
+
last_moved_by?: IInventoryLotSerialActorRef | null;
|
|
33
|
+
}
|
|
34
|
+
export interface IInventoryLotSerialNumberMovement extends IInventoryLotSerialNumberCommon {
|
|
35
|
+
doc_type: LOT_SERIAL_DOC_TYPE_ENUM.MOVEMENT;
|
|
36
|
+
movement_type: TInventoryLotSerialMovementType;
|
|
37
|
+
quantity: number;
|
|
38
|
+
occurred_at: Date;
|
|
39
|
+
occurred_by?: IInventoryLotSerialActorRef | null;
|
|
40
|
+
source: LOT_SERIAL_MOVEMENT_SOURCE_ENUM;
|
|
41
|
+
source_id?: string;
|
|
42
|
+
}
|
|
43
|
+
export type IInventoryLotSerialNumber = IInventoryLotSerialNumberBalance | IInventoryLotSerialNumberMovement;
|
|
44
|
+
export type TInventoryLotSerialMutationAction = 'RECEIVE' | 'CONSUME' | 'RESTOCK';
|
|
45
|
+
export interface IInventoryLotSerialMutationItem {
|
|
46
|
+
inventory_code: string;
|
|
47
|
+
tracking_mode: TTrackedMode;
|
|
48
|
+
lot_number?: string;
|
|
49
|
+
serial_number?: string;
|
|
50
|
+
quantity: number;
|
|
51
|
+
occurred_at?: Date | string;
|
|
52
|
+
expiry_date?: Date | string | null;
|
|
53
|
+
best_before_date?: Date | string | null;
|
|
54
|
+
removal_date?: Date | string | null;
|
|
55
|
+
alert_date?: Date | string | null;
|
|
56
|
+
}
|
|
57
|
+
export interface IPostInventoryLotSerialMutationBody {
|
|
58
|
+
ref_id: string;
|
|
59
|
+
ref_type: REF_TYPE_ENUM;
|
|
60
|
+
action: TInventoryLotSerialMutationAction;
|
|
61
|
+
source: LOT_SERIAL_MOVEMENT_SOURCE_ENUM;
|
|
62
|
+
source_id?: string;
|
|
63
|
+
items: IInventoryLotSerialMutationItem[];
|
|
64
|
+
}
|
|
65
|
+
export interface IPostInventoryLotSerialMutationResponse {
|
|
66
|
+
message: string;
|
|
67
|
+
action: TInventoryLotSerialMutationAction;
|
|
68
|
+
ref_id: string;
|
|
69
|
+
ref_type: REF_TYPE_ENUM;
|
|
70
|
+
source: LOT_SERIAL_MOVEMENT_SOURCE_ENUM;
|
|
71
|
+
source_id: string | null;
|
|
72
|
+
total_items: number;
|
|
73
|
+
}
|
|
74
|
+
export interface IGetInventoryLotSerialNumbersQuery {
|
|
75
|
+
ref_id?: string;
|
|
76
|
+
ref_type?: REF_TYPE_ENUM;
|
|
77
|
+
source?: LOT_SERIAL_MOVEMENT_SOURCE_ENUM | string;
|
|
78
|
+
movement_type?: TInventoryLotSerialMovementType | string;
|
|
79
|
+
from_date?: Date | string;
|
|
80
|
+
to_date?: Date | string;
|
|
81
|
+
limit?: number;
|
|
82
|
+
offset?: number;
|
|
83
|
+
}
|
|
84
|
+
export type IGetInventoryLotSerialNumbersResponse = IInventoryLotSerialNumber[];
|
|
85
|
+
export declare const INVENTORY_LOT_SERIAL_NUMBERS_COLLECTION_NAME = "inventory_lot_serial_numbers";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { IStaffDetails } from './order';
|
|
2
|
+
export interface IPurchaseOrderCommonItem {
|
|
3
|
+
_id: string;
|
|
4
|
+
item_id: string;
|
|
5
|
+
is_ready?: boolean;
|
|
6
|
+
void_reason?: string | null;
|
|
7
|
+
name: string;
|
|
8
|
+
price: number;
|
|
9
|
+
subtotal: number;
|
|
10
|
+
quantity: number;
|
|
11
|
+
_net_amount: number;
|
|
12
|
+
_gross_amount: number;
|
|
13
|
+
_gst_amount: number;
|
|
14
|
+
_discount_amount: number;
|
|
15
|
+
special_instructions: string;
|
|
16
|
+
}
|
|
17
|
+
export interface IPurchaseOrderCommonCategoryByCategoryId {
|
|
18
|
+
name: string;
|
|
19
|
+
category_id: string;
|
|
20
|
+
items: IPurchaseOrderCommonItem[];
|
|
21
|
+
}
|
|
22
|
+
export interface IPurchaseOrderCommonCategoryById {
|
|
23
|
+
_id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
items: IPurchaseOrderCommonItem[];
|
|
26
|
+
}
|
|
27
|
+
export interface IPurchaseOrderCommonIterationBase<TCategory, TStatus> {
|
|
28
|
+
categories: TCategory[];
|
|
29
|
+
staff_details: IStaffDetails;
|
|
30
|
+
is_gst_inclusive?: boolean;
|
|
31
|
+
gst?: number | null;
|
|
32
|
+
gst_amount?: number | null;
|
|
33
|
+
special_instructions: string;
|
|
34
|
+
price: number;
|
|
35
|
+
amount_earned: number;
|
|
36
|
+
grand_total: number;
|
|
37
|
+
order_status: TStatus;
|
|
38
|
+
updatedAt: Date;
|
|
39
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { PURCHASE_ORDER_RECEIPT_STATUS_ENUM } from '../../constants';
|
|
2
|
+
export interface IPurchaseOrderReceiptStatusConfig {
|
|
3
|
+
status: PURCHASE_ORDER_RECEIPT_STATUS_ENUM;
|
|
4
|
+
color: string;
|
|
5
|
+
contrast_color: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const DEFAULT_PO_RECEIPT_STATUSES: IPurchaseOrderReceiptStatusConfig[];
|
|
8
|
+
export interface IPurchaseOrderReceiptItem {
|
|
9
|
+
_id: string;
|
|
10
|
+
item_id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
ordered_quantity: number;
|
|
13
|
+
received_quantity: number;
|
|
14
|
+
price: number;
|
|
15
|
+
subtotal: number;
|
|
16
|
+
}
|
|
17
|
+
export interface IPurchaseOrderReceiptActor {
|
|
18
|
+
_id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
}
|
|
21
|
+
export interface IPurchaseOrderReceipt {
|
|
22
|
+
_id: string;
|
|
23
|
+
warehouse_id: string;
|
|
24
|
+
purchase_order_id: string;
|
|
25
|
+
vendor_id: string;
|
|
26
|
+
vendor_name: string;
|
|
27
|
+
receipt_status: PURCHASE_ORDER_RECEIPT_STATUS_ENUM;
|
|
28
|
+
items: IPurchaseOrderReceiptItem[];
|
|
29
|
+
total_received_amount: number;
|
|
30
|
+
notes?: string | null;
|
|
31
|
+
created_by?: IPurchaseOrderReceiptActor | null;
|
|
32
|
+
validated_by?: IPurchaseOrderReceiptActor | null;
|
|
33
|
+
validated_at?: Date | null;
|
|
34
|
+
cancelled_at?: Date | null;
|
|
35
|
+
cancel_reason?: string | null;
|
|
36
|
+
createdAt_mins: number;
|
|
37
|
+
createdAt: Date;
|
|
38
|
+
updatedAt: Date;
|
|
39
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_PO_RECEIPT_STATUSES = void 0;
|
|
4
|
+
const constants_1 = require("../../constants");
|
|
5
|
+
exports.DEFAULT_PO_RECEIPT_STATUSES = [
|
|
6
|
+
{
|
|
7
|
+
status: constants_1.PURCHASE_ORDER_RECEIPT_STATUS_ENUM.DRAFT,
|
|
8
|
+
color: '#727472',
|
|
9
|
+
contrast_color: '#FFFFFF',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
status: constants_1.PURCHASE_ORDER_RECEIPT_STATUS_ENUM.VALIDATED,
|
|
13
|
+
color: '#4CC417',
|
|
14
|
+
contrast_color: '#FFFFFF',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
status: constants_1.PURCHASE_ORDER_RECEIPT_STATUS_ENUM.CANCELLED,
|
|
18
|
+
color: '#FF0000',
|
|
19
|
+
contrast_color: '#FFFFFF',
|
|
20
|
+
},
|
|
21
|
+
];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PURCHASE_ORDER_RFQ_STATUS_ENUM } from '../../constants';
|
|
2
|
+
import { IPurchaseOrderCommonCategoryByCategoryId, IPurchaseOrderCommonItem, IPurchaseOrderCommonIterationBase } from './purchase_order_common';
|
|
3
|
+
export type IPurchaseOrderRFQItem = IPurchaseOrderCommonItem;
|
|
4
|
+
export type IPurchaseOrderRFQCategory = IPurchaseOrderCommonCategoryByCategoryId;
|
|
5
|
+
export interface IPurchaseOrderRFQIteration extends IPurchaseOrderCommonIterationBase<IPurchaseOrderRFQCategory, PURCHASE_ORDER_RFQ_STATUS_ENUM | string> {
|
|
6
|
+
tax_number: string;
|
|
7
|
+
}
|
|
8
|
+
export interface IPurchaseOrderRFQ extends IPurchaseOrderRFQIteration {
|
|
9
|
+
_id: string;
|
|
10
|
+
warehouse_id: string;
|
|
11
|
+
vendor_id: string;
|
|
12
|
+
vendor_name: string;
|
|
13
|
+
iterations: IPurchaseOrderRFQIteration[];
|
|
14
|
+
order_number: number | null;
|
|
15
|
+
expected_deadline: string;
|
|
16
|
+
payment_terms: number;
|
|
17
|
+
delete_reason?: string | null;
|
|
18
|
+
cancel_reason?: string | null;
|
|
19
|
+
is_deleted: boolean;
|
|
20
|
+
order_status_updated_at: Date;
|
|
21
|
+
special_instructions: string;
|
|
22
|
+
is_reopened?: boolean;
|
|
23
|
+
createdAt_mins: number;
|
|
24
|
+
createdAt: Date;
|
|
25
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM } from '../../constants';
|
|
2
|
+
export interface IPurchaseOrderVendorReturnStatus {
|
|
3
|
+
status: PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM;
|
|
4
|
+
color: string;
|
|
5
|
+
contrast_color: string;
|
|
6
|
+
priority: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const DEFAULT_PURCHASE_ORDER_VENDOR_RETURN_STATUSES: IPurchaseOrderVendorReturnStatus[];
|
|
9
|
+
export interface IPurchaseOrderVendorReturnItem {
|
|
10
|
+
_id: string;
|
|
11
|
+
item_id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
ordered_quantity: number;
|
|
14
|
+
return_quantity: number;
|
|
15
|
+
price: number;
|
|
16
|
+
subtotal: number;
|
|
17
|
+
reason?: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface IPurchaseOrderVendorReturnActor {
|
|
20
|
+
_id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
}
|
|
23
|
+
export interface IPurchaseOrderVendorReturn {
|
|
24
|
+
_id: string;
|
|
25
|
+
warehouse_id: string;
|
|
26
|
+
purchase_order_id: string;
|
|
27
|
+
vendor_id: string;
|
|
28
|
+
vendor_name: string;
|
|
29
|
+
return_status: PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM;
|
|
30
|
+
inventory_consumed: boolean;
|
|
31
|
+
items: IPurchaseOrderVendorReturnItem[];
|
|
32
|
+
total_return_amount: number;
|
|
33
|
+
notes?: string | null;
|
|
34
|
+
created_by?: IPurchaseOrderVendorReturnActor | null;
|
|
35
|
+
approved_by?: IPurchaseOrderVendorReturnActor | null;
|
|
36
|
+
dispatched_by?: IPurchaseOrderVendorReturnActor | null;
|
|
37
|
+
vendor_confirmed_by?: IPurchaseOrderVendorReturnActor | null;
|
|
38
|
+
completed_by?: IPurchaseOrderVendorReturnActor | null;
|
|
39
|
+
cancelled_by?: IPurchaseOrderVendorReturnActor | null;
|
|
40
|
+
approved_at?: Date | null;
|
|
41
|
+
dispatched_at?: Date | null;
|
|
42
|
+
vendor_confirmed_at?: Date | null;
|
|
43
|
+
completed_at?: Date | null;
|
|
44
|
+
cancelled_at?: Date | null;
|
|
45
|
+
cancel_reason?: string | null;
|
|
46
|
+
createdAt_mins: number;
|
|
47
|
+
createdAt: Date;
|
|
48
|
+
updatedAt: Date;
|
|
49
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_PURCHASE_ORDER_VENDOR_RETURN_STATUSES = void 0;
|
|
4
|
+
const constants_1 = require("../../constants");
|
|
5
|
+
exports.DEFAULT_PURCHASE_ORDER_VENDOR_RETURN_STATUSES = [
|
|
6
|
+
{
|
|
7
|
+
status: constants_1.PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM.CREATED,
|
|
8
|
+
color: '#727472',
|
|
9
|
+
contrast_color: '#FFFFFF',
|
|
10
|
+
priority: 0,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
status: constants_1.PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM.APPROVED,
|
|
14
|
+
color: '#0000FF',
|
|
15
|
+
contrast_color: '#FFFFFF',
|
|
16
|
+
priority: 1,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
status: constants_1.PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM.DISPATCHED,
|
|
20
|
+
color: '#FBB117',
|
|
21
|
+
contrast_color: '#FFFFFF',
|
|
22
|
+
priority: 2,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
status: constants_1.PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM.VENDOR_CONFIRMED,
|
|
26
|
+
color: '#17A2B8',
|
|
27
|
+
contrast_color: '#FFFFFF',
|
|
28
|
+
priority: 3,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
status: constants_1.PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM.COMPLETED,
|
|
32
|
+
color: '#4CC417',
|
|
33
|
+
contrast_color: '#FFFFFF',
|
|
34
|
+
priority: 4,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
status: constants_1.PURCHASE_ORDER_VENDOR_RETURN_STATUS_ENUM.CANCELLED,
|
|
38
|
+
color: '#FF0000',
|
|
39
|
+
contrast_color: '#FFFFFF',
|
|
40
|
+
priority: 5,
|
|
41
|
+
},
|
|
42
|
+
];
|