@managesome/eposmatic-toolkit 0.2.414 → 0.2.416
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 +2 -0
- package/lib/constants/ENUMS.js +2 -0
- package/lib/helpers/utils/receipt-engine.js +3 -4
- package/lib/helpers/utils/simplified-tenant.d.ts +1 -0
- package/lib/helpers/utils/simplified-tenant.js +1 -0
- package/lib/schemas/models/tenant.d.ts +3 -0
- package/lib/schemas/models/tenant.js +4 -0
- package/lib/schemas/types/tenant.d.ts +1 -0
- package/package.json +1 -1
package/lib/constants/ENUMS.d.ts
CHANGED
|
@@ -571,6 +571,8 @@ export declare enum USER_PERMISSIONS_ENUM {
|
|
|
571
571
|
POS_UPDATE_ORDER_PLATFORM = "POS_UPDATE_ORDER_PLATFORM",
|
|
572
572
|
POS_UPDATE_ORDER_ITEM_PRICE = "POS_UPDATE_ORDER_ITEM_PRICE",
|
|
573
573
|
POS_UPDATE_RESERVATION = "POS_UPDATE_RESERVATION",
|
|
574
|
+
POS_UPDATE_ASSIGN_RIDER = "POS_UPDATE_ASSIGN_RIDER",
|
|
575
|
+
POS_UPDATE_ASSIGN_ORDER_TAKER = "POS_UPDATE_ASSIGN_ORDER_TAKER",
|
|
574
576
|
ADMIN_DELETE_MENU = "ADMIN_DELETE_MENU",
|
|
575
577
|
ADMIN_DELETE_INVENTORY = "ADMIN_DELETE_INVENTORY",
|
|
576
578
|
ADMIN_DELETE_ORDER = "ADMIN_DELETE_ORDER",
|
package/lib/constants/ENUMS.js
CHANGED
|
@@ -788,6 +788,8 @@ var USER_PERMISSIONS_ENUM;
|
|
|
788
788
|
USER_PERMISSIONS_ENUM["POS_UPDATE_ORDER_PLATFORM"] = "POS_UPDATE_ORDER_PLATFORM";
|
|
789
789
|
USER_PERMISSIONS_ENUM["POS_UPDATE_ORDER_ITEM_PRICE"] = "POS_UPDATE_ORDER_ITEM_PRICE";
|
|
790
790
|
USER_PERMISSIONS_ENUM["POS_UPDATE_RESERVATION"] = "POS_UPDATE_RESERVATION";
|
|
791
|
+
USER_PERMISSIONS_ENUM["POS_UPDATE_ASSIGN_RIDER"] = "POS_UPDATE_ASSIGN_RIDER";
|
|
792
|
+
USER_PERMISSIONS_ENUM["POS_UPDATE_ASSIGN_ORDER_TAKER"] = "POS_UPDATE_ASSIGN_ORDER_TAKER";
|
|
791
793
|
/* =================>DELETE OPERATIONS<================= */
|
|
792
794
|
// For Admin Console
|
|
793
795
|
USER_PERMISSIONS_ENUM["ADMIN_DELETE_MENU"] = "ADMIN_DELETE_MENU";
|
|
@@ -128,11 +128,10 @@ function getReceiptEngineFooterDetails(order, settings) {
|
|
|
128
128
|
// Compute the actual GST base (the amount GST was calculated on)
|
|
129
129
|
let gstBase = price;
|
|
130
130
|
if (!order.exclude_discount_from_gst) {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
if (order.exclude_discount_from_gst) {
|
|
134
|
-
gstBase += itemDiscount;
|
|
131
|
+
// Discount is included in GST base — subtract all applied discounts
|
|
132
|
+
gstBase -= totalDiscount;
|
|
135
133
|
}
|
|
134
|
+
// When exclude_discount_from_gst is true, GST base stays at the full price
|
|
136
135
|
if (order.is_surcharge_taxable) {
|
|
137
136
|
gstBase += order.surcharge_amount ?? 0;
|
|
138
137
|
}
|
|
@@ -100,6 +100,7 @@ export interface ISettingsForWeb {
|
|
|
100
100
|
max_preorder_takeaway_minutes: ITenant['max_preorder_takeaway_minutes'];
|
|
101
101
|
default_prep_minutes: ITenant['default_prep_minutes'];
|
|
102
102
|
web_enable_pre_ordering: ITenant['web_enable_pre_ordering'];
|
|
103
|
+
web_pre_ordering_visibility_minutes: ITenant['web_pre_ordering_visibility_minutes'];
|
|
103
104
|
subscription_expiry: ITenant['subscription_expiry'];
|
|
104
105
|
business_website: ITenant['business_website'];
|
|
105
106
|
fb_link: ITenant['fb_link'];
|
|
@@ -155,6 +155,7 @@ function getSettingsForWeb(settings) {
|
|
|
155
155
|
cash_gst: settings.cash_gst,
|
|
156
156
|
default_gst_type: settings.default_gst_type,
|
|
157
157
|
reservation_enabled: settings.reservation_enabled,
|
|
158
|
+
web_pre_ordering_visibility_minutes: settings.web_pre_ordering_visibility_minutes,
|
|
158
159
|
dinein_service_fee: settings.dinein_service_fee,
|
|
159
160
|
is_service_fee_percentage: settings.is_service_fee_percentage,
|
|
160
161
|
is_service_fee_taxable: settings.is_service_fee_taxable,
|
|
@@ -146,6 +146,7 @@ export declare const TenantSchema: Schema<any, import("mongoose").Model<any, any
|
|
|
146
146
|
max_preorder_delivery_minutes?: number | null | undefined;
|
|
147
147
|
max_preorder_takeaway_minutes?: number | null | undefined;
|
|
148
148
|
web_enable_pre_ordering?: boolean | null | undefined;
|
|
149
|
+
web_pre_ordering_visibility_minutes?: number | null | undefined;
|
|
149
150
|
rider_pickup_food_image_mandatory?: boolean | null | undefined;
|
|
150
151
|
rider_dropoff_food_image_mandatory?: boolean | null | undefined;
|
|
151
152
|
disable_reason_for_discount?: boolean | null | undefined;
|
|
@@ -317,6 +318,7 @@ export declare const TenantSchema: Schema<any, import("mongoose").Model<any, any
|
|
|
317
318
|
max_preorder_delivery_minutes?: number | null | undefined;
|
|
318
319
|
max_preorder_takeaway_minutes?: number | null | undefined;
|
|
319
320
|
web_enable_pre_ordering?: boolean | null | undefined;
|
|
321
|
+
web_pre_ordering_visibility_minutes?: number | null | undefined;
|
|
320
322
|
rider_pickup_food_image_mandatory?: boolean | null | undefined;
|
|
321
323
|
rider_dropoff_food_image_mandatory?: boolean | null | undefined;
|
|
322
324
|
disable_reason_for_discount?: boolean | null | undefined;
|
|
@@ -488,6 +490,7 @@ export declare const TenantSchema: Schema<any, import("mongoose").Model<any, any
|
|
|
488
490
|
max_preorder_delivery_minutes?: number | null | undefined;
|
|
489
491
|
max_preorder_takeaway_minutes?: number | null | undefined;
|
|
490
492
|
web_enable_pre_ordering?: boolean | null | undefined;
|
|
493
|
+
web_pre_ordering_visibility_minutes?: number | null | undefined;
|
|
491
494
|
rider_pickup_food_image_mandatory?: boolean | null | undefined;
|
|
492
495
|
rider_dropoff_food_image_mandatory?: boolean | null | undefined;
|
|
493
496
|
disable_reason_for_discount?: boolean | null | undefined;
|
|
@@ -276,6 +276,10 @@ exports.TenantSchema = new mongoose_1.Schema({
|
|
|
276
276
|
type: Boolean,
|
|
277
277
|
required: false,
|
|
278
278
|
},
|
|
279
|
+
web_pre_ordering_visibility_minutes: {
|
|
280
|
+
type: Number,
|
|
281
|
+
required: false,
|
|
282
|
+
},
|
|
279
283
|
opt_in_for_radius_based_delivery: {
|
|
280
284
|
type: Boolean,
|
|
281
285
|
default: false,
|
|
@@ -52,6 +52,7 @@ export interface ITenant {
|
|
|
52
52
|
web_enable_delivery: boolean;
|
|
53
53
|
web_enable_dine_in: boolean;
|
|
54
54
|
web_enable_pre_ordering?: boolean;
|
|
55
|
+
web_pre_ordering_visibility_minutes?: number | null;
|
|
55
56
|
web_pre_ordering_days?: number | null;
|
|
56
57
|
max_preorder_delivery_minutes?: number | null;
|
|
57
58
|
max_preorder_takeaway_minutes?: number | null;
|