@managesome/eposmatic-toolkit 0.2.430 → 0.2.432
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 +3 -285
- package/lib/constants/ENUMS.js +7 -387
- package/lib/constants/PURCHASE_ORDER.d.ts +5 -3
- package/lib/constants/PURCHASE_ORDER.js +58 -20
- package/lib/constants/WAREHOUSE_ANALYTICS.d.ts +41 -41
- package/lib/constants/WAREHOUSE_ANALYTICS.js +28 -28
- package/lib/constants/WAREHOUSE_ENUMS.d.ts +289 -0
- package/lib/constants/WAREHOUSE_ENUMS.js +392 -0
- package/lib/constants/WAREHOUSE_INVOICE.js +10 -10
- package/lib/constants/index.d.ts +1 -0
- package/lib/constants/index.js +1 -0
- package/lib/helpers/order/generate-purchase-order-rfq.d.ts +3 -3
- package/lib/helpers/order/generate-purchase-order-rfq.js +2 -2
- package/lib/helpers/order/generate-purchase-order.d.ts +8 -8
- package/lib/helpers/order/generate-purchase-order.js +2 -2
- package/lib/helpers/order/generate-warehouse-purchase-order-rfq.d.ts +3 -0
- package/lib/helpers/order/generate-warehouse-purchase-order-rfq.js +64 -0
- package/lib/helpers/order/generate-warehouse-purchase-order.d.ts +11 -0
- package/lib/helpers/order/generate-warehouse-purchase-order.js +196 -0
- package/lib/helpers/order/index.d.ts +2 -2
- package/lib/helpers/order/index.js +2 -2
- package/lib/helpers/store/all-purchase-orders-actions.d.ts +7 -7
- package/lib/helpers/store/all-purchase-orders-actions.js +2 -2
- package/lib/helpers/store/all-sale-orders-actions.d.ts +2 -2
- package/lib/helpers/store/all-warehouse-purchase-orders-actions.d.ts +13 -0
- package/lib/helpers/store/all-warehouse-purchase-orders-actions.js +56 -0
- package/lib/helpers/store/all-warehouse-sale-orders-actions.d.ts +2 -0
- package/lib/helpers/store/all-warehouse-sale-orders-actions.js +8 -0
- package/lib/helpers/store/common-purchase-order-actions.d.ts +15 -15
- package/lib/helpers/store/common-sale-order-actions.d.ts +5 -5
- package/lib/helpers/store/common-warehouse-purchase-order-actions.d.ts +31 -0
- package/lib/helpers/store/common-warehouse-purchase-order-actions.js +545 -0
- package/lib/helpers/store/common-warehouse-sale-order-actions.d.ts +5 -0
- package/lib/helpers/store/common-warehouse-sale-order-actions.js +65 -0
- package/lib/helpers/store/index.d.ts +6 -6
- package/lib/helpers/store/index.js +6 -6
- package/lib/helpers/store/purchase-order-rfq-cart-actions.d.ts +11 -11
- package/lib/helpers/store/purchase-order-rfq-cart-actions.js +3 -3
- package/lib/helpers/store/purchase-orders-cart-actions.d.ts +18 -18
- package/lib/helpers/store/purchase-orders-cart-actions.js +1 -1
- package/lib/helpers/store/warehouse-purchase-order-rfq-cart-actions.d.ts +19 -0
- package/lib/helpers/store/warehouse-purchase-order-rfq-cart-actions.js +373 -0
- package/lib/helpers/store/warehouse-purchase-orders-cart-actions.d.ts +57 -0
- package/lib/helpers/store/warehouse-purchase-orders-cart-actions.js +486 -0
- package/lib/helpers/types/index.d.ts +1 -1
- package/lib/helpers/types/index.js +1 -1
- package/lib/helpers/types/purchase-order-cart-actions.d.ts +2 -2
- package/lib/helpers/types/warehouse-purchase-order-cart-actions.d.ts +26 -0
- package/lib/helpers/types/warehouse-purchase-order-cart-actions.js +2 -0
- package/lib/helpers/types/workers.d.ts +18 -18
- package/lib/helpers/utils/index.d.ts +8 -8
- package/lib/helpers/utils/index.js +8 -11
- package/lib/helpers/utils/inventory.js +6 -0
- package/lib/helpers/utils/invoice-x-report-helpers.d.ts +2 -2
- package/lib/helpers/utils/invoice-x-report-helpers.js +14 -14
- package/lib/helpers/utils/purchase-order-engine.d.ts +4 -4
- package/lib/helpers/utils/purchase-order-receipt-engine.d.ts +5 -5
- package/lib/helpers/utils/purchase-order-receipt-engine.js +2 -2
- package/lib/helpers/utils/purchase-order-x-report-helpers.js +2 -2
- package/lib/helpers/utils/sale-x-report-helpers.js +2 -2
- package/lib/helpers/utils/void-purchase-order-items-helpers.d.ts +3 -3
- package/lib/helpers/utils/void-purchase-order-items-report-helpers.d.ts +2 -2
- package/lib/helpers/utils/void-warehouse-invoice-items-helpers.d.ts +3 -3
- package/lib/helpers/utils/void-warehouse-invoice-items-helpers.js +2 -2
- package/lib/helpers/utils/void-warehouse-invoice-items-report-helpers.d.ts +5 -5
- package/lib/helpers/utils/warehouse-catalog-conversion.d.ts +3 -3
- package/lib/helpers/utils/warehouse-catalog-conversion.js +9 -7
- package/lib/helpers/utils/warehouse-inventory.js +9 -0
- package/lib/helpers/utils/warehouse-invoice-order-engine.js +1 -1
- package/lib/helpers/utils/warehouse-invoice-x-report-helpers.d.ts +58 -0
- package/lib/helpers/utils/warehouse-invoice-x-report-helpers.js +1432 -0
- package/lib/helpers/utils/warehouse-purchase-order-engine.d.ts +9 -0
- package/lib/helpers/utils/warehouse-purchase-order-engine.js +34 -0
- package/lib/helpers/utils/warehouse-purchase-order-receipt-engine.d.ts +149 -0
- package/lib/helpers/utils/warehouse-purchase-order-receipt-engine.js +214 -0
- package/lib/helpers/utils/warehouse-purchase-order-x-report-helpers.d.ts +58 -0
- package/lib/helpers/utils/warehouse-purchase-order-x-report-helpers.js +1440 -0
- package/lib/helpers/utils/warehouse-sale-order-x-report-helpers.d.ts +30 -0
- package/lib/helpers/utils/warehouse-sale-order-x-report-helpers.js +2 -0
- package/lib/helpers/utils/warehouse-sale-x-report-helpers.d.ts +58 -0
- package/lib/helpers/utils/warehouse-sale-x-report-helpers.js +1456 -0
- package/lib/helpers/utils/warehouse-void-purchase-order-items-helpers.d.ts +3 -0
- package/lib/helpers/utils/warehouse-void-purchase-order-items-helpers.js +38 -0
- package/lib/helpers/utils/warehouse-void-purchase-order-items-report-helpers.d.ts +13 -0
- package/lib/helpers/utils/warehouse-void-purchase-order-items-report-helpers.js +22 -0
- package/lib/schemas/models/gift_cards.d.ts +108 -108
- package/lib/schemas/models/halfhalf_setup.d.ts +3 -3
- package/lib/schemas/models/index.d.ts +7 -7
- package/lib/schemas/models/index.js +7 -7
- package/lib/schemas/models/internal_invoices.d.ts +6 -6
- package/lib/schemas/models/inventory_lot_serial_numbers.d.ts +6 -6
- package/lib/schemas/models/inventory_transactions.d.ts +3 -3
- package/lib/schemas/models/item_transactions.d.ts +6 -6
- package/lib/schemas/models/offers.d.ts +146 -146
- package/lib/schemas/models/orders.d.ts +2573 -2573
- package/lib/schemas/models/printer_settings.d.ts +12 -12
- package/lib/schemas/models/reservations.d.ts +6 -6
- package/lib/schemas/models/rewards_usage.d.ts +6 -6
- package/lib/schemas/models/riders.d.ts +3 -3
- package/lib/schemas/models/tenants.d.ts +135 -135
- package/lib/schemas/models/void_order_items.d.ts +15 -15
- package/lib/schemas/models/void_warehouse_invoice_items.d.ts +25 -25
- package/lib/schemas/models/void_warehouse_invoice_items.js +2 -2
- package/lib/schemas/models/vouchers.d.ts +9 -9
- package/lib/schemas/models/warehouse-activity-logs.d.ts +13 -13
- package/lib/schemas/models/warehouse-activity-logs.js +4 -4
- package/lib/schemas/models/warehouse_categories.d.ts +4 -4
- package/lib/schemas/models/warehouse_categories.js +2 -2
- package/lib/schemas/models/warehouse_communications.d.ts +21 -21
- package/lib/schemas/models/warehouse_internal_movements.d.ts +33 -33
- package/lib/schemas/models/warehouse_internal_movements.js +8 -8
- package/lib/schemas/models/warehouse_inventory_lot_serial_numbers.d.ts +154 -0
- package/lib/schemas/models/warehouse_inventory_lot_serial_numbers.js +193 -0
- package/lib/schemas/models/warehouse_inventory_transactions.d.ts +6 -6
- package/lib/schemas/models/warehouse_invoices.d.ts +351 -351
- package/lib/schemas/models/warehouse_item_transactions.d.ts +9 -9
- package/lib/schemas/models/warehouse_items.d.ts +13 -13
- package/lib/schemas/models/warehouse_items.js +2 -2
- package/lib/schemas/models/warehouse_operational_roles.d.ts +3 -3
- package/lib/schemas/models/warehouse_purchase_order_receipts.d.ts +165 -0
- package/lib/schemas/models/warehouse_purchase_order_receipts.js +151 -0
- package/lib/schemas/models/warehouse_purchase_order_rfqs.d.ts +1959 -0
- package/lib/schemas/models/warehouse_purchase_order_rfqs.js +328 -0
- package/lib/schemas/models/warehouse_purchase_order_vendor_returns.d.ts +234 -0
- package/lib/schemas/models/warehouse_purchase_order_vendor_returns.js +188 -0
- package/lib/schemas/models/warehouse_purchase_orders.d.ts +2678 -0
- package/lib/schemas/models/warehouse_purchase_orders.js +336 -0
- package/lib/schemas/models/warehouse_sale_deliveries.d.ts +15 -15
- package/lib/schemas/models/warehouse_sale_deliveries.js +7 -4
- package/lib/schemas/models/warehouse_sale_invoices.d.ts +30 -30
- package/lib/schemas/models/warehouse_sale_invoices.js +8 -5
- package/lib/schemas/models/warehouse_sale_order_rfqs.d.ts +362 -362
- package/lib/schemas/models/warehouse_sale_order_rfqs.js +5 -5
- package/lib/schemas/models/warehouse_sale_orders.d.ts +367 -367
- package/lib/schemas/models/warehouse_sale_orders.js +5 -5
- package/lib/schemas/models/warehouse_void_invoice_items.d.ts +176 -0
- package/lib/schemas/models/warehouse_void_invoice_items.js +176 -0
- package/lib/schemas/models/warehouse_void_purchase_order_items.d.ts +176 -0
- package/lib/schemas/models/warehouse_void_purchase_order_items.js +177 -0
- package/lib/schemas/models/warehouses.d.ts +52 -52
- package/lib/schemas/models/warehouses.js +2 -2
- package/lib/schemas/types/index.d.ts +9 -9
- package/lib/schemas/types/index.js +9 -9
- package/lib/schemas/types/inventories.d.ts +2 -0
- package/lib/schemas/types/inventory_lot_serial_numbers.d.ts +5 -5
- package/lib/schemas/types/warehouse-activity-logs.d.ts +7 -7
- package/lib/schemas/types/warehouse_categories.d.ts +2 -2
- package/lib/schemas/types/warehouse_internal_movements.d.ts +9 -9
- package/lib/schemas/types/warehouse_inventory_lot_serial_numbers.d.ts +85 -0
- package/lib/schemas/types/warehouse_inventory_lot_serial_numbers.js +4 -0
- package/lib/schemas/types/warehouse_items.d.ts +5 -2
- package/lib/schemas/types/warehouse_purchase_order_common.d.ts +39 -0
- package/lib/schemas/types/warehouse_purchase_order_common.js +2 -0
- package/lib/schemas/types/warehouse_purchase_order_receipts.d.ts +39 -0
- package/lib/schemas/types/warehouse_purchase_order_receipts.js +21 -0
- package/lib/schemas/types/warehouse_purchase_order_rfqs.d.ts +33 -0
- package/lib/schemas/types/warehouse_purchase_order_rfqs.js +2 -0
- package/lib/schemas/types/warehouse_purchase_order_vendor_returns.d.ts +48 -0
- package/lib/schemas/types/warehouse_purchase_order_vendor_returns.js +2 -0
- package/lib/schemas/types/warehouse_purchase_orders.d.ts +33 -0
- package/lib/schemas/types/warehouse_purchase_orders.js +2 -0
- package/lib/schemas/types/warehouse_sale_deliveries.d.ts +29 -29
- package/lib/schemas/types/warehouse_sale_invoices.d.ts +17 -17
- package/lib/schemas/types/warehouse_sale_order_common.d.ts +39 -0
- package/lib/schemas/types/warehouse_sale_order_common.js +2 -0
- package/lib/schemas/types/warehouse_sale_order_rfqs.d.ts +7 -7
- package/lib/schemas/types/warehouse_sale_orders.d.ts +7 -7
- package/lib/schemas/types/warehouse_void_invoice_items.d.ts +37 -0
- package/lib/schemas/types/warehouse_void_invoice_items.js +2 -0
- package/lib/schemas/types/warehouse_void_purchase_order_items.d.ts +37 -0
- package/lib/schemas/types/warehouse_void_purchase_order_items.js +2 -0
- package/lib/schemas/types/warehouses.d.ts +2 -2
- package/package.json +1 -1
|
@@ -14,40 +14,40 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
14
14
|
items: import("mongoose").Types.DocumentArray<{
|
|
15
15
|
_id: import("mongoose").Types.ObjectId;
|
|
16
16
|
inventory_code: string;
|
|
17
|
-
quantity: number;
|
|
18
17
|
item_id: import("mongoose").Types.ObjectId;
|
|
18
|
+
quantity: number;
|
|
19
19
|
item_name: string;
|
|
20
20
|
received_qty: number;
|
|
21
21
|
notes?: string | null | undefined;
|
|
22
22
|
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
23
23
|
_id: import("mongoose").Types.ObjectId;
|
|
24
24
|
inventory_code: string;
|
|
25
|
-
quantity: number;
|
|
26
25
|
item_id: import("mongoose").Types.ObjectId;
|
|
26
|
+
quantity: number;
|
|
27
27
|
item_name: string;
|
|
28
28
|
received_qty: number;
|
|
29
29
|
notes?: string | null | undefined;
|
|
30
30
|
}> & {
|
|
31
31
|
_id: import("mongoose").Types.ObjectId;
|
|
32
32
|
inventory_code: string;
|
|
33
|
-
quantity: number;
|
|
34
33
|
item_id: import("mongoose").Types.ObjectId;
|
|
34
|
+
quantity: number;
|
|
35
35
|
item_name: string;
|
|
36
36
|
received_qty: number;
|
|
37
37
|
notes?: string | null | undefined;
|
|
38
38
|
}>;
|
|
39
|
-
status: import("../../constants").
|
|
39
|
+
status: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_STATUS_ENUM;
|
|
40
40
|
ref_id: string;
|
|
41
41
|
is_deleted: boolean;
|
|
42
|
-
ref_type: import("../../constants").
|
|
42
|
+
ref_type: import("../../constants").WAREHOUSE_REF_TYPE_ENUM;
|
|
43
43
|
doc_number: string;
|
|
44
|
-
record_type: import("../../constants").
|
|
45
|
-
flow: import("../../constants").
|
|
44
|
+
record_type: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_RECORD_TYPE_ENUM;
|
|
45
|
+
flow: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_FLOW_ENUM;
|
|
46
46
|
source_id: string;
|
|
47
|
-
source_type: import("../../constants").
|
|
47
|
+
source_type: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_LOCATION_TYPE_ENUM;
|
|
48
48
|
source_name: string;
|
|
49
49
|
destination_id: string;
|
|
50
|
-
destination_type: import("../../constants").
|
|
50
|
+
destination_type: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_LOCATION_TYPE_ENUM;
|
|
51
51
|
destination_name: string;
|
|
52
52
|
total_items: number;
|
|
53
53
|
total_quantity: number;
|
|
@@ -92,7 +92,7 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
92
92
|
name: string;
|
|
93
93
|
uid: string;
|
|
94
94
|
} | null | undefined;
|
|
95
|
-
edit_request_status?: import("../../constants").
|
|
95
|
+
edit_request_status?: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM | null | undefined;
|
|
96
96
|
edit_requested_at?: NativeDate | null | undefined;
|
|
97
97
|
edit_requested_by?: {
|
|
98
98
|
name: string;
|
|
@@ -106,7 +106,7 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
106
106
|
} | null | undefined;
|
|
107
107
|
edit_request_decision_note?: string | null | undefined;
|
|
108
108
|
edit_approved_for_context_id?: string | null | undefined;
|
|
109
|
-
cancel_request_status?: import("../../constants").
|
|
109
|
+
cancel_request_status?: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM | null | undefined;
|
|
110
110
|
cancel_requested_at?: NativeDate | null | undefined;
|
|
111
111
|
cancel_requested_by?: {
|
|
112
112
|
name: string;
|
|
@@ -129,40 +129,40 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
129
129
|
items: import("mongoose").Types.DocumentArray<{
|
|
130
130
|
_id: import("mongoose").Types.ObjectId;
|
|
131
131
|
inventory_code: string;
|
|
132
|
-
quantity: number;
|
|
133
132
|
item_id: import("mongoose").Types.ObjectId;
|
|
133
|
+
quantity: number;
|
|
134
134
|
item_name: string;
|
|
135
135
|
received_qty: number;
|
|
136
136
|
notes?: string | null | undefined;
|
|
137
137
|
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
138
138
|
_id: import("mongoose").Types.ObjectId;
|
|
139
139
|
inventory_code: string;
|
|
140
|
-
quantity: number;
|
|
141
140
|
item_id: import("mongoose").Types.ObjectId;
|
|
141
|
+
quantity: number;
|
|
142
142
|
item_name: string;
|
|
143
143
|
received_qty: number;
|
|
144
144
|
notes?: string | null | undefined;
|
|
145
145
|
}> & {
|
|
146
146
|
_id: import("mongoose").Types.ObjectId;
|
|
147
147
|
inventory_code: string;
|
|
148
|
-
quantity: number;
|
|
149
148
|
item_id: import("mongoose").Types.ObjectId;
|
|
149
|
+
quantity: number;
|
|
150
150
|
item_name: string;
|
|
151
151
|
received_qty: number;
|
|
152
152
|
notes?: string | null | undefined;
|
|
153
153
|
}>;
|
|
154
|
-
status: import("../../constants").
|
|
154
|
+
status: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_STATUS_ENUM;
|
|
155
155
|
ref_id: string;
|
|
156
156
|
is_deleted: boolean;
|
|
157
|
-
ref_type: import("../../constants").
|
|
157
|
+
ref_type: import("../../constants").WAREHOUSE_REF_TYPE_ENUM;
|
|
158
158
|
doc_number: string;
|
|
159
|
-
record_type: import("../../constants").
|
|
160
|
-
flow: import("../../constants").
|
|
159
|
+
record_type: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_RECORD_TYPE_ENUM;
|
|
160
|
+
flow: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_FLOW_ENUM;
|
|
161
161
|
source_id: string;
|
|
162
|
-
source_type: import("../../constants").
|
|
162
|
+
source_type: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_LOCATION_TYPE_ENUM;
|
|
163
163
|
source_name: string;
|
|
164
164
|
destination_id: string;
|
|
165
|
-
destination_type: import("../../constants").
|
|
165
|
+
destination_type: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_LOCATION_TYPE_ENUM;
|
|
166
166
|
destination_name: string;
|
|
167
167
|
total_items: number;
|
|
168
168
|
total_quantity: number;
|
|
@@ -207,7 +207,7 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
207
207
|
name: string;
|
|
208
208
|
uid: string;
|
|
209
209
|
} | null | undefined;
|
|
210
|
-
edit_request_status?: import("../../constants").
|
|
210
|
+
edit_request_status?: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM | null | undefined;
|
|
211
211
|
edit_requested_at?: NativeDate | null | undefined;
|
|
212
212
|
edit_requested_by?: {
|
|
213
213
|
name: string;
|
|
@@ -221,7 +221,7 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
221
221
|
} | null | undefined;
|
|
222
222
|
edit_request_decision_note?: string | null | undefined;
|
|
223
223
|
edit_approved_for_context_id?: string | null | undefined;
|
|
224
|
-
cancel_request_status?: import("../../constants").
|
|
224
|
+
cancel_request_status?: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM | null | undefined;
|
|
225
225
|
cancel_requested_at?: NativeDate | null | undefined;
|
|
226
226
|
cancel_requested_by?: {
|
|
227
227
|
name: string;
|
|
@@ -244,40 +244,40 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
244
244
|
items: import("mongoose").Types.DocumentArray<{
|
|
245
245
|
_id: import("mongoose").Types.ObjectId;
|
|
246
246
|
inventory_code: string;
|
|
247
|
-
quantity: number;
|
|
248
247
|
item_id: import("mongoose").Types.ObjectId;
|
|
248
|
+
quantity: number;
|
|
249
249
|
item_name: string;
|
|
250
250
|
received_qty: number;
|
|
251
251
|
notes?: string | null | undefined;
|
|
252
252
|
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
253
253
|
_id: import("mongoose").Types.ObjectId;
|
|
254
254
|
inventory_code: string;
|
|
255
|
-
quantity: number;
|
|
256
255
|
item_id: import("mongoose").Types.ObjectId;
|
|
256
|
+
quantity: number;
|
|
257
257
|
item_name: string;
|
|
258
258
|
received_qty: number;
|
|
259
259
|
notes?: string | null | undefined;
|
|
260
260
|
}> & {
|
|
261
261
|
_id: import("mongoose").Types.ObjectId;
|
|
262
262
|
inventory_code: string;
|
|
263
|
-
quantity: number;
|
|
264
263
|
item_id: import("mongoose").Types.ObjectId;
|
|
264
|
+
quantity: number;
|
|
265
265
|
item_name: string;
|
|
266
266
|
received_qty: number;
|
|
267
267
|
notes?: string | null | undefined;
|
|
268
268
|
}>;
|
|
269
|
-
status: import("../../constants").
|
|
269
|
+
status: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_STATUS_ENUM;
|
|
270
270
|
ref_id: string;
|
|
271
271
|
is_deleted: boolean;
|
|
272
|
-
ref_type: import("../../constants").
|
|
272
|
+
ref_type: import("../../constants").WAREHOUSE_REF_TYPE_ENUM;
|
|
273
273
|
doc_number: string;
|
|
274
|
-
record_type: import("../../constants").
|
|
275
|
-
flow: import("../../constants").
|
|
274
|
+
record_type: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_RECORD_TYPE_ENUM;
|
|
275
|
+
flow: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_FLOW_ENUM;
|
|
276
276
|
source_id: string;
|
|
277
|
-
source_type: import("../../constants").
|
|
277
|
+
source_type: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_LOCATION_TYPE_ENUM;
|
|
278
278
|
source_name: string;
|
|
279
279
|
destination_id: string;
|
|
280
|
-
destination_type: import("../../constants").
|
|
280
|
+
destination_type: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_LOCATION_TYPE_ENUM;
|
|
281
281
|
destination_name: string;
|
|
282
282
|
total_items: number;
|
|
283
283
|
total_quantity: number;
|
|
@@ -322,7 +322,7 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
322
322
|
name: string;
|
|
323
323
|
uid: string;
|
|
324
324
|
} | null | undefined;
|
|
325
|
-
edit_request_status?: import("../../constants").
|
|
325
|
+
edit_request_status?: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM | null | undefined;
|
|
326
326
|
edit_requested_at?: NativeDate | null | undefined;
|
|
327
327
|
edit_requested_by?: {
|
|
328
328
|
name: string;
|
|
@@ -336,7 +336,7 @@ export declare const WarehouseInternalMovementsSchema: Schema<any, import("mongo
|
|
|
336
336
|
} | null | undefined;
|
|
337
337
|
edit_request_decision_note?: string | null | undefined;
|
|
338
338
|
edit_approved_for_context_id?: string | null | undefined;
|
|
339
|
-
cancel_request_status?: import("../../constants").
|
|
339
|
+
cancel_request_status?: import("../../constants").WAREHOUSE_INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_ENUM | null | undefined;
|
|
340
340
|
cancel_requested_at?: NativeDate | null | undefined;
|
|
341
341
|
cancel_requested_by?: {
|
|
342
342
|
name: string;
|
|
@@ -71,7 +71,7 @@ exports.WarehouseInternalMovementsSchema = new mongoose_1.Schema({
|
|
|
71
71
|
},
|
|
72
72
|
ref_type: {
|
|
73
73
|
type: String,
|
|
74
|
-
enum: constants_1.
|
|
74
|
+
enum: constants_1.ALL_WAREHOUSE_REF_TYPES,
|
|
75
75
|
required: true,
|
|
76
76
|
},
|
|
77
77
|
doc_number: {
|
|
@@ -81,17 +81,17 @@ exports.WarehouseInternalMovementsSchema = new mongoose_1.Schema({
|
|
|
81
81
|
},
|
|
82
82
|
record_type: {
|
|
83
83
|
type: String,
|
|
84
|
-
enum: constants_1.
|
|
84
|
+
enum: constants_1.ALL_WAREHOUSE_INTERNAL_MOVEMENT_RECORD_TYPE_NAMES,
|
|
85
85
|
required: true,
|
|
86
86
|
},
|
|
87
87
|
status: {
|
|
88
88
|
type: String,
|
|
89
|
-
enum: constants_1.
|
|
89
|
+
enum: constants_1.ALL_WAREHOUSE_INTERNAL_MOVEMENT_STATUS_NAMES,
|
|
90
90
|
required: true,
|
|
91
91
|
},
|
|
92
92
|
flow: {
|
|
93
93
|
type: String,
|
|
94
|
-
enum: constants_1.
|
|
94
|
+
enum: constants_1.ALL_WAREHOUSE_INTERNAL_MOVEMENT_FLOW_NAMES,
|
|
95
95
|
required: true,
|
|
96
96
|
},
|
|
97
97
|
source_id: {
|
|
@@ -100,7 +100,7 @@ exports.WarehouseInternalMovementsSchema = new mongoose_1.Schema({
|
|
|
100
100
|
},
|
|
101
101
|
source_type: {
|
|
102
102
|
type: String,
|
|
103
|
-
enum: constants_1.
|
|
103
|
+
enum: constants_1.ALL_WAREHOUSE_INTERNAL_MOVEMENT_LOCATION_TYPE_NAMES,
|
|
104
104
|
required: true,
|
|
105
105
|
},
|
|
106
106
|
source_name: {
|
|
@@ -113,7 +113,7 @@ exports.WarehouseInternalMovementsSchema = new mongoose_1.Schema({
|
|
|
113
113
|
},
|
|
114
114
|
destination_type: {
|
|
115
115
|
type: String,
|
|
116
|
-
enum: constants_1.
|
|
116
|
+
enum: constants_1.ALL_WAREHOUSE_INTERNAL_MOVEMENT_LOCATION_TYPE_NAMES,
|
|
117
117
|
required: true,
|
|
118
118
|
},
|
|
119
119
|
destination_name: {
|
|
@@ -196,7 +196,7 @@ exports.WarehouseInternalMovementsSchema = new mongoose_1.Schema({
|
|
|
196
196
|
},
|
|
197
197
|
edit_request_status: {
|
|
198
198
|
type: String,
|
|
199
|
-
enum: constants_1.
|
|
199
|
+
enum: constants_1.ALL_WAREHOUSE_INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_NAMES,
|
|
200
200
|
required: false,
|
|
201
201
|
},
|
|
202
202
|
edit_requested_at: {
|
|
@@ -229,7 +229,7 @@ exports.WarehouseInternalMovementsSchema = new mongoose_1.Schema({
|
|
|
229
229
|
},
|
|
230
230
|
cancel_request_status: {
|
|
231
231
|
type: String,
|
|
232
|
-
enum: constants_1.
|
|
232
|
+
enum: constants_1.ALL_WAREHOUSE_INTERNAL_MOVEMENT_EDIT_REQUEST_STATUS_NAMES,
|
|
233
233
|
required: false,
|
|
234
234
|
},
|
|
235
235
|
cancel_requested_at: {
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
import { WAREHOUSE_LOT_SERIAL_DOC_TYPE_ENUM, WAREHOUSE_TRACKING_MODE_ENUM } from '../../constants';
|
|
3
|
+
import { WAREHOUSE_INVENTORY_LOT_SERIAL_NUMBERS_COLLECTION_NAME } from '../types/warehouse_inventory_lot_serial_numbers';
|
|
4
|
+
export declare const WarehouseInventoryLotSerialNumberSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
5
|
+
timestamps: true;
|
|
6
|
+
versionKey: false;
|
|
7
|
+
minimize: false;
|
|
8
|
+
}, {
|
|
9
|
+
createdAt: NativeDate;
|
|
10
|
+
updatedAt: NativeDate;
|
|
11
|
+
} & {
|
|
12
|
+
_id: import("mongoose").Types.ObjectId;
|
|
13
|
+
createdAt: NativeDate;
|
|
14
|
+
updatedAt: NativeDate;
|
|
15
|
+
inventory_code: string;
|
|
16
|
+
ref_id: string;
|
|
17
|
+
tracking_mode: WAREHOUSE_TRACKING_MODE_ENUM;
|
|
18
|
+
ref_type: string;
|
|
19
|
+
doc_type: WAREHOUSE_LOT_SERIAL_DOC_TYPE_ENUM;
|
|
20
|
+
source?: import("../../constants").WAREHOUSE_LOT_SERIAL_MOVEMENT_SOURCE_ENUM | null | undefined;
|
|
21
|
+
quantity?: number | null | undefined;
|
|
22
|
+
source_id?: string | null | undefined;
|
|
23
|
+
created_by?: {
|
|
24
|
+
name: string;
|
|
25
|
+
uid: string;
|
|
26
|
+
} | null | undefined;
|
|
27
|
+
updated_by?: {
|
|
28
|
+
name: string;
|
|
29
|
+
uid: string;
|
|
30
|
+
} | null | undefined;
|
|
31
|
+
received_at?: NativeDate | null | undefined;
|
|
32
|
+
received_by?: {
|
|
33
|
+
name: string;
|
|
34
|
+
uid: string;
|
|
35
|
+
} | null | undefined;
|
|
36
|
+
is_available?: boolean | null | undefined;
|
|
37
|
+
lot_number?: string | null | undefined;
|
|
38
|
+
serial_number?: string | null | undefined;
|
|
39
|
+
expiry_date?: NativeDate | null | undefined;
|
|
40
|
+
best_before_date?: NativeDate | null | undefined;
|
|
41
|
+
removal_date?: NativeDate | null | undefined;
|
|
42
|
+
alert_date?: NativeDate | null | undefined;
|
|
43
|
+
quantity_available?: number | null | undefined;
|
|
44
|
+
last_moved_at?: NativeDate | null | undefined;
|
|
45
|
+
last_moved_by?: {
|
|
46
|
+
name: string;
|
|
47
|
+
uid: string;
|
|
48
|
+
} | null | undefined;
|
|
49
|
+
movement_type?: string | null | undefined;
|
|
50
|
+
occurred_at?: NativeDate | null | undefined;
|
|
51
|
+
occurred_by?: {
|
|
52
|
+
name: string;
|
|
53
|
+
uid: string;
|
|
54
|
+
} | null | undefined;
|
|
55
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
56
|
+
createdAt: NativeDate;
|
|
57
|
+
updatedAt: NativeDate;
|
|
58
|
+
} & {
|
|
59
|
+
_id: import("mongoose").Types.ObjectId;
|
|
60
|
+
createdAt: NativeDate;
|
|
61
|
+
updatedAt: NativeDate;
|
|
62
|
+
inventory_code: string;
|
|
63
|
+
ref_id: string;
|
|
64
|
+
tracking_mode: WAREHOUSE_TRACKING_MODE_ENUM;
|
|
65
|
+
ref_type: string;
|
|
66
|
+
doc_type: WAREHOUSE_LOT_SERIAL_DOC_TYPE_ENUM;
|
|
67
|
+
source?: import("../../constants").WAREHOUSE_LOT_SERIAL_MOVEMENT_SOURCE_ENUM | null | undefined;
|
|
68
|
+
quantity?: number | null | undefined;
|
|
69
|
+
source_id?: string | null | undefined;
|
|
70
|
+
created_by?: {
|
|
71
|
+
name: string;
|
|
72
|
+
uid: string;
|
|
73
|
+
} | null | undefined;
|
|
74
|
+
updated_by?: {
|
|
75
|
+
name: string;
|
|
76
|
+
uid: string;
|
|
77
|
+
} | null | undefined;
|
|
78
|
+
received_at?: NativeDate | null | undefined;
|
|
79
|
+
received_by?: {
|
|
80
|
+
name: string;
|
|
81
|
+
uid: string;
|
|
82
|
+
} | null | undefined;
|
|
83
|
+
is_available?: boolean | null | undefined;
|
|
84
|
+
lot_number?: string | null | undefined;
|
|
85
|
+
serial_number?: string | null | undefined;
|
|
86
|
+
expiry_date?: NativeDate | null | undefined;
|
|
87
|
+
best_before_date?: NativeDate | null | undefined;
|
|
88
|
+
removal_date?: NativeDate | null | undefined;
|
|
89
|
+
alert_date?: NativeDate | null | undefined;
|
|
90
|
+
quantity_available?: number | null | undefined;
|
|
91
|
+
last_moved_at?: NativeDate | null | undefined;
|
|
92
|
+
last_moved_by?: {
|
|
93
|
+
name: string;
|
|
94
|
+
uid: string;
|
|
95
|
+
} | null | undefined;
|
|
96
|
+
movement_type?: string | null | undefined;
|
|
97
|
+
occurred_at?: NativeDate | null | undefined;
|
|
98
|
+
occurred_by?: {
|
|
99
|
+
name: string;
|
|
100
|
+
uid: string;
|
|
101
|
+
} | null | undefined;
|
|
102
|
+
}>> & import("mongoose").FlatRecord<{
|
|
103
|
+
createdAt: NativeDate;
|
|
104
|
+
updatedAt: NativeDate;
|
|
105
|
+
} & {
|
|
106
|
+
_id: import("mongoose").Types.ObjectId;
|
|
107
|
+
createdAt: NativeDate;
|
|
108
|
+
updatedAt: NativeDate;
|
|
109
|
+
inventory_code: string;
|
|
110
|
+
ref_id: string;
|
|
111
|
+
tracking_mode: WAREHOUSE_TRACKING_MODE_ENUM;
|
|
112
|
+
ref_type: string;
|
|
113
|
+
doc_type: WAREHOUSE_LOT_SERIAL_DOC_TYPE_ENUM;
|
|
114
|
+
source?: import("../../constants").WAREHOUSE_LOT_SERIAL_MOVEMENT_SOURCE_ENUM | null | undefined;
|
|
115
|
+
quantity?: number | null | undefined;
|
|
116
|
+
source_id?: string | null | undefined;
|
|
117
|
+
created_by?: {
|
|
118
|
+
name: string;
|
|
119
|
+
uid: string;
|
|
120
|
+
} | null | undefined;
|
|
121
|
+
updated_by?: {
|
|
122
|
+
name: string;
|
|
123
|
+
uid: string;
|
|
124
|
+
} | null | undefined;
|
|
125
|
+
received_at?: NativeDate | null | undefined;
|
|
126
|
+
received_by?: {
|
|
127
|
+
name: string;
|
|
128
|
+
uid: string;
|
|
129
|
+
} | null | undefined;
|
|
130
|
+
is_available?: boolean | null | undefined;
|
|
131
|
+
lot_number?: string | null | undefined;
|
|
132
|
+
serial_number?: string | null | undefined;
|
|
133
|
+
expiry_date?: NativeDate | null | undefined;
|
|
134
|
+
best_before_date?: NativeDate | null | undefined;
|
|
135
|
+
removal_date?: NativeDate | null | undefined;
|
|
136
|
+
alert_date?: NativeDate | null | undefined;
|
|
137
|
+
quantity_available?: number | null | undefined;
|
|
138
|
+
last_moved_at?: NativeDate | null | undefined;
|
|
139
|
+
last_moved_by?: {
|
|
140
|
+
name: string;
|
|
141
|
+
uid: string;
|
|
142
|
+
} | null | undefined;
|
|
143
|
+
movement_type?: string | null | undefined;
|
|
144
|
+
occurred_at?: NativeDate | null | undefined;
|
|
145
|
+
occurred_by?: {
|
|
146
|
+
name: string;
|
|
147
|
+
uid: string;
|
|
148
|
+
} | null | undefined;
|
|
149
|
+
}> & Required<{
|
|
150
|
+
_id: import("mongoose").Types.ObjectId;
|
|
151
|
+
}> & {
|
|
152
|
+
__v: number;
|
|
153
|
+
}>;
|
|
154
|
+
export { WAREHOUSE_INVENTORY_LOT_SERIAL_NUMBERS_COLLECTION_NAME };
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WAREHOUSE_INVENTORY_LOT_SERIAL_NUMBERS_COLLECTION_NAME = exports.WarehouseInventoryLotSerialNumberSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const warehouse_inventory_lot_serial_numbers_1 = require("../types/warehouse_inventory_lot_serial_numbers");
|
|
7
|
+
Object.defineProperty(exports, "WAREHOUSE_INVENTORY_LOT_SERIAL_NUMBERS_COLLECTION_NAME", { enumerable: true, get: function () { return warehouse_inventory_lot_serial_numbers_1.WAREHOUSE_INVENTORY_LOT_SERIAL_NUMBERS_COLLECTION_NAME; } });
|
|
8
|
+
const ALL_WAREHOUSE_TRACKING_MODES = [constants_1.WAREHOUSE_TRACKING_MODE_ENUM.LOT, constants_1.WAREHOUSE_TRACKING_MODE_ENUM.SERIAL];
|
|
9
|
+
const ALL_MOVEMENT_TYPES = ['IN', 'OUT'];
|
|
10
|
+
const ActorRefSchema = new mongoose_1.Schema({
|
|
11
|
+
uid: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true,
|
|
14
|
+
trim: true,
|
|
15
|
+
},
|
|
16
|
+
name: {
|
|
17
|
+
type: String,
|
|
18
|
+
required: true,
|
|
19
|
+
default: '',
|
|
20
|
+
trim: true,
|
|
21
|
+
},
|
|
22
|
+
}, {
|
|
23
|
+
_id: false,
|
|
24
|
+
minimize: false,
|
|
25
|
+
});
|
|
26
|
+
exports.WarehouseInventoryLotSerialNumberSchema = new mongoose_1.Schema({
|
|
27
|
+
_id: {
|
|
28
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
29
|
+
required: true,
|
|
30
|
+
immutable: true,
|
|
31
|
+
},
|
|
32
|
+
doc_type: {
|
|
33
|
+
type: String,
|
|
34
|
+
enum: constants_1.ALL_WAREHOUSE_LOT_SERIAL_DOC_TYPES,
|
|
35
|
+
required: true,
|
|
36
|
+
immutable: true,
|
|
37
|
+
},
|
|
38
|
+
ref_id: {
|
|
39
|
+
type: String,
|
|
40
|
+
required: true,
|
|
41
|
+
trim: true,
|
|
42
|
+
index: true,
|
|
43
|
+
},
|
|
44
|
+
ref_type: {
|
|
45
|
+
type: String,
|
|
46
|
+
required: true,
|
|
47
|
+
index: true,
|
|
48
|
+
},
|
|
49
|
+
inventory_code: {
|
|
50
|
+
type: String,
|
|
51
|
+
required: true,
|
|
52
|
+
trim: true,
|
|
53
|
+
index: true,
|
|
54
|
+
},
|
|
55
|
+
tracking_mode: {
|
|
56
|
+
type: String,
|
|
57
|
+
enum: ALL_WAREHOUSE_TRACKING_MODES,
|
|
58
|
+
required: true,
|
|
59
|
+
},
|
|
60
|
+
lot_number: {
|
|
61
|
+
type: String,
|
|
62
|
+
required: false,
|
|
63
|
+
trim: true,
|
|
64
|
+
default: null,
|
|
65
|
+
},
|
|
66
|
+
serial_number: {
|
|
67
|
+
type: String,
|
|
68
|
+
required: false,
|
|
69
|
+
trim: true,
|
|
70
|
+
default: null,
|
|
71
|
+
},
|
|
72
|
+
expiry_date: {
|
|
73
|
+
type: mongoose_1.Schema.Types.Date,
|
|
74
|
+
required: false,
|
|
75
|
+
default: null,
|
|
76
|
+
},
|
|
77
|
+
best_before_date: {
|
|
78
|
+
type: mongoose_1.Schema.Types.Date,
|
|
79
|
+
required: false,
|
|
80
|
+
default: null,
|
|
81
|
+
},
|
|
82
|
+
removal_date: {
|
|
83
|
+
type: mongoose_1.Schema.Types.Date,
|
|
84
|
+
required: false,
|
|
85
|
+
default: null,
|
|
86
|
+
},
|
|
87
|
+
alert_date: {
|
|
88
|
+
type: mongoose_1.Schema.Types.Date,
|
|
89
|
+
required: false,
|
|
90
|
+
default: null,
|
|
91
|
+
},
|
|
92
|
+
created_by: {
|
|
93
|
+
type: ActorRefSchema,
|
|
94
|
+
required: false,
|
|
95
|
+
default: null,
|
|
96
|
+
},
|
|
97
|
+
updated_by: {
|
|
98
|
+
type: ActorRefSchema,
|
|
99
|
+
required: false,
|
|
100
|
+
default: null,
|
|
101
|
+
},
|
|
102
|
+
quantity_available: {
|
|
103
|
+
type: Number,
|
|
104
|
+
min: 0,
|
|
105
|
+
required() {
|
|
106
|
+
return this.doc_type === constants_1.WAREHOUSE_LOT_SERIAL_DOC_TYPE_ENUM.BALANCE;
|
|
107
|
+
},
|
|
108
|
+
default: undefined,
|
|
109
|
+
},
|
|
110
|
+
is_available: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
required: false,
|
|
113
|
+
default: undefined,
|
|
114
|
+
},
|
|
115
|
+
received_at: {
|
|
116
|
+
type: mongoose_1.Schema.Types.Date,
|
|
117
|
+
required: false,
|
|
118
|
+
default: null,
|
|
119
|
+
},
|
|
120
|
+
received_by: {
|
|
121
|
+
type: ActorRefSchema,
|
|
122
|
+
required: false,
|
|
123
|
+
default: null,
|
|
124
|
+
},
|
|
125
|
+
last_moved_at: {
|
|
126
|
+
type: mongoose_1.Schema.Types.Date,
|
|
127
|
+
required: false,
|
|
128
|
+
default: null,
|
|
129
|
+
},
|
|
130
|
+
last_moved_by: {
|
|
131
|
+
type: ActorRefSchema,
|
|
132
|
+
required: false,
|
|
133
|
+
default: null,
|
|
134
|
+
},
|
|
135
|
+
movement_type: {
|
|
136
|
+
type: String,
|
|
137
|
+
enum: ALL_MOVEMENT_TYPES,
|
|
138
|
+
required() {
|
|
139
|
+
return this.doc_type === constants_1.WAREHOUSE_LOT_SERIAL_DOC_TYPE_ENUM.MOVEMENT;
|
|
140
|
+
},
|
|
141
|
+
default: undefined,
|
|
142
|
+
},
|
|
143
|
+
quantity: {
|
|
144
|
+
type: Number,
|
|
145
|
+
min: 0,
|
|
146
|
+
required() {
|
|
147
|
+
return this.doc_type === constants_1.WAREHOUSE_LOT_SERIAL_DOC_TYPE_ENUM.MOVEMENT;
|
|
148
|
+
},
|
|
149
|
+
default: undefined,
|
|
150
|
+
},
|
|
151
|
+
occurred_at: {
|
|
152
|
+
type: mongoose_1.Schema.Types.Date,
|
|
153
|
+
required() {
|
|
154
|
+
return this.doc_type === constants_1.WAREHOUSE_LOT_SERIAL_DOC_TYPE_ENUM.MOVEMENT;
|
|
155
|
+
},
|
|
156
|
+
default: undefined,
|
|
157
|
+
index: true,
|
|
158
|
+
},
|
|
159
|
+
occurred_by: {
|
|
160
|
+
type: ActorRefSchema,
|
|
161
|
+
required: false,
|
|
162
|
+
default: null,
|
|
163
|
+
},
|
|
164
|
+
source: {
|
|
165
|
+
type: String,
|
|
166
|
+
enum: constants_1.ALL_WAREHOUSE_LOT_SERIAL_MOVEMENT_SOURCES,
|
|
167
|
+
required() {
|
|
168
|
+
return this.doc_type === constants_1.WAREHOUSE_LOT_SERIAL_DOC_TYPE_ENUM.MOVEMENT;
|
|
169
|
+
},
|
|
170
|
+
default: undefined,
|
|
171
|
+
},
|
|
172
|
+
source_id: {
|
|
173
|
+
type: String,
|
|
174
|
+
required: false,
|
|
175
|
+
trim: true,
|
|
176
|
+
default: null,
|
|
177
|
+
},
|
|
178
|
+
createdAt: {
|
|
179
|
+
type: mongoose_1.Schema.Types.Date,
|
|
180
|
+
required: true,
|
|
181
|
+
default: () => new Date(),
|
|
182
|
+
immutable: true,
|
|
183
|
+
},
|
|
184
|
+
updatedAt: {
|
|
185
|
+
type: mongoose_1.Schema.Types.Date,
|
|
186
|
+
required: true,
|
|
187
|
+
default: () => new Date(),
|
|
188
|
+
},
|
|
189
|
+
}, {
|
|
190
|
+
timestamps: true,
|
|
191
|
+
versionKey: false,
|
|
192
|
+
minimize: false,
|
|
193
|
+
});
|
|
@@ -14,14 +14,14 @@ export declare const WarehouseInventoryTransactionsSchema: Schema<any, import("m
|
|
|
14
14
|
transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
|
|
15
15
|
transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
|
|
16
16
|
inventory_code: string;
|
|
17
|
+
warehouse_id: string;
|
|
17
18
|
quantity_left: number;
|
|
18
19
|
unit_price: number;
|
|
19
20
|
remaining_stock_price: number;
|
|
20
|
-
transaction_quantity: number;
|
|
21
21
|
previous_quantity_left: number;
|
|
22
22
|
previous_unit_price: number;
|
|
23
23
|
previous_remaining_stock_price: number;
|
|
24
|
-
|
|
24
|
+
transaction_quantity: number;
|
|
25
25
|
order_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
26
26
|
description?: string | null | undefined;
|
|
27
27
|
order_number?: number | null | undefined;
|
|
@@ -38,14 +38,14 @@ export declare const WarehouseInventoryTransactionsSchema: Schema<any, import("m
|
|
|
38
38
|
transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
|
|
39
39
|
transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
|
|
40
40
|
inventory_code: string;
|
|
41
|
+
warehouse_id: string;
|
|
41
42
|
quantity_left: number;
|
|
42
43
|
unit_price: number;
|
|
43
44
|
remaining_stock_price: number;
|
|
44
|
-
transaction_quantity: number;
|
|
45
45
|
previous_quantity_left: number;
|
|
46
46
|
previous_unit_price: number;
|
|
47
47
|
previous_remaining_stock_price: number;
|
|
48
|
-
|
|
48
|
+
transaction_quantity: number;
|
|
49
49
|
order_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
50
50
|
description?: string | null | undefined;
|
|
51
51
|
order_number?: number | null | undefined;
|
|
@@ -62,14 +62,14 @@ export declare const WarehouseInventoryTransactionsSchema: Schema<any, import("m
|
|
|
62
62
|
transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
|
|
63
63
|
transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
|
|
64
64
|
inventory_code: string;
|
|
65
|
+
warehouse_id: string;
|
|
65
66
|
quantity_left: number;
|
|
66
67
|
unit_price: number;
|
|
67
68
|
remaining_stock_price: number;
|
|
68
|
-
transaction_quantity: number;
|
|
69
69
|
previous_quantity_left: number;
|
|
70
70
|
previous_unit_price: number;
|
|
71
71
|
previous_remaining_stock_price: number;
|
|
72
|
-
|
|
72
|
+
transaction_quantity: number;
|
|
73
73
|
order_id?: import("mongoose").Types.ObjectId | null | undefined;
|
|
74
74
|
description?: string | null | undefined;
|
|
75
75
|
order_number?: number | null | undefined;
|