@managesome/eposmatic-toolkit 0.2.520 → 0.2.523
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/schemas/models/index.d.ts +3 -0
- package/lib/schemas/models/index.js +3 -0
- package/lib/schemas/models/inventories.d.ts +9 -0
- package/lib/schemas/models/inventory_department_transactions.d.ts +86 -0
- package/lib/schemas/models/inventory_department_transactions.js +116 -0
- package/lib/schemas/models/inventory_department_utilities.d.ts +108 -0
- package/lib/schemas/models/inventory_department_utilities.js +88 -0
- package/lib/schemas/models/inventory_departments.d.ts +53 -0
- package/lib/schemas/models/inventory_departments.js +58 -0
- package/lib/schemas/models/inventory_transactions.d.ts +3 -0
- package/lib/schemas/models/inventory_transactions.js +5 -0
- package/lib/schemas/models/items.d.ts +93 -0
- package/lib/schemas/models/items.js +5 -0
- package/lib/schemas/models/tenant_inventory_department_transactions.d.ts +86 -0
- package/lib/schemas/models/tenant_inventory_department_transactions.js +116 -0
- package/lib/schemas/models/tenant_inventory_department_utilities.d.ts +108 -0
- package/lib/schemas/models/tenant_inventory_department_utilities.js +88 -0
- package/lib/schemas/models/tenant_inventory_departments.d.ts +53 -0
- package/lib/schemas/models/tenant_inventory_departments.js +58 -0
- package/lib/schemas/models/warehouse_items.d.ts +9 -0
- package/lib/schemas/types/common.d.ts +1 -0
- package/lib/schemas/types/index.d.ts +3 -0
- package/lib/schemas/types/index.js +3 -0
- package/lib/schemas/types/inventory_department_transactions.d.ts +24 -0
- package/lib/schemas/types/inventory_department_transactions.js +2 -0
- package/lib/schemas/types/inventory_department_utilities.d.ts +50 -0
- package/lib/schemas/types/inventory_department_utilities.js +2 -0
- package/lib/schemas/types/inventory_departments.d.ts +12 -0
- package/lib/schemas/types/inventory_departments.js +2 -0
- package/lib/schemas/types/inventory_transactions.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TENANT_INVENTORY_DEPARTMENT_TRANSACTIONS_COLLECTION_NAME = exports.TenantInventoryDepartmentTransactionsSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
exports.TenantInventoryDepartmentTransactionsSchema = new mongoose_1.Schema({
|
|
7
|
+
_id: {
|
|
8
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
9
|
+
required: true,
|
|
10
|
+
immutable: true,
|
|
11
|
+
},
|
|
12
|
+
tenant_id: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: true,
|
|
15
|
+
immutable: true,
|
|
16
|
+
ref: 'tenants',
|
|
17
|
+
},
|
|
18
|
+
department_code: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: true,
|
|
21
|
+
immutable: true,
|
|
22
|
+
ref: 'tenant_inventory_departments',
|
|
23
|
+
},
|
|
24
|
+
inventory_code: {
|
|
25
|
+
type: String,
|
|
26
|
+
required: true,
|
|
27
|
+
immutable: true,
|
|
28
|
+
ref: 'tenant_inventory_department_utilities',
|
|
29
|
+
},
|
|
30
|
+
transaction_quantity: {
|
|
31
|
+
type: Number,
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
previous_quantity_left: {
|
|
35
|
+
type: Number,
|
|
36
|
+
required: true,
|
|
37
|
+
},
|
|
38
|
+
quantity_left: {
|
|
39
|
+
type: Number,
|
|
40
|
+
required: true,
|
|
41
|
+
},
|
|
42
|
+
previous_unit_price: {
|
|
43
|
+
type: Number,
|
|
44
|
+
required: true,
|
|
45
|
+
},
|
|
46
|
+
unit_price: {
|
|
47
|
+
type: Number,
|
|
48
|
+
required: true,
|
|
49
|
+
},
|
|
50
|
+
remaining_stock_price: {
|
|
51
|
+
type: Number,
|
|
52
|
+
default: 0,
|
|
53
|
+
},
|
|
54
|
+
previous_remaining_stock_price: {
|
|
55
|
+
type: Number,
|
|
56
|
+
default: 0,
|
|
57
|
+
},
|
|
58
|
+
transaction_type: {
|
|
59
|
+
type: String,
|
|
60
|
+
required: true,
|
|
61
|
+
enum: constants_1.ALL_INVENTORY_TRANSACTION_TYPES,
|
|
62
|
+
},
|
|
63
|
+
transaction_category: {
|
|
64
|
+
type: String,
|
|
65
|
+
required: true,
|
|
66
|
+
enum: constants_1.ALL_INVENTORY_TRANSACTION_CATEGORIES,
|
|
67
|
+
immutable: true,
|
|
68
|
+
},
|
|
69
|
+
stock_price: {
|
|
70
|
+
type: Number,
|
|
71
|
+
required: false,
|
|
72
|
+
},
|
|
73
|
+
stock_expiry_date: {
|
|
74
|
+
type: mongoose_1.Schema.Types.Date,
|
|
75
|
+
required: false,
|
|
76
|
+
},
|
|
77
|
+
order_id: {
|
|
78
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
79
|
+
required: false,
|
|
80
|
+
immutable: true,
|
|
81
|
+
},
|
|
82
|
+
order_number: {
|
|
83
|
+
type: Number,
|
|
84
|
+
required: false,
|
|
85
|
+
immutable: true,
|
|
86
|
+
},
|
|
87
|
+
description: {
|
|
88
|
+
type: String,
|
|
89
|
+
required: false,
|
|
90
|
+
},
|
|
91
|
+
createdAt_mins: {
|
|
92
|
+
type: Number,
|
|
93
|
+
required: true,
|
|
94
|
+
immutable: true,
|
|
95
|
+
default: () => {
|
|
96
|
+
const date = new Date();
|
|
97
|
+
return Math.floor(date.getHours() * 60 + date.getMinutes());
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
createdAt: {
|
|
101
|
+
type: mongoose_1.Schema.Types.Date,
|
|
102
|
+
required: true,
|
|
103
|
+
default: () => new Date(),
|
|
104
|
+
immutable: true,
|
|
105
|
+
},
|
|
106
|
+
updatedAt: {
|
|
107
|
+
type: mongoose_1.Schema.Types.Date,
|
|
108
|
+
required: true,
|
|
109
|
+
default: () => new Date(),
|
|
110
|
+
},
|
|
111
|
+
}, {
|
|
112
|
+
timestamps: true,
|
|
113
|
+
versionKey: false,
|
|
114
|
+
minimize: false,
|
|
115
|
+
});
|
|
116
|
+
exports.TENANT_INVENTORY_DEPARTMENT_TRANSACTIONS_COLLECTION_NAME = 'tenant_inventory_department_transactions';
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
import { INVENTORY_ITEM_TYPE_ENUM } from '../../constants';
|
|
3
|
+
export declare const TenantInventoryDepartmentUtilitySchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
4
|
+
timestamps: true;
|
|
5
|
+
versionKey: false;
|
|
6
|
+
minimize: false;
|
|
7
|
+
}, {
|
|
8
|
+
createdAt: NativeDate;
|
|
9
|
+
updatedAt: NativeDate;
|
|
10
|
+
} & {
|
|
11
|
+
code: string;
|
|
12
|
+
_id: import("mongoose").Types.ObjectId;
|
|
13
|
+
type: INVENTORY_ITEM_TYPE_ENUM;
|
|
14
|
+
name: string;
|
|
15
|
+
tenant_id: string;
|
|
16
|
+
createdAt: NativeDate;
|
|
17
|
+
updatedAt: NativeDate;
|
|
18
|
+
image_url: string;
|
|
19
|
+
active: boolean;
|
|
20
|
+
department_code: string;
|
|
21
|
+
unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
|
|
22
|
+
threshold_quantity: number;
|
|
23
|
+
quantity_left: number;
|
|
24
|
+
unit_price: number;
|
|
25
|
+
remaining_stock_price: number;
|
|
26
|
+
ingredients?: import("mongoose").Types.DocumentArray<{
|
|
27
|
+
inventory_code: string;
|
|
28
|
+
usage_quantity: number;
|
|
29
|
+
department_code?: string | null | undefined;
|
|
30
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
31
|
+
inventory_code: string;
|
|
32
|
+
usage_quantity: number;
|
|
33
|
+
department_code?: string | null | undefined;
|
|
34
|
+
}> & {
|
|
35
|
+
inventory_code: string;
|
|
36
|
+
usage_quantity: number;
|
|
37
|
+
department_code?: string | null | undefined;
|
|
38
|
+
}> | null | undefined;
|
|
39
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
40
|
+
createdAt: NativeDate;
|
|
41
|
+
updatedAt: NativeDate;
|
|
42
|
+
} & {
|
|
43
|
+
code: string;
|
|
44
|
+
_id: import("mongoose").Types.ObjectId;
|
|
45
|
+
type: INVENTORY_ITEM_TYPE_ENUM;
|
|
46
|
+
name: string;
|
|
47
|
+
tenant_id: string;
|
|
48
|
+
createdAt: NativeDate;
|
|
49
|
+
updatedAt: NativeDate;
|
|
50
|
+
image_url: string;
|
|
51
|
+
active: boolean;
|
|
52
|
+
department_code: string;
|
|
53
|
+
unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
|
|
54
|
+
threshold_quantity: number;
|
|
55
|
+
quantity_left: number;
|
|
56
|
+
unit_price: number;
|
|
57
|
+
remaining_stock_price: number;
|
|
58
|
+
ingredients?: import("mongoose").Types.DocumentArray<{
|
|
59
|
+
inventory_code: string;
|
|
60
|
+
usage_quantity: number;
|
|
61
|
+
department_code?: string | null | undefined;
|
|
62
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
63
|
+
inventory_code: string;
|
|
64
|
+
usage_quantity: number;
|
|
65
|
+
department_code?: string | null | undefined;
|
|
66
|
+
}> & {
|
|
67
|
+
inventory_code: string;
|
|
68
|
+
usage_quantity: number;
|
|
69
|
+
department_code?: string | null | undefined;
|
|
70
|
+
}> | null | undefined;
|
|
71
|
+
}>> & import("mongoose").FlatRecord<{
|
|
72
|
+
createdAt: NativeDate;
|
|
73
|
+
updatedAt: NativeDate;
|
|
74
|
+
} & {
|
|
75
|
+
code: string;
|
|
76
|
+
_id: import("mongoose").Types.ObjectId;
|
|
77
|
+
type: INVENTORY_ITEM_TYPE_ENUM;
|
|
78
|
+
name: string;
|
|
79
|
+
tenant_id: string;
|
|
80
|
+
createdAt: NativeDate;
|
|
81
|
+
updatedAt: NativeDate;
|
|
82
|
+
image_url: string;
|
|
83
|
+
active: boolean;
|
|
84
|
+
department_code: string;
|
|
85
|
+
unit: import("../../constants").INVENTORY_ITEM_UNIT_ENUM;
|
|
86
|
+
threshold_quantity: number;
|
|
87
|
+
quantity_left: number;
|
|
88
|
+
unit_price: number;
|
|
89
|
+
remaining_stock_price: number;
|
|
90
|
+
ingredients?: import("mongoose").Types.DocumentArray<{
|
|
91
|
+
inventory_code: string;
|
|
92
|
+
usage_quantity: number;
|
|
93
|
+
department_code?: string | null | undefined;
|
|
94
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
95
|
+
inventory_code: string;
|
|
96
|
+
usage_quantity: number;
|
|
97
|
+
department_code?: string | null | undefined;
|
|
98
|
+
}> & {
|
|
99
|
+
inventory_code: string;
|
|
100
|
+
usage_quantity: number;
|
|
101
|
+
department_code?: string | null | undefined;
|
|
102
|
+
}> | null | undefined;
|
|
103
|
+
}> & Required<{
|
|
104
|
+
_id: import("mongoose").Types.ObjectId;
|
|
105
|
+
}> & {
|
|
106
|
+
__v: number;
|
|
107
|
+
}>;
|
|
108
|
+
export declare const TENANT_INVENTORY_DEPARTMENT_UTILITIES_COLLECTION_NAME = "tenant_inventory_department_utilities";
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TENANT_INVENTORY_DEPARTMENT_UTILITIES_COLLECTION_NAME = exports.TenantInventoryDepartmentUtilitySchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const items_1 = require("./items");
|
|
7
|
+
exports.TenantInventoryDepartmentUtilitySchema = new mongoose_1.Schema({
|
|
8
|
+
_id: {
|
|
9
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
10
|
+
required: true,
|
|
11
|
+
immutable: true,
|
|
12
|
+
},
|
|
13
|
+
code: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true,
|
|
16
|
+
immutable: true,
|
|
17
|
+
},
|
|
18
|
+
tenant_id: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: true,
|
|
21
|
+
immutable: true,
|
|
22
|
+
ref: 'tenants',
|
|
23
|
+
},
|
|
24
|
+
department_code: {
|
|
25
|
+
type: String,
|
|
26
|
+
required: true,
|
|
27
|
+
immutable: true,
|
|
28
|
+
ref: 'tenant_inventory_departments',
|
|
29
|
+
},
|
|
30
|
+
name: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
unit: {
|
|
35
|
+
type: String,
|
|
36
|
+
enum: constants_1.ALL_INVENTORY_UNIT_TYPES,
|
|
37
|
+
required: true,
|
|
38
|
+
},
|
|
39
|
+
threshold_quantity: {
|
|
40
|
+
type: Number,
|
|
41
|
+
default: 0,
|
|
42
|
+
},
|
|
43
|
+
quantity_left: {
|
|
44
|
+
type: Number,
|
|
45
|
+
default: 0,
|
|
46
|
+
},
|
|
47
|
+
unit_price: {
|
|
48
|
+
type: Number,
|
|
49
|
+
default: 0,
|
|
50
|
+
},
|
|
51
|
+
remaining_stock_price: {
|
|
52
|
+
type: Number,
|
|
53
|
+
default: 0,
|
|
54
|
+
},
|
|
55
|
+
type: {
|
|
56
|
+
type: String,
|
|
57
|
+
enum: constants_1.ALL_INVENTORY_ITEM_TYPES,
|
|
58
|
+
default: constants_1.INVENTORY_ITEM_TYPE_ENUM.BASE_ITEM,
|
|
59
|
+
},
|
|
60
|
+
ingredients: {
|
|
61
|
+
type: [items_1.IngredientSchema],
|
|
62
|
+
required: false,
|
|
63
|
+
},
|
|
64
|
+
image_url: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: null,
|
|
67
|
+
},
|
|
68
|
+
active: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
required: true,
|
|
71
|
+
},
|
|
72
|
+
createdAt: {
|
|
73
|
+
type: mongoose_1.Schema.Types.Date,
|
|
74
|
+
required: true,
|
|
75
|
+
default: () => new Date(),
|
|
76
|
+
immutable: true,
|
|
77
|
+
},
|
|
78
|
+
updatedAt: {
|
|
79
|
+
type: mongoose_1.Schema.Types.Date,
|
|
80
|
+
required: true,
|
|
81
|
+
default: () => new Date(),
|
|
82
|
+
},
|
|
83
|
+
}, {
|
|
84
|
+
timestamps: true,
|
|
85
|
+
versionKey: false,
|
|
86
|
+
minimize: false,
|
|
87
|
+
});
|
|
88
|
+
exports.TENANT_INVENTORY_DEPARTMENT_UTILITIES_COLLECTION_NAME = 'tenant_inventory_department_utilities';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
export declare const TenantInventoryDepartmentSchema: 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
|
+
name: string;
|
|
12
|
+
tenant_id: string;
|
|
13
|
+
createdAt: NativeDate;
|
|
14
|
+
updatedAt: NativeDate;
|
|
15
|
+
image_url: string;
|
|
16
|
+
subtitle: string;
|
|
17
|
+
active: boolean;
|
|
18
|
+
sort_id: number;
|
|
19
|
+
department_code: string;
|
|
20
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
21
|
+
createdAt: NativeDate;
|
|
22
|
+
updatedAt: NativeDate;
|
|
23
|
+
} & {
|
|
24
|
+
_id: import("mongoose").Types.ObjectId;
|
|
25
|
+
name: string;
|
|
26
|
+
tenant_id: string;
|
|
27
|
+
createdAt: NativeDate;
|
|
28
|
+
updatedAt: NativeDate;
|
|
29
|
+
image_url: string;
|
|
30
|
+
subtitle: string;
|
|
31
|
+
active: boolean;
|
|
32
|
+
sort_id: number;
|
|
33
|
+
department_code: string;
|
|
34
|
+
}>> & import("mongoose").FlatRecord<{
|
|
35
|
+
createdAt: NativeDate;
|
|
36
|
+
updatedAt: NativeDate;
|
|
37
|
+
} & {
|
|
38
|
+
_id: import("mongoose").Types.ObjectId;
|
|
39
|
+
name: string;
|
|
40
|
+
tenant_id: string;
|
|
41
|
+
createdAt: NativeDate;
|
|
42
|
+
updatedAt: NativeDate;
|
|
43
|
+
image_url: string;
|
|
44
|
+
subtitle: string;
|
|
45
|
+
active: boolean;
|
|
46
|
+
sort_id: number;
|
|
47
|
+
department_code: string;
|
|
48
|
+
}> & Required<{
|
|
49
|
+
_id: import("mongoose").Types.ObjectId;
|
|
50
|
+
}> & {
|
|
51
|
+
__v: number;
|
|
52
|
+
}>;
|
|
53
|
+
export declare const TENANT_INVENTORY_DEPARTMENTS_COLLECTION_NAME = "tenant_inventory_departments";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TENANT_INVENTORY_DEPARTMENTS_COLLECTION_NAME = exports.TenantInventoryDepartmentSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
exports.TenantInventoryDepartmentSchema = new mongoose_1.Schema({
|
|
6
|
+
_id: {
|
|
7
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
8
|
+
required: true,
|
|
9
|
+
immutable: true,
|
|
10
|
+
},
|
|
11
|
+
tenant_id: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true,
|
|
14
|
+
immutable: true,
|
|
15
|
+
ref: 'tenants',
|
|
16
|
+
},
|
|
17
|
+
department_code: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true,
|
|
20
|
+
immutable: true,
|
|
21
|
+
},
|
|
22
|
+
name: {
|
|
23
|
+
type: String,
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
subtitle: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: '',
|
|
29
|
+
},
|
|
30
|
+
active: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
sort_id: {
|
|
35
|
+
type: Number,
|
|
36
|
+
required: true,
|
|
37
|
+
},
|
|
38
|
+
image_url: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: null,
|
|
41
|
+
},
|
|
42
|
+
createdAt: {
|
|
43
|
+
type: mongoose_1.Schema.Types.Date,
|
|
44
|
+
required: true,
|
|
45
|
+
default: () => new Date(),
|
|
46
|
+
immutable: true,
|
|
47
|
+
},
|
|
48
|
+
updatedAt: {
|
|
49
|
+
type: mongoose_1.Schema.Types.Date,
|
|
50
|
+
required: true,
|
|
51
|
+
default: () => new Date(),
|
|
52
|
+
},
|
|
53
|
+
}, {
|
|
54
|
+
timestamps: true,
|
|
55
|
+
versionKey: false,
|
|
56
|
+
minimize: false,
|
|
57
|
+
});
|
|
58
|
+
exports.TENANT_INVENTORY_DEPARTMENTS_COLLECTION_NAME = 'tenant_inventory_departments';
|
|
@@ -23,12 +23,15 @@ export declare const WarehouseItemSchema: Schema<any, import("mongoose").Model<a
|
|
|
23
23
|
ingredients: import("mongoose").Types.DocumentArray<{
|
|
24
24
|
inventory_code: string;
|
|
25
25
|
usage_quantity: number;
|
|
26
|
+
department_code?: string | null | undefined;
|
|
26
27
|
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
27
28
|
inventory_code: string;
|
|
28
29
|
usage_quantity: number;
|
|
30
|
+
department_code?: string | null | undefined;
|
|
29
31
|
}> & {
|
|
30
32
|
inventory_code: string;
|
|
31
33
|
usage_quantity: number;
|
|
34
|
+
department_code?: string | null | undefined;
|
|
32
35
|
}>;
|
|
33
36
|
hide_name: boolean;
|
|
34
37
|
keywords: string[];
|
|
@@ -69,12 +72,15 @@ export declare const WarehouseItemSchema: Schema<any, import("mongoose").Model<a
|
|
|
69
72
|
ingredients: import("mongoose").Types.DocumentArray<{
|
|
70
73
|
inventory_code: string;
|
|
71
74
|
usage_quantity: number;
|
|
75
|
+
department_code?: string | null | undefined;
|
|
72
76
|
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
73
77
|
inventory_code: string;
|
|
74
78
|
usage_quantity: number;
|
|
79
|
+
department_code?: string | null | undefined;
|
|
75
80
|
}> & {
|
|
76
81
|
inventory_code: string;
|
|
77
82
|
usage_quantity: number;
|
|
83
|
+
department_code?: string | null | undefined;
|
|
78
84
|
}>;
|
|
79
85
|
hide_name: boolean;
|
|
80
86
|
keywords: string[];
|
|
@@ -115,12 +121,15 @@ export declare const WarehouseItemSchema: Schema<any, import("mongoose").Model<a
|
|
|
115
121
|
ingredients: import("mongoose").Types.DocumentArray<{
|
|
116
122
|
inventory_code: string;
|
|
117
123
|
usage_quantity: number;
|
|
124
|
+
department_code?: string | null | undefined;
|
|
118
125
|
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
119
126
|
inventory_code: string;
|
|
120
127
|
usage_quantity: number;
|
|
128
|
+
department_code?: string | null | undefined;
|
|
121
129
|
}> & {
|
|
122
130
|
inventory_code: string;
|
|
123
131
|
usage_quantity: number;
|
|
132
|
+
department_code?: string | null | undefined;
|
|
124
133
|
}>;
|
|
125
134
|
hide_name: boolean;
|
|
126
135
|
keywords: string[];
|
|
@@ -31,6 +31,9 @@ export * from './internal_operational_roles';
|
|
|
31
31
|
export * from './internal_staffs';
|
|
32
32
|
export * from './inventories';
|
|
33
33
|
export * from './inventory_categories';
|
|
34
|
+
export * from './inventory_department_transactions';
|
|
35
|
+
export * from './inventory_department_utilities';
|
|
36
|
+
export * from './inventory_departments';
|
|
34
37
|
export * from './inventory_transactions';
|
|
35
38
|
export * from './item_transactions';
|
|
36
39
|
export * from './items';
|
|
@@ -47,6 +47,9 @@ __exportStar(require("./internal_operational_roles"), exports);
|
|
|
47
47
|
__exportStar(require("./internal_staffs"), exports);
|
|
48
48
|
__exportStar(require("./inventories"), exports);
|
|
49
49
|
__exportStar(require("./inventory_categories"), exports);
|
|
50
|
+
__exportStar(require("./inventory_department_transactions"), exports);
|
|
51
|
+
__exportStar(require("./inventory_department_utilities"), exports);
|
|
52
|
+
__exportStar(require("./inventory_departments"), exports);
|
|
50
53
|
__exportStar(require("./inventory_transactions"), exports);
|
|
51
54
|
__exportStar(require("./item_transactions"), exports);
|
|
52
55
|
__exportStar(require("./items"), exports);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { INVENTORY_TRANSACTION_CATEGORY_ENUM, INVENTORY_TRANSACTION_TYPE_ENUM } from '../../constants';
|
|
2
|
+
export interface IInventoryDepartmentTransaction {
|
|
3
|
+
_id: string;
|
|
4
|
+
tenant_id: string;
|
|
5
|
+
department_code: string;
|
|
6
|
+
inventory_code: string;
|
|
7
|
+
transaction_quantity: number;
|
|
8
|
+
previous_quantity_left: number;
|
|
9
|
+
quantity_left: number;
|
|
10
|
+
previous_unit_price: number;
|
|
11
|
+
unit_price: number;
|
|
12
|
+
remaining_stock_price: number;
|
|
13
|
+
previous_remaining_stock_price: number;
|
|
14
|
+
transaction_type: INVENTORY_TRANSACTION_TYPE_ENUM;
|
|
15
|
+
transaction_category: INVENTORY_TRANSACTION_CATEGORY_ENUM;
|
|
16
|
+
stock_price?: number;
|
|
17
|
+
stock_expiry_date?: Date | null;
|
|
18
|
+
order_id?: string;
|
|
19
|
+
order_number?: number | null;
|
|
20
|
+
description?: string;
|
|
21
|
+
createdAt_mins: number;
|
|
22
|
+
createdAt: Date;
|
|
23
|
+
updatedAt: Date;
|
|
24
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { INVENTORY_ITEM_TYPE_ENUM, INVENTORY_ITEM_UNIT_ENUM } from '../../constants';
|
|
2
|
+
import { IIngredient } from './common';
|
|
3
|
+
export interface IInventoryDepartmentUtility {
|
|
4
|
+
_id: string;
|
|
5
|
+
code: string;
|
|
6
|
+
tenant_id: string;
|
|
7
|
+
department_code: string;
|
|
8
|
+
name: string;
|
|
9
|
+
unit: INVENTORY_ITEM_UNIT_ENUM;
|
|
10
|
+
threshold_quantity: number;
|
|
11
|
+
quantity_left: number;
|
|
12
|
+
unit_price: number;
|
|
13
|
+
remaining_stock_price: number;
|
|
14
|
+
type: INVENTORY_ITEM_TYPE_ENUM;
|
|
15
|
+
ingredients?: IIngredient[] | null;
|
|
16
|
+
image_url: string | null;
|
|
17
|
+
active: boolean;
|
|
18
|
+
createdAt: Date;
|
|
19
|
+
updatedAt: Date;
|
|
20
|
+
}
|
|
21
|
+
export interface IKitchenInventoryDepartment {
|
|
22
|
+
_id: string;
|
|
23
|
+
code: string;
|
|
24
|
+
tenant_id: string;
|
|
25
|
+
department_code: string;
|
|
26
|
+
name: string;
|
|
27
|
+
unit: INVENTORY_ITEM_UNIT_ENUM;
|
|
28
|
+
threshold_quantity: number;
|
|
29
|
+
quantity_left: number;
|
|
30
|
+
unit_price: number;
|
|
31
|
+
remaining_stock_price: number;
|
|
32
|
+
type: INVENTORY_ITEM_TYPE_ENUM;
|
|
33
|
+
ingredients?: IIngredient[] | null;
|
|
34
|
+
image_url: string | null;
|
|
35
|
+
active: boolean;
|
|
36
|
+
createdAt: Date;
|
|
37
|
+
updatedAt: Date;
|
|
38
|
+
previous_quantity_left: number;
|
|
39
|
+
previous_unit_price: number;
|
|
40
|
+
previous_remaining_stock_price: number;
|
|
41
|
+
quantity_added: number;
|
|
42
|
+
quantity_consumed: number;
|
|
43
|
+
quantity_wasted: number;
|
|
44
|
+
quantity_short: number;
|
|
45
|
+
variance_quantity: number;
|
|
46
|
+
transfer_quantity: number;
|
|
47
|
+
return_quantity: number;
|
|
48
|
+
total_transactions: number;
|
|
49
|
+
new_stock_price: number;
|
|
50
|
+
}
|
|
@@ -2,6 +2,7 @@ import { INVENTORY_TRANSACTION_CATEGORY_ENUM, INVENTORY_TRANSACTION_TYPE_ENUM }
|
|
|
2
2
|
export interface IInventoryTransaction {
|
|
3
3
|
_id: string;
|
|
4
4
|
tenant_id: string;
|
|
5
|
+
department_code?: string | null;
|
|
5
6
|
inventory_code: string;
|
|
6
7
|
transaction_quantity: number;
|
|
7
8
|
previous_quantity_left: number;
|