@managesome/eposmatic-toolkit 0.2.733 → 0.2.735

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.
@@ -428,7 +428,6 @@ function convertHalfHalfToItem(halfhalfSetup, itemsMap, options) {
428
428
  featured_sort_id: 0,
429
429
  display_price: null,
430
430
  show_starting_from: false,
431
- use_source_ingredients: false,
432
431
  createdAt: halfhalfSetup.createdAt,
433
432
  updatedAt: halfhalfSetup.updatedAt,
434
433
  };
@@ -160,7 +160,7 @@ function convertMinifiedCategoryToOriginalCategory(category) {
160
160
  function convertMinifiedItemToOriginalItem(item, tenantId) {
161
161
  const {
162
162
  // Optional properties
163
- brand_id = 'xxx', tenants = [], ingredients = null, createdAt = new Date(), updatedAt = new Date(), hide_name = false, caveats = [], dietary_preferences = [], is_featured = false, featured_sort_id = 0, display_price = null, show_starting_from = false, use_source_ingredients = false, keywords = [], is_discount_percentage = false,
163
+ brand_id = 'xxx', tenants = [], ingredients = null, createdAt = new Date(), updatedAt = new Date(), hide_name = false, caveats = [], dietary_preferences = [], is_featured = false, featured_sort_id = 0, display_price = null, show_starting_from = false, keywords = [], is_discount_percentage = false,
164
164
  // Changed properties
165
165
  // sold_out,
166
166
  // price,
@@ -187,7 +187,6 @@ function convertMinifiedItemToOriginalItem(item, tenantId) {
187
187
  featured_sort_id,
188
188
  display_price,
189
189
  show_starting_from,
190
- use_source_ingredients,
191
190
  is_discount_percentage,
192
191
  // changed properties
193
192
  price,
@@ -594,7 +594,6 @@ function convertSpecialToItem(special, itemsMap, halfhalfSetups) {
594
594
  featured_sort_id: 0,
595
595
  display_price: special.display_price,
596
596
  show_starting_from: special.show_starting_from,
597
- use_source_ingredients: false,
598
597
  createdAt: special.createdAt,
599
598
  updatedAt: special.updatedAt,
600
599
  };
@@ -23,7 +23,6 @@ export * from './internal_operational_roles';
23
23
  export * from './internal_staffs';
24
24
  export * from './inventories';
25
25
  export * from './inventory_categories';
26
- export * from './inventory_entries';
27
26
  export * from './inventory_transactions';
28
27
  export * from './item_transactions';
29
28
  export * from './items';
@@ -63,6 +62,7 @@ export * from './tenant_instore_shifts';
63
62
  export * from './tenant_inventory_department_transactions';
64
63
  export * from './tenant_inventory_department_utilities';
65
64
  export * from './tenant_inventory_departments';
65
+ export * from './tenant_inventory_entries';
66
66
  export * from './tenant_metadata';
67
67
  export * from './tenant_purchase_order_vendor_returns';
68
68
  export * from './tenant_purchase_orders';
@@ -82,6 +82,7 @@ export * from './warehouse_categories';
82
82
  export * from './warehouse_clients';
83
83
  export * from './warehouse_communications';
84
84
  export * from './warehouse_internal_movements';
85
+ export * from './warehouse_inventory_entries';
85
86
  export * from './warehouse_inventory_lot_serial_numbers';
86
87
  export * from './warehouse_inventory_transactions';
87
88
  export * from './warehouse_item_transactions';
@@ -39,7 +39,6 @@ __exportStar(require("./internal_operational_roles"), exports);
39
39
  __exportStar(require("./internal_staffs"), exports);
40
40
  __exportStar(require("./inventories"), exports);
41
41
  __exportStar(require("./inventory_categories"), exports);
42
- __exportStar(require("./inventory_entries"), exports);
43
42
  __exportStar(require("./inventory_transactions"), exports);
44
43
  __exportStar(require("./item_transactions"), exports);
45
44
  __exportStar(require("./items"), exports);
@@ -79,6 +78,7 @@ __exportStar(require("./tenant_instore_shifts"), exports);
79
78
  __exportStar(require("./tenant_inventory_department_transactions"), exports);
80
79
  __exportStar(require("./tenant_inventory_department_utilities"), exports);
81
80
  __exportStar(require("./tenant_inventory_departments"), exports);
81
+ __exportStar(require("./tenant_inventory_entries"), exports);
82
82
  __exportStar(require("./tenant_metadata"), exports);
83
83
  __exportStar(require("./tenant_purchase_order_vendor_returns"), exports);
84
84
  __exportStar(require("./tenant_purchase_orders"), exports);
@@ -98,6 +98,7 @@ __exportStar(require("./warehouse_categories"), exports);
98
98
  __exportStar(require("./warehouse_clients"), exports);
99
99
  __exportStar(require("./warehouse_communications"), exports);
100
100
  __exportStar(require("./warehouse_internal_movements"), exports);
101
+ __exportStar(require("./warehouse_inventory_entries"), exports);
101
102
  __exportStar(require("./warehouse_inventory_lot_serial_numbers"), exports);
102
103
  __exportStar(require("./warehouse_inventory_transactions"), exports);
103
104
  __exportStar(require("./warehouse_item_transactions"), exports);
@@ -4015,7 +4015,6 @@ export declare const ItemSchema: Schema<any, import("mongoose").Model<any, any,
4015
4015
  featured_sort_id: number;
4016
4016
  display_price: number;
4017
4017
  show_starting_from?: boolean | null | undefined;
4018
- use_source_ingredients?: boolean | null | undefined;
4019
4018
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
4020
4019
  createdAt: NativeDate;
4021
4020
  updatedAt: NativeDate;
@@ -7711,7 +7710,6 @@ export declare const ItemSchema: Schema<any, import("mongoose").Model<any, any,
7711
7710
  featured_sort_id: number;
7712
7711
  display_price: number;
7713
7712
  show_starting_from?: boolean | null | undefined;
7714
- use_source_ingredients?: boolean | null | undefined;
7715
7713
  }>> & import("mongoose").FlatRecord<{
7716
7714
  createdAt: NativeDate;
7717
7715
  updatedAt: NativeDate;
@@ -11407,7 +11405,6 @@ export declare const ItemSchema: Schema<any, import("mongoose").Model<any, any,
11407
11405
  featured_sort_id: number;
11408
11406
  display_price: number;
11409
11407
  show_starting_from?: boolean | null | undefined;
11410
- use_source_ingredients?: boolean | null | undefined;
11411
11408
  }> & Required<{
11412
11409
  _id: import("mongoose").Types.ObjectId;
11413
11410
  }> & {
@@ -318,10 +318,6 @@ exports.ItemSchema = new mongoose_1.Schema({
318
318
  type: Boolean,
319
319
  required: false,
320
320
  },
321
- use_source_ingredients: {
322
- type: Boolean,
323
- required: false,
324
- },
325
321
  // =====><=====
326
322
  createdAt: {
327
323
  type: mongoose_1.Schema.Types.Date,
@@ -0,0 +1,149 @@
1
+ import { Schema } from 'mongoose';
2
+ export declare const TenantInventoryEntrySchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
3
+ timestamps: true;
4
+ versionKey: false;
5
+ minimize: false;
6
+ }, {
7
+ createdAt: NativeDate;
8
+ updatedAt: NativeDate;
9
+ } & {
10
+ _id: import("mongoose").Types.ObjectId;
11
+ tenant_id: string;
12
+ createdAt: NativeDate;
13
+ updatedAt: NativeDate;
14
+ items: import("mongoose").Types.DocumentArray<{
15
+ _id: import("mongoose").Types.ObjectId;
16
+ inventory_code: string;
17
+ unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
18
+ transaction_quantity: number;
19
+ transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
20
+ inventory_name: string;
21
+ stock_price?: number | null | undefined;
22
+ preparation?: any;
23
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
24
+ _id: import("mongoose").Types.ObjectId;
25
+ inventory_code: string;
26
+ unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
27
+ transaction_quantity: number;
28
+ transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
29
+ inventory_name: string;
30
+ stock_price?: number | null | undefined;
31
+ preparation?: any;
32
+ }> & {
33
+ _id: import("mongoose").Types.ObjectId;
34
+ inventory_code: string;
35
+ unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
36
+ transaction_quantity: number;
37
+ transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
38
+ inventory_name: string;
39
+ stock_price?: number | null | undefined;
40
+ preparation?: any;
41
+ }>;
42
+ created_by: {
43
+ _id: string;
44
+ name: string;
45
+ };
46
+ doc_number: string;
47
+ total_items: number;
48
+ transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
49
+ total_stock_price: number;
50
+ description?: string | null | undefined;
51
+ department_code?: string | null | undefined;
52
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
53
+ createdAt: NativeDate;
54
+ updatedAt: NativeDate;
55
+ } & {
56
+ _id: import("mongoose").Types.ObjectId;
57
+ tenant_id: string;
58
+ createdAt: NativeDate;
59
+ updatedAt: NativeDate;
60
+ items: import("mongoose").Types.DocumentArray<{
61
+ _id: import("mongoose").Types.ObjectId;
62
+ inventory_code: string;
63
+ unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
64
+ transaction_quantity: number;
65
+ transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
66
+ inventory_name: string;
67
+ stock_price?: number | null | undefined;
68
+ preparation?: any;
69
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
70
+ _id: import("mongoose").Types.ObjectId;
71
+ inventory_code: string;
72
+ unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
73
+ transaction_quantity: number;
74
+ transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
75
+ inventory_name: string;
76
+ stock_price?: number | null | undefined;
77
+ preparation?: any;
78
+ }> & {
79
+ _id: import("mongoose").Types.ObjectId;
80
+ inventory_code: string;
81
+ unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
82
+ transaction_quantity: number;
83
+ transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
84
+ inventory_name: string;
85
+ stock_price?: number | null | undefined;
86
+ preparation?: any;
87
+ }>;
88
+ created_by: {
89
+ _id: string;
90
+ name: string;
91
+ };
92
+ doc_number: string;
93
+ total_items: number;
94
+ transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
95
+ total_stock_price: number;
96
+ description?: string | null | undefined;
97
+ department_code?: string | null | undefined;
98
+ }>> & import("mongoose").FlatRecord<{
99
+ createdAt: NativeDate;
100
+ updatedAt: NativeDate;
101
+ } & {
102
+ _id: import("mongoose").Types.ObjectId;
103
+ tenant_id: string;
104
+ createdAt: NativeDate;
105
+ updatedAt: NativeDate;
106
+ items: import("mongoose").Types.DocumentArray<{
107
+ _id: import("mongoose").Types.ObjectId;
108
+ inventory_code: string;
109
+ unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
110
+ transaction_quantity: number;
111
+ transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
112
+ inventory_name: string;
113
+ stock_price?: number | null | undefined;
114
+ preparation?: any;
115
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
116
+ _id: import("mongoose").Types.ObjectId;
117
+ inventory_code: string;
118
+ unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
119
+ transaction_quantity: number;
120
+ transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
121
+ inventory_name: string;
122
+ stock_price?: number | null | undefined;
123
+ preparation?: any;
124
+ }> & {
125
+ _id: import("mongoose").Types.ObjectId;
126
+ inventory_code: string;
127
+ unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
128
+ transaction_quantity: number;
129
+ transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
130
+ inventory_name: string;
131
+ stock_price?: number | null | undefined;
132
+ preparation?: any;
133
+ }>;
134
+ created_by: {
135
+ _id: string;
136
+ name: string;
137
+ };
138
+ doc_number: string;
139
+ total_items: number;
140
+ transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
141
+ total_stock_price: number;
142
+ description?: string | null | undefined;
143
+ department_code?: string | null | undefined;
144
+ }> & Required<{
145
+ _id: import("mongoose").Types.ObjectId;
146
+ }> & {
147
+ __v: number;
148
+ }>;
149
+ export declare const TENANT_INVENTORY_ENTRIES_COLLECTION_NAME = "tenant_inventory_entries";
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TENANT_INVENTORY_ENTRIES_COLLECTION_NAME = exports.TenantInventoryEntrySchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const constants_1 = require("../../constants");
6
+ const TenantInventoryEntryActorSchema = new mongoose_1.Schema({
7
+ _id: {
8
+ type: String,
9
+ required: true,
10
+ },
11
+ name: {
12
+ type: String,
13
+ required: true,
14
+ default: '',
15
+ },
16
+ }, {
17
+ _id: false,
18
+ minimize: false,
19
+ });
20
+ const TenantInventoryEntryItemSchema = new mongoose_1.Schema({
21
+ _id: {
22
+ type: mongoose_1.Schema.Types.ObjectId,
23
+ required: true,
24
+ immutable: true,
25
+ },
26
+ inventory_code: {
27
+ type: String,
28
+ required: true,
29
+ trim: true,
30
+ },
31
+ inventory_name: {
32
+ type: String,
33
+ required: true,
34
+ },
35
+ unit: {
36
+ type: String,
37
+ enum: constants_1.ALL_INVENTORY_UNIT_TYPES,
38
+ required: true,
39
+ },
40
+ transaction_type: {
41
+ type: String,
42
+ enum: constants_1.ALL_INVENTORY_TRANSACTION_TYPES,
43
+ required: true,
44
+ },
45
+ transaction_quantity: {
46
+ type: Number,
47
+ min: 0,
48
+ required: true,
49
+ },
50
+ stock_price: {
51
+ type: Number,
52
+ min: 0,
53
+ required: false,
54
+ },
55
+ preparation: {
56
+ type: mongoose_1.Schema.Types.Mixed,
57
+ required: false,
58
+ default: null,
59
+ },
60
+ }, {
61
+ _id: false,
62
+ minimize: false,
63
+ });
64
+ exports.TenantInventoryEntrySchema = new mongoose_1.Schema({
65
+ _id: {
66
+ type: mongoose_1.Schema.Types.ObjectId,
67
+ required: true,
68
+ immutable: true,
69
+ },
70
+ tenant_id: {
71
+ type: String,
72
+ required: true,
73
+ trim: true,
74
+ immutable: true,
75
+ ref: 'tenants',
76
+ },
77
+ department_code: {
78
+ type: String,
79
+ required: false,
80
+ default: null,
81
+ immutable: true,
82
+ ref: 'tenant_inventory_departments',
83
+ },
84
+ doc_number: {
85
+ type: String,
86
+ required: true,
87
+ trim: true,
88
+ immutable: true,
89
+ },
90
+ transaction_category: {
91
+ type: String,
92
+ enum: constants_1.ALL_INVENTORY_TRANSACTION_CATEGORIES,
93
+ required: true,
94
+ immutable: true,
95
+ },
96
+ description: {
97
+ type: String,
98
+ required: false,
99
+ },
100
+ items: {
101
+ type: [TenantInventoryEntryItemSchema],
102
+ required: true,
103
+ default: [],
104
+ },
105
+ total_items: {
106
+ type: Number,
107
+ min: 0,
108
+ required: true,
109
+ default: 0,
110
+ },
111
+ total_stock_price: {
112
+ type: Number,
113
+ min: 0,
114
+ required: true,
115
+ default: 0,
116
+ },
117
+ created_by: {
118
+ type: TenantInventoryEntryActorSchema,
119
+ required: true,
120
+ },
121
+ createdAt: {
122
+ type: mongoose_1.Schema.Types.Date,
123
+ required: true,
124
+ default: () => new Date(),
125
+ immutable: true,
126
+ },
127
+ updatedAt: {
128
+ type: mongoose_1.Schema.Types.Date,
129
+ required: true,
130
+ default: () => new Date(),
131
+ },
132
+ }, {
133
+ timestamps: true,
134
+ versionKey: false,
135
+ minimize: false,
136
+ });
137
+ exports.TENANT_INVENTORY_ENTRIES_COLLECTION_NAME = 'tenant_inventory_entries';
@@ -0,0 +1,146 @@
1
+ import { Schema } from 'mongoose';
2
+ export declare const WarehouseInventoryEntrySchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
3
+ timestamps: true;
4
+ versionKey: false;
5
+ minimize: false;
6
+ }, {
7
+ createdAt: NativeDate;
8
+ updatedAt: NativeDate;
9
+ } & {
10
+ _id: import("mongoose").Types.ObjectId;
11
+ createdAt: NativeDate;
12
+ updatedAt: NativeDate;
13
+ items: import("mongoose").Types.DocumentArray<{
14
+ _id: import("mongoose").Types.ObjectId;
15
+ inventory_code: string;
16
+ unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
17
+ transaction_quantity: number;
18
+ transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
19
+ inventory_name: string;
20
+ stock_price?: number | null | undefined;
21
+ preparation?: any;
22
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
23
+ _id: import("mongoose").Types.ObjectId;
24
+ inventory_code: string;
25
+ unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
26
+ transaction_quantity: number;
27
+ transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
28
+ inventory_name: string;
29
+ stock_price?: number | null | undefined;
30
+ preparation?: any;
31
+ }> & {
32
+ _id: import("mongoose").Types.ObjectId;
33
+ inventory_code: string;
34
+ unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
35
+ transaction_quantity: number;
36
+ transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
37
+ inventory_name: string;
38
+ stock_price?: number | null | undefined;
39
+ preparation?: any;
40
+ }>;
41
+ warehouse_id: string;
42
+ created_by: {
43
+ _id: string;
44
+ name: string;
45
+ };
46
+ doc_number: string;
47
+ total_items: number;
48
+ transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
49
+ total_stock_price: number;
50
+ description?: string | null | undefined;
51
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
52
+ createdAt: NativeDate;
53
+ updatedAt: NativeDate;
54
+ } & {
55
+ _id: import("mongoose").Types.ObjectId;
56
+ createdAt: NativeDate;
57
+ updatedAt: NativeDate;
58
+ items: import("mongoose").Types.DocumentArray<{
59
+ _id: import("mongoose").Types.ObjectId;
60
+ inventory_code: string;
61
+ unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
62
+ transaction_quantity: number;
63
+ transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
64
+ inventory_name: string;
65
+ stock_price?: number | null | undefined;
66
+ preparation?: any;
67
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
68
+ _id: import("mongoose").Types.ObjectId;
69
+ inventory_code: string;
70
+ unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
71
+ transaction_quantity: number;
72
+ transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
73
+ inventory_name: string;
74
+ stock_price?: number | null | undefined;
75
+ preparation?: any;
76
+ }> & {
77
+ _id: import("mongoose").Types.ObjectId;
78
+ inventory_code: string;
79
+ unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
80
+ transaction_quantity: number;
81
+ transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
82
+ inventory_name: string;
83
+ stock_price?: number | null | undefined;
84
+ preparation?: any;
85
+ }>;
86
+ warehouse_id: string;
87
+ created_by: {
88
+ _id: string;
89
+ name: string;
90
+ };
91
+ doc_number: string;
92
+ total_items: number;
93
+ transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
94
+ total_stock_price: number;
95
+ description?: string | null | undefined;
96
+ }>> & import("mongoose").FlatRecord<{
97
+ createdAt: NativeDate;
98
+ updatedAt: NativeDate;
99
+ } & {
100
+ _id: import("mongoose").Types.ObjectId;
101
+ createdAt: NativeDate;
102
+ updatedAt: NativeDate;
103
+ items: import("mongoose").Types.DocumentArray<{
104
+ _id: import("mongoose").Types.ObjectId;
105
+ inventory_code: string;
106
+ unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
107
+ transaction_quantity: number;
108
+ transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
109
+ inventory_name: string;
110
+ stock_price?: number | null | undefined;
111
+ preparation?: any;
112
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
113
+ _id: import("mongoose").Types.ObjectId;
114
+ inventory_code: string;
115
+ unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
116
+ transaction_quantity: number;
117
+ transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
118
+ inventory_name: string;
119
+ stock_price?: number | null | undefined;
120
+ preparation?: any;
121
+ }> & {
122
+ _id: import("mongoose").Types.ObjectId;
123
+ inventory_code: string;
124
+ unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
125
+ transaction_quantity: number;
126
+ transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
127
+ inventory_name: string;
128
+ stock_price?: number | null | undefined;
129
+ preparation?: any;
130
+ }>;
131
+ warehouse_id: string;
132
+ created_by: {
133
+ _id: string;
134
+ name: string;
135
+ };
136
+ doc_number: string;
137
+ total_items: number;
138
+ transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
139
+ total_stock_price: number;
140
+ description?: string | null | undefined;
141
+ }> & Required<{
142
+ _id: import("mongoose").Types.ObjectId;
143
+ }> & {
144
+ __v: number;
145
+ }>;
146
+ export declare const WAREHOUSE_INVENTORY_ENTRIES_COLLECTION_NAME = "warehouse_inventory_entries";
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WAREHOUSE_INVENTORY_ENTRIES_COLLECTION_NAME = exports.WarehouseInventoryEntrySchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const constants_1 = require("../../constants");
6
+ const WarehouseInventoryEntryActorSchema = new mongoose_1.Schema({
7
+ _id: {
8
+ type: String,
9
+ required: true,
10
+ },
11
+ name: {
12
+ type: String,
13
+ required: true,
14
+ default: '',
15
+ },
16
+ }, {
17
+ _id: false,
18
+ minimize: false,
19
+ });
20
+ const WarehouseInventoryEntryItemSchema = new mongoose_1.Schema({
21
+ _id: {
22
+ type: mongoose_1.Schema.Types.ObjectId,
23
+ required: true,
24
+ immutable: true,
25
+ },
26
+ inventory_code: {
27
+ type: String,
28
+ required: true,
29
+ trim: true,
30
+ },
31
+ inventory_name: {
32
+ type: String,
33
+ required: true,
34
+ },
35
+ unit: {
36
+ type: String,
37
+ enum: constants_1.ALL_INVENTORY_UNIT_TYPES,
38
+ required: true,
39
+ },
40
+ transaction_type: {
41
+ type: String,
42
+ enum: constants_1.ALL_INVENTORY_TRANSACTION_TYPES,
43
+ required: true,
44
+ },
45
+ transaction_quantity: {
46
+ type: Number,
47
+ min: 0,
48
+ required: true,
49
+ },
50
+ stock_price: {
51
+ type: Number,
52
+ min: 0,
53
+ required: false,
54
+ },
55
+ preparation: {
56
+ type: mongoose_1.Schema.Types.Mixed,
57
+ required: false,
58
+ default: null,
59
+ },
60
+ }, {
61
+ _id: false,
62
+ minimize: false,
63
+ });
64
+ exports.WarehouseInventoryEntrySchema = new mongoose_1.Schema({
65
+ _id: {
66
+ type: mongoose_1.Schema.Types.ObjectId,
67
+ required: true,
68
+ immutable: true,
69
+ },
70
+ warehouse_id: {
71
+ type: String,
72
+ required: true,
73
+ trim: true,
74
+ immutable: true,
75
+ ref: 'tenants',
76
+ },
77
+ doc_number: {
78
+ type: String,
79
+ required: true,
80
+ trim: true,
81
+ immutable: true,
82
+ },
83
+ transaction_category: {
84
+ type: String,
85
+ enum: constants_1.ALL_INVENTORY_TRANSACTION_CATEGORIES,
86
+ required: true,
87
+ immutable: true,
88
+ },
89
+ description: {
90
+ type: String,
91
+ required: false,
92
+ },
93
+ items: {
94
+ type: [WarehouseInventoryEntryItemSchema],
95
+ required: true,
96
+ default: [],
97
+ },
98
+ total_items: {
99
+ type: Number,
100
+ min: 0,
101
+ required: true,
102
+ default: 0,
103
+ },
104
+ total_stock_price: {
105
+ type: Number,
106
+ min: 0,
107
+ required: true,
108
+ default: 0,
109
+ },
110
+ created_by: {
111
+ type: WarehouseInventoryEntryActorSchema,
112
+ required: true,
113
+ },
114
+ createdAt: {
115
+ type: mongoose_1.Schema.Types.Date,
116
+ required: true,
117
+ default: () => new Date(),
118
+ immutable: true,
119
+ },
120
+ updatedAt: {
121
+ type: mongoose_1.Schema.Types.Date,
122
+ required: true,
123
+ default: () => new Date(),
124
+ },
125
+ }, {
126
+ timestamps: true,
127
+ versionKey: false,
128
+ minimize: false,
129
+ });
130
+ exports.WAREHOUSE_INVENTORY_ENTRIES_COLLECTION_NAME = 'warehouse_inventory_entries';
@@ -28,7 +28,6 @@ export * from './inventory_categories';
28
28
  export * from './inventory_department_transactions';
29
29
  export * from './inventory_department_utilities';
30
30
  export * from './inventory_departments';
31
- export * from './inventory_entries';
32
31
  export * from './inventory_transactions';
33
32
  export * from './item_transactions';
34
33
  export * from './items';
@@ -67,6 +66,7 @@ export * from './tenant_hr_shift_schedules';
67
66
  export * from './tenant_hr_shifts';
68
67
  export * from './tenant_instore_shift_sessions';
69
68
  export * from './tenant_instore_shifts';
69
+ export * from './tenant_inventory_entries';
70
70
  export * from './tenant_metadata';
71
71
  export * from './tenant_purchase_order_vendor_returns';
72
72
  export * from './tenant_purchase_orders';
@@ -86,6 +86,7 @@ export * from './warehouse_categories';
86
86
  export * from './warehouse_clients';
87
87
  export * from './warehouse_communications';
88
88
  export * from './warehouse_internal_movements';
89
+ export * from './warehouse_inventory_entries';
89
90
  export * from './warehouse_inventory_lot_serial_numbers';
90
91
  export * from './warehouse_inventory_transactions';
91
92
  export * from './warehouse_item_transactions';
@@ -44,7 +44,6 @@ __exportStar(require("./inventory_categories"), exports);
44
44
  __exportStar(require("./inventory_department_transactions"), exports);
45
45
  __exportStar(require("./inventory_department_utilities"), exports);
46
46
  __exportStar(require("./inventory_departments"), exports);
47
- __exportStar(require("./inventory_entries"), exports);
48
47
  __exportStar(require("./inventory_transactions"), exports);
49
48
  __exportStar(require("./item_transactions"), exports);
50
49
  __exportStar(require("./items"), exports);
@@ -83,6 +82,7 @@ __exportStar(require("./tenant_hr_shift_schedules"), exports);
83
82
  __exportStar(require("./tenant_hr_shifts"), exports);
84
83
  __exportStar(require("./tenant_instore_shift_sessions"), exports);
85
84
  __exportStar(require("./tenant_instore_shifts"), exports);
85
+ __exportStar(require("./tenant_inventory_entries"), exports);
86
86
  __exportStar(require("./tenant_metadata"), exports);
87
87
  __exportStar(require("./tenant_purchase_order_vendor_returns"), exports);
88
88
  __exportStar(require("./tenant_purchase_orders"), exports);
@@ -102,6 +102,7 @@ __exportStar(require("./warehouse_categories"), exports);
102
102
  __exportStar(require("./warehouse_clients"), exports);
103
103
  __exportStar(require("./warehouse_communications"), exports);
104
104
  __exportStar(require("./warehouse_internal_movements"), exports);
105
+ __exportStar(require("./warehouse_inventory_entries"), exports);
105
106
  __exportStar(require("./warehouse_inventory_lot_serial_numbers"), exports);
106
107
  __exportStar(require("./warehouse_inventory_transactions"), exports);
107
108
  __exportStar(require("./warehouse_item_transactions"), exports);
@@ -63,7 +63,6 @@ export interface IItem {
63
63
  featured_sort_id: number;
64
64
  display_price?: number | null;
65
65
  show_starting_from?: boolean;
66
- use_source_ingredients?: boolean;
67
66
  createdAt: Date;
68
67
  updatedAt: Date;
69
68
  }
@@ -0,0 +1,39 @@
1
+ import { INVENTORY_ITEM_UNIT_ENUM, INVENTORY_TRANSACTION_CATEGORY_ENUM, INVENTORY_TRANSACTION_TYPE_ENUM } from '../../constants';
2
+ export interface ITenantInventoryEntryActorRef {
3
+ _id: string;
4
+ name: string;
5
+ }
6
+ export interface ITenantInventoryEntryPreparationEntry {
7
+ usage_quantity: number;
8
+ waste_quantity: number;
9
+ unit_cost: number;
10
+ final_cost: number;
11
+ waste_cost: number;
12
+ }
13
+ export interface ITenantInventoryEntryItem {
14
+ _id: string;
15
+ inventory_code: string;
16
+ inventory_name: string;
17
+ unit: INVENTORY_ITEM_UNIT_ENUM;
18
+ transaction_type: INVENTORY_TRANSACTION_TYPE_ENUM;
19
+ transaction_quantity: number;
20
+ stock_price?: number;
21
+ preparation?: Record<string, ITenantInventoryEntryPreparationEntry> | null;
22
+ }
23
+ export interface ITenantInventoryEntry {
24
+ _id: string;
25
+ tenant_id: string;
26
+ /**
27
+ * Set only for department utility operations — null for the tenant's kitchen utility.
28
+ */
29
+ department_code?: string | null;
30
+ doc_number: string;
31
+ transaction_category: INVENTORY_TRANSACTION_CATEGORY_ENUM;
32
+ description?: string | null;
33
+ items: ITenantInventoryEntryItem[];
34
+ total_items: number;
35
+ total_stock_price: number;
36
+ created_by: ITenantInventoryEntryActorRef;
37
+ createdAt: Date;
38
+ updatedAt: Date;
39
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,35 @@
1
+ import { INVENTORY_ITEM_UNIT_ENUM, INVENTORY_TRANSACTION_CATEGORY_ENUM, INVENTORY_TRANSACTION_TYPE_ENUM } from '../../constants';
2
+ export interface IWarehouseInventoryEntryActorRef {
3
+ _id: string;
4
+ name: string;
5
+ }
6
+ export interface IWarehouseInventoryEntryPreparationEntry {
7
+ usage_quantity: number;
8
+ waste_quantity: number;
9
+ unit_cost: number;
10
+ final_cost: number;
11
+ waste_cost: number;
12
+ }
13
+ export interface IWarehouseInventoryEntryItem {
14
+ _id: string;
15
+ inventory_code: string;
16
+ inventory_name: string;
17
+ unit: INVENTORY_ITEM_UNIT_ENUM;
18
+ transaction_type: INVENTORY_TRANSACTION_TYPE_ENUM;
19
+ transaction_quantity: number;
20
+ stock_price?: number;
21
+ preparation?: Record<string, IWarehouseInventoryEntryPreparationEntry> | null;
22
+ }
23
+ export interface IWarehouseInventoryEntry {
24
+ _id: string;
25
+ warehouse_id: string;
26
+ doc_number: string;
27
+ transaction_category: INVENTORY_TRANSACTION_CATEGORY_ENUM;
28
+ description?: string | null;
29
+ items: IWarehouseInventoryEntryItem[];
30
+ total_items: number;
31
+ total_stock_price: number;
32
+ created_by: IWarehouseInventoryEntryActorRef;
33
+ createdAt: Date;
34
+ updatedAt: Date;
35
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -742,7 +742,6 @@ function makeCatalogItem(id, overrides = {}) {
742
742
  item_special_hours: null,
743
743
  display_price: null,
744
744
  show_starting_from: false,
745
- use_source_ingredients: false,
746
745
  is_featured: false,
747
746
  featured_sort_id: 0,
748
747
  createdAt: new Date('2024-01-01'),
@@ -56,7 +56,6 @@ function makeItem(id, overrides = {}) {
56
56
  item_special_hours: null,
57
57
  display_price: null,
58
58
  show_starting_from: false,
59
- use_source_ingredients: false,
60
59
  is_featured: false,
61
60
  featured_sort_id: 0,
62
61
  createdAt: new Date('2024-01-01'),
@@ -30,7 +30,6 @@ function makeItem(id, overrides = {}) {
30
30
  item_special_hours: null,
31
31
  display_price: null,
32
32
  show_starting_from: false,
33
- use_source_ingredients: false,
34
33
  createdAt: new Date('2024-01-01'),
35
34
  updatedAt: new Date('2024-01-02'),
36
35
  modifiers: null,
@@ -34,7 +34,6 @@ function makeItem(id, overrides = {}) {
34
34
  item_special_hours: null,
35
35
  display_price: null,
36
36
  show_starting_from: false,
37
- use_source_ingredients: false,
38
37
  is_featured: false,
39
38
  featured_sort_id: 0,
40
39
  createdAt: new Date('2024-01-01'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managesome/eposmatic-toolkit",
3
- "version": "0.2.733",
3
+ "version": "0.2.735",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",