@managesome/eposmatic-toolkit 0.2.734 → 0.2.736

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
  };
@@ -24,6 +24,7 @@ export * from './image-url-helpers';
24
24
  export * from './ingredients';
25
25
  export * from './internal-amount-helpers';
26
26
  export * from './inventory';
27
+ export * from './inventory_entries';
27
28
  export * from './inventory_transactions';
28
29
  export * from './item-report-helpers';
29
30
  export * from './items-comparison-report-helpers';
@@ -40,6 +40,7 @@ __exportStar(require("./image-url-helpers"), exports);
40
40
  __exportStar(require("./ingredients"), exports);
41
41
  __exportStar(require("./internal-amount-helpers"), exports);
42
42
  __exportStar(require("./inventory"), exports);
43
+ __exportStar(require("./inventory_entries"), exports);
43
44
  __exportStar(require("./inventory_transactions"), exports);
44
45
  __exportStar(require("./item-report-helpers"), exports);
45
46
  __exportStar(require("./items-comparison-report-helpers"), exports);
@@ -0,0 +1,27 @@
1
+ import { ITenantInventoryEntry, IWarehouseInventoryEntry, IWarehouseInventoryEntryItem } from '../../schemas';
2
+ /**
3
+ * Convert every quantity and money field on every inventory entry item.
4
+ */
5
+ export declare function getInventoryEntryItemsWithPrice(items: IWarehouseInventoryEntryItem[] | undefined, convertToPrice: (price: number) => number): IWarehouseInventoryEntryItem[];
6
+ /**
7
+ * Convert every quantity and money field on a warehouse inventory entry.
8
+ *
9
+ * - `writeable = true` -> decimal -> int domain (before sending to backend)
10
+ * - `writeable = false` -> int domain -> decimal (after receiving from backend)
11
+ */
12
+ export declare function getWarehouseInventoryEntryWithPrice<T extends Partial<IWarehouseInventoryEntry> | IWarehouseInventoryEntry>(entry: T, writeable?: boolean): T;
13
+ /**
14
+ * Convert every warehouse inventory entry in a list.
15
+ */
16
+ export declare function getWarehouseInventoryEntriesWithPrice(entries: IWarehouseInventoryEntry[] | undefined, writeable?: boolean): IWarehouseInventoryEntry[];
17
+ /**
18
+ * Convert every quantity and money field on a tenant inventory entry.
19
+ *
20
+ * - `writeable = true` -> decimal -> int domain (before sending to backend)
21
+ * - `writeable = false` -> int domain -> decimal (after receiving from backend)
22
+ */
23
+ export declare function getTenantInventoryEntryWithPrice<T extends Partial<ITenantInventoryEntry> | ITenantInventoryEntry>(entry: T, writeable?: boolean): T;
24
+ /**
25
+ * Convert every tenant inventory entry in a list.
26
+ */
27
+ export declare function getTenantInventoryEntriesWithPrice(entries: ITenantInventoryEntry[] | undefined, writeable?: boolean): ITenantInventoryEntry[];
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getInventoryEntryItemsWithPrice = getInventoryEntryItemsWithPrice;
4
+ exports.getWarehouseInventoryEntryWithPrice = getWarehouseInventoryEntryWithPrice;
5
+ exports.getWarehouseInventoryEntriesWithPrice = getWarehouseInventoryEntriesWithPrice;
6
+ exports.getTenantInventoryEntryWithPrice = getTenantInventoryEntryWithPrice;
7
+ exports.getTenantInventoryEntriesWithPrice = getTenantInventoryEntriesWithPrice;
8
+ const price_conversion_1 = require("./price-conversion");
9
+ /*
10
+ * Warehouse and tenant entries live in separate collections with duplicated item types, but the
11
+ * item payload is field-for-field identical, so the item / preparation converters are written
12
+ * once against the warehouse item shape - the two shapes are mutually assignable, so no cast is
13
+ * needed to use them from the tenant entry function.
14
+ *
15
+ * Every quantity and money value inside an entry is stored in the int domain (x100000).
16
+ */
17
+ /**
18
+ * Convert the quantities and costs on a batch ingredient map.
19
+ */
20
+ function getPreparationWithPrice(preparation, convertToPrice) {
21
+ const converted = {};
22
+ for (const [key, value] of Object.entries(preparation)) {
23
+ converted[key] = {
24
+ ...value,
25
+ usage_quantity: convertToPrice(value.usage_quantity),
26
+ waste_quantity: convertToPrice(value.waste_quantity),
27
+ unit_cost: convertToPrice(value.unit_cost),
28
+ final_cost: convertToPrice(value.final_cost),
29
+ waste_cost: convertToPrice(value.waste_cost),
30
+ };
31
+ }
32
+ return converted;
33
+ }
34
+ /**
35
+ * Convert every quantity and money field on every inventory entry item.
36
+ */
37
+ function getInventoryEntryItemsWithPrice(items, convertToPrice) {
38
+ if (!items)
39
+ return [];
40
+ return items.map((item) => ({
41
+ ...item,
42
+ transaction_quantity: convertToPrice(item.transaction_quantity),
43
+ stock_price: item.stock_price != null ? convertToPrice(item.stock_price) : undefined,
44
+ ...(item.preparation != null ? { preparation: getPreparationWithPrice(item.preparation, convertToPrice) } : {}),
45
+ }));
46
+ }
47
+ /**
48
+ * Convert every quantity and money field on a warehouse inventory entry.
49
+ *
50
+ * - `writeable = true` -> decimal -> int domain (before sending to backend)
51
+ * - `writeable = false` -> int domain -> decimal (after receiving from backend)
52
+ */
53
+ function getWarehouseInventoryEntryWithPrice(entry, writeable) {
54
+ const convertToPrice = writeable ? price_conversion_1.convertDecimalToInt : price_conversion_1.convertIntToDecimal;
55
+ return {
56
+ ...entry,
57
+ ...(entry.items != null
58
+ ? {
59
+ items: getInventoryEntryItemsWithPrice(entry.items, convertToPrice),
60
+ }
61
+ : {}),
62
+ ...(entry.total_stock_price != null ? { total_stock_price: convertToPrice(entry.total_stock_price) } : {}),
63
+ };
64
+ }
65
+ /**
66
+ * Convert every warehouse inventory entry in a list.
67
+ */
68
+ function getWarehouseInventoryEntriesWithPrice(entries, writeable) {
69
+ if (!entries)
70
+ return [];
71
+ return entries.map((entry) => getWarehouseInventoryEntryWithPrice(entry, writeable));
72
+ }
73
+ /**
74
+ * Convert every quantity and money field on a tenant inventory entry.
75
+ *
76
+ * - `writeable = true` -> decimal -> int domain (before sending to backend)
77
+ * - `writeable = false` -> int domain -> decimal (after receiving from backend)
78
+ */
79
+ function getTenantInventoryEntryWithPrice(entry, writeable) {
80
+ const convertToPrice = writeable ? price_conversion_1.convertDecimalToInt : price_conversion_1.convertIntToDecimal;
81
+ return {
82
+ ...entry,
83
+ ...(entry.items != null
84
+ ? {
85
+ items: getInventoryEntryItemsWithPrice(entry.items, convertToPrice),
86
+ }
87
+ : {}),
88
+ ...(entry.total_stock_price != null ? { total_stock_price: convertToPrice(entry.total_stock_price) } : {}),
89
+ };
90
+ }
91
+ /**
92
+ * Convert every tenant inventory entry in a list.
93
+ */
94
+ function getTenantInventoryEntriesWithPrice(entries, writeable) {
95
+ if (!entries)
96
+ return [];
97
+ return entries.map((entry) => getTenantInventoryEntryWithPrice(entry, writeable));
98
+ }
@@ -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
  };
@@ -19,9 +19,9 @@ export declare const InventoryTransactionsSchema: Schema<any, import("mongoose")
19
19
  previous_quantity_left: number;
20
20
  previous_unit_price: number;
21
21
  previous_remaining_stock_price: number;
22
+ transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
22
23
  transaction_quantity: number;
23
24
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
24
- transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
25
25
  order_id?: import("mongoose").Types.ObjectId | null | undefined;
26
26
  description?: string | null | undefined;
27
27
  department_code?: string | null | undefined;
@@ -45,9 +45,9 @@ export declare const InventoryTransactionsSchema: Schema<any, import("mongoose")
45
45
  previous_quantity_left: number;
46
46
  previous_unit_price: number;
47
47
  previous_remaining_stock_price: number;
48
+ transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
48
49
  transaction_quantity: number;
49
50
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
50
- transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
51
51
  order_id?: import("mongoose").Types.ObjectId | null | undefined;
52
52
  description?: string | null | undefined;
53
53
  department_code?: string | null | undefined;
@@ -71,9 +71,9 @@ export declare const InventoryTransactionsSchema: Schema<any, import("mongoose")
71
71
  previous_quantity_left: number;
72
72
  previous_unit_price: number;
73
73
  previous_remaining_stock_price: number;
74
+ transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
74
75
  transaction_quantity: number;
75
76
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
76
- transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
77
77
  order_id?: import("mongoose").Types.ObjectId | null | undefined;
78
78
  description?: string | null | undefined;
79
79
  department_code?: string | null | undefined;
@@ -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,
@@ -14,8 +14,8 @@ export declare const TenantCashInHandTransactionsSchema: Schema<any, import("mon
14
14
  createdAt: NativeDate;
15
15
  updatedAt: NativeDate;
16
16
  note: string;
17
- transaction_type: import("../../constants").CASH_IN_HAND_TRANSACTION_TYPE_ENUM;
18
17
  transaction_category: import("../../constants").CASH_IN_HAND_TRANSACTION_CATEGORY_ENUM;
18
+ transaction_type: import("../../constants").CASH_IN_HAND_TRANSACTION_TYPE_ENUM;
19
19
  cash_in_hand: number;
20
20
  processed_by_id: string;
21
21
  processed_by_name: string;
@@ -31,8 +31,8 @@ export declare const TenantCashInHandTransactionsSchema: Schema<any, import("mon
31
31
  createdAt: NativeDate;
32
32
  updatedAt: NativeDate;
33
33
  note: string;
34
- transaction_type: import("../../constants").CASH_IN_HAND_TRANSACTION_TYPE_ENUM;
35
34
  transaction_category: import("../../constants").CASH_IN_HAND_TRANSACTION_CATEGORY_ENUM;
35
+ transaction_type: import("../../constants").CASH_IN_HAND_TRANSACTION_TYPE_ENUM;
36
36
  cash_in_hand: number;
37
37
  processed_by_id: string;
38
38
  processed_by_name: string;
@@ -48,8 +48,8 @@ export declare const TenantCashInHandTransactionsSchema: Schema<any, import("mon
48
48
  createdAt: NativeDate;
49
49
  updatedAt: NativeDate;
50
50
  note: string;
51
- transaction_type: import("../../constants").CASH_IN_HAND_TRANSACTION_TYPE_ENUM;
52
51
  transaction_category: import("../../constants").CASH_IN_HAND_TRANSACTION_CATEGORY_ENUM;
52
+ transaction_type: import("../../constants").CASH_IN_HAND_TRANSACTION_TYPE_ENUM;
53
53
  cash_in_hand: number;
54
54
  processed_by_id: string;
55
55
  processed_by_name: string;
@@ -20,9 +20,9 @@ export declare const TenantInventoryDepartmentTransactionsSchema: Schema<any, im
20
20
  previous_quantity_left: number;
21
21
  previous_unit_price: number;
22
22
  previous_remaining_stock_price: number;
23
+ transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
23
24
  transaction_quantity: number;
24
25
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
25
- transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
26
26
  order_id?: import("mongoose").Types.ObjectId | null | undefined;
27
27
  description?: string | null | undefined;
28
28
  ref_id?: import("mongoose").Types.ObjectId | null | undefined;
@@ -46,9 +46,9 @@ export declare const TenantInventoryDepartmentTransactionsSchema: Schema<any, im
46
46
  previous_quantity_left: number;
47
47
  previous_unit_price: number;
48
48
  previous_remaining_stock_price: number;
49
+ transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
49
50
  transaction_quantity: number;
50
51
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
51
- transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
52
52
  order_id?: import("mongoose").Types.ObjectId | null | undefined;
53
53
  description?: string | null | undefined;
54
54
  ref_id?: import("mongoose").Types.ObjectId | null | undefined;
@@ -72,9 +72,9 @@ export declare const TenantInventoryDepartmentTransactionsSchema: Schema<any, im
72
72
  previous_quantity_left: number;
73
73
  previous_unit_price: number;
74
74
  previous_remaining_stock_price: number;
75
+ transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
75
76
  transaction_quantity: number;
76
77
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
77
- transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
78
78
  order_id?: import("mongoose").Types.ObjectId | null | undefined;
79
79
  description?: string | null | undefined;
80
80
  ref_id?: import("mongoose").Types.ObjectId | null | undefined;
@@ -18,8 +18,8 @@ export declare const TenantInventoryEntrySchema: Schema<any, import("mongoose").
18
18
  transaction_quantity: number;
19
19
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
20
20
  inventory_name: string;
21
- stock_price?: number | null | undefined;
22
21
  preparation?: any;
22
+ stock_price?: number | null | undefined;
23
23
  }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
24
24
  _id: import("mongoose").Types.ObjectId;
25
25
  inventory_code: string;
@@ -27,8 +27,8 @@ export declare const TenantInventoryEntrySchema: Schema<any, import("mongoose").
27
27
  transaction_quantity: number;
28
28
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
29
29
  inventory_name: string;
30
- stock_price?: number | null | undefined;
31
30
  preparation?: any;
31
+ stock_price?: number | null | undefined;
32
32
  }> & {
33
33
  _id: import("mongoose").Types.ObjectId;
34
34
  inventory_code: string;
@@ -36,8 +36,8 @@ export declare const TenantInventoryEntrySchema: Schema<any, import("mongoose").
36
36
  transaction_quantity: number;
37
37
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
38
38
  inventory_name: string;
39
- stock_price?: number | null | undefined;
40
39
  preparation?: any;
40
+ stock_price?: number | null | undefined;
41
41
  }>;
42
42
  created_by: {
43
43
  _id: string;
@@ -64,8 +64,8 @@ export declare const TenantInventoryEntrySchema: Schema<any, import("mongoose").
64
64
  transaction_quantity: number;
65
65
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
66
66
  inventory_name: string;
67
- stock_price?: number | null | undefined;
68
67
  preparation?: any;
68
+ stock_price?: number | null | undefined;
69
69
  }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
70
70
  _id: import("mongoose").Types.ObjectId;
71
71
  inventory_code: string;
@@ -73,8 +73,8 @@ export declare const TenantInventoryEntrySchema: Schema<any, import("mongoose").
73
73
  transaction_quantity: number;
74
74
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
75
75
  inventory_name: string;
76
- stock_price?: number | null | undefined;
77
76
  preparation?: any;
77
+ stock_price?: number | null | undefined;
78
78
  }> & {
79
79
  _id: import("mongoose").Types.ObjectId;
80
80
  inventory_code: string;
@@ -82,8 +82,8 @@ export declare const TenantInventoryEntrySchema: Schema<any, import("mongoose").
82
82
  transaction_quantity: number;
83
83
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
84
84
  inventory_name: string;
85
- stock_price?: number | null | undefined;
86
85
  preparation?: any;
86
+ stock_price?: number | null | undefined;
87
87
  }>;
88
88
  created_by: {
89
89
  _id: string;
@@ -110,8 +110,8 @@ export declare const TenantInventoryEntrySchema: Schema<any, import("mongoose").
110
110
  transaction_quantity: number;
111
111
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
112
112
  inventory_name: string;
113
- stock_price?: number | null | undefined;
114
113
  preparation?: any;
114
+ stock_price?: number | null | undefined;
115
115
  }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
116
116
  _id: import("mongoose").Types.ObjectId;
117
117
  inventory_code: string;
@@ -119,8 +119,8 @@ export declare const TenantInventoryEntrySchema: Schema<any, import("mongoose").
119
119
  transaction_quantity: number;
120
120
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
121
121
  inventory_name: string;
122
- stock_price?: number | null | undefined;
123
122
  preparation?: any;
123
+ stock_price?: number | null | undefined;
124
124
  }> & {
125
125
  _id: import("mongoose").Types.ObjectId;
126
126
  inventory_code: string;
@@ -128,8 +128,8 @@ export declare const TenantInventoryEntrySchema: Schema<any, import("mongoose").
128
128
  transaction_quantity: number;
129
129
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
130
130
  inventory_name: string;
131
- stock_price?: number | null | undefined;
132
131
  preparation?: any;
132
+ stock_price?: number | null | undefined;
133
133
  }>;
134
134
  created_by: {
135
135
  _id: string;
@@ -15,8 +15,8 @@ export declare const WalletTransactionsSchema: Schema<any, import("mongoose").Mo
15
15
  payment_provider: string;
16
16
  payment_id: string;
17
17
  payment_method: string;
18
- transaction_type: import("../../constants").WALLET_TRANSACTION_TYPE_ENUM;
19
18
  transaction_category: import("../../constants").WALLET_TRANSACTION_CATEGORY_ENUM;
19
+ transaction_type: import("../../constants").WALLET_TRANSACTION_TYPE_ENUM;
20
20
  running_balance: number;
21
21
  previous_balance: number;
22
22
  transaction_amount: number;
@@ -37,8 +37,8 @@ export declare const WalletTransactionsSchema: Schema<any, import("mongoose").Mo
37
37
  payment_provider: string;
38
38
  payment_id: string;
39
39
  payment_method: string;
40
- transaction_type: import("../../constants").WALLET_TRANSACTION_TYPE_ENUM;
41
40
  transaction_category: import("../../constants").WALLET_TRANSACTION_CATEGORY_ENUM;
41
+ transaction_type: import("../../constants").WALLET_TRANSACTION_TYPE_ENUM;
42
42
  running_balance: number;
43
43
  previous_balance: number;
44
44
  transaction_amount: number;
@@ -59,8 +59,8 @@ export declare const WalletTransactionsSchema: Schema<any, import("mongoose").Mo
59
59
  payment_provider: string;
60
60
  payment_id: string;
61
61
  payment_method: string;
62
- transaction_type: import("../../constants").WALLET_TRANSACTION_TYPE_ENUM;
63
62
  transaction_category: import("../../constants").WALLET_TRANSACTION_CATEGORY_ENUM;
63
+ transaction_type: import("../../constants").WALLET_TRANSACTION_TYPE_ENUM;
64
64
  running_balance: number;
65
65
  previous_balance: number;
66
66
  transaction_amount: number;
@@ -17,8 +17,8 @@ export declare const WarehouseInventoryEntrySchema: Schema<any, import("mongoose
17
17
  transaction_quantity: number;
18
18
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
19
19
  inventory_name: string;
20
- stock_price?: number | null | undefined;
21
20
  preparation?: any;
21
+ stock_price?: number | 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;
@@ -26,8 +26,8 @@ export declare const WarehouseInventoryEntrySchema: Schema<any, import("mongoose
26
26
  transaction_quantity: number;
27
27
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
28
28
  inventory_name: string;
29
- stock_price?: number | null | undefined;
30
29
  preparation?: any;
30
+ stock_price?: number | null | undefined;
31
31
  }> & {
32
32
  _id: import("mongoose").Types.ObjectId;
33
33
  inventory_code: string;
@@ -35,8 +35,8 @@ export declare const WarehouseInventoryEntrySchema: Schema<any, import("mongoose
35
35
  transaction_quantity: number;
36
36
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
37
37
  inventory_name: string;
38
- stock_price?: number | null | undefined;
39
38
  preparation?: any;
39
+ stock_price?: number | null | undefined;
40
40
  }>;
41
41
  warehouse_id: string;
42
42
  created_by: {
@@ -62,8 +62,8 @@ export declare const WarehouseInventoryEntrySchema: Schema<any, import("mongoose
62
62
  transaction_quantity: number;
63
63
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
64
64
  inventory_name: string;
65
- stock_price?: number | null | undefined;
66
65
  preparation?: any;
66
+ stock_price?: number | null | undefined;
67
67
  }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
68
68
  _id: import("mongoose").Types.ObjectId;
69
69
  inventory_code: string;
@@ -71,8 +71,8 @@ export declare const WarehouseInventoryEntrySchema: Schema<any, import("mongoose
71
71
  transaction_quantity: number;
72
72
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
73
73
  inventory_name: string;
74
- stock_price?: number | null | undefined;
75
74
  preparation?: any;
75
+ stock_price?: number | null | undefined;
76
76
  }> & {
77
77
  _id: import("mongoose").Types.ObjectId;
78
78
  inventory_code: string;
@@ -80,8 +80,8 @@ export declare const WarehouseInventoryEntrySchema: Schema<any, import("mongoose
80
80
  transaction_quantity: number;
81
81
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
82
82
  inventory_name: string;
83
- stock_price?: number | null | undefined;
84
83
  preparation?: any;
84
+ stock_price?: number | null | undefined;
85
85
  }>;
86
86
  warehouse_id: string;
87
87
  created_by: {
@@ -107,8 +107,8 @@ export declare const WarehouseInventoryEntrySchema: Schema<any, import("mongoose
107
107
  transaction_quantity: number;
108
108
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
109
109
  inventory_name: string;
110
- stock_price?: number | null | undefined;
111
110
  preparation?: any;
111
+ stock_price?: number | null | undefined;
112
112
  }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
113
113
  _id: import("mongoose").Types.ObjectId;
114
114
  inventory_code: string;
@@ -116,8 +116,8 @@ export declare const WarehouseInventoryEntrySchema: Schema<any, import("mongoose
116
116
  transaction_quantity: number;
117
117
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
118
118
  inventory_name: string;
119
- stock_price?: number | null | undefined;
120
119
  preparation?: any;
120
+ stock_price?: number | null | undefined;
121
121
  }> & {
122
122
  _id: import("mongoose").Types.ObjectId;
123
123
  inventory_code: string;
@@ -125,8 +125,8 @@ export declare const WarehouseInventoryEntrySchema: Schema<any, import("mongoose
125
125
  transaction_quantity: number;
126
126
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
127
127
  inventory_name: string;
128
- stock_price?: number | null | undefined;
129
128
  preparation?: any;
129
+ stock_price?: number | null | undefined;
130
130
  }>;
131
131
  warehouse_id: string;
132
132
  created_by: {
@@ -19,15 +19,15 @@ export declare const WarehouseInventoryTransactionsSchema: Schema<any, import("m
19
19
  previous_quantity_left: number;
20
20
  previous_unit_price: number;
21
21
  previous_remaining_stock_price: number;
22
+ transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
22
23
  transaction_quantity: number;
23
24
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
24
- transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
25
25
  order_id?: import("mongoose").Types.ObjectId | null | undefined;
26
26
  description?: string | null | undefined;
27
27
  order_number?: number | null | undefined;
28
+ preparation?: any;
28
29
  stock_price?: number | null | undefined;
29
30
  stock_expiry_date?: NativeDate | null | undefined;
30
- preparation?: any;
31
31
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
32
32
  createdAt: NativeDate;
33
33
  updatedAt: NativeDate;
@@ -44,15 +44,15 @@ export declare const WarehouseInventoryTransactionsSchema: Schema<any, import("m
44
44
  previous_quantity_left: number;
45
45
  previous_unit_price: number;
46
46
  previous_remaining_stock_price: number;
47
+ transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
47
48
  transaction_quantity: number;
48
49
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
49
- transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
50
50
  order_id?: import("mongoose").Types.ObjectId | null | undefined;
51
51
  description?: string | null | undefined;
52
52
  order_number?: number | null | undefined;
53
+ preparation?: any;
53
54
  stock_price?: number | null | undefined;
54
55
  stock_expiry_date?: NativeDate | null | undefined;
55
- preparation?: any;
56
56
  }>> & import("mongoose").FlatRecord<{
57
57
  createdAt: NativeDate;
58
58
  updatedAt: NativeDate;
@@ -69,15 +69,15 @@ export declare const WarehouseInventoryTransactionsSchema: Schema<any, import("m
69
69
  previous_quantity_left: number;
70
70
  previous_unit_price: number;
71
71
  previous_remaining_stock_price: number;
72
+ transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
72
73
  transaction_quantity: number;
73
74
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
74
- transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
75
75
  order_id?: import("mongoose").Types.ObjectId | null | undefined;
76
76
  description?: string | null | undefined;
77
77
  order_number?: number | null | undefined;
78
+ preparation?: any;
78
79
  stock_price?: number | null | undefined;
79
80
  stock_expiry_date?: NativeDate | null | undefined;
80
- preparation?: any;
81
81
  }> & Required<{
82
82
  _id: import("mongoose").Types.ObjectId;
83
83
  }> & {
@@ -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
  }
@@ -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.734",
3
+ "version": "0.2.736",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",