@managesome/eposmatic-toolkit 0.2.233 → 0.2.235
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.
|
@@ -8,6 +8,9 @@ export interface IReportChannelData {
|
|
|
8
8
|
grossAmount: number;
|
|
9
9
|
count: number;
|
|
10
10
|
level?: number;
|
|
11
|
+
itemRefId?: string;
|
|
12
|
+
individualCount?: number;
|
|
13
|
+
dealCount?: number;
|
|
11
14
|
subChannels: {
|
|
12
15
|
_id: string;
|
|
13
16
|
name: string;
|
|
@@ -15,6 +18,9 @@ export interface IReportChannelData {
|
|
|
15
18
|
count: number;
|
|
16
19
|
level: number;
|
|
17
20
|
referenceId?: string;
|
|
21
|
+
itemRefId?: string;
|
|
22
|
+
individualCount?: number;
|
|
23
|
+
dealCount?: number;
|
|
18
24
|
}[];
|
|
19
25
|
}
|
|
20
26
|
export interface IItemReportChannelData extends IReportChannelData {
|
|
@@ -41,6 +41,7 @@ export interface IReceiptProps {
|
|
|
41
41
|
display_order_instructions_on_customer_receipt: boolean;
|
|
42
42
|
display_unit_item_price_on_customer_receipt: boolean;
|
|
43
43
|
hide_modifier_name: boolean;
|
|
44
|
+
display_qr_code_on_receipt: boolean;
|
|
44
45
|
};
|
|
45
46
|
}
|
|
46
47
|
export interface IReceiptItem {
|
|
@@ -487,7 +487,7 @@ const getPartialItems = (categories = [], included_categories_map, filterEmpty)
|
|
|
487
487
|
exports.getPartialItems = getPartialItems;
|
|
488
488
|
function receiptEngine(payload, mappedItems = {}) {
|
|
489
489
|
const { currency_symbol, image_url, name, public_phone_numbers, restaurant_address, support_email, tax_business_number, takeaway_is_pickup, tax_invoice_provider, country_alpha_2, hide_gst_value, receipt_qr_type, business_website, google_review_link, playstore_url, appstore_url, fb_link, instagram_link, twitter_link, tiktok_link, } = payload.tenant_settings;
|
|
490
|
-
const { full_width, included_categories_map, printing_preference, receipt_type, show_modifiers, display_modifiers_on_separate_lines, display_item_instructions_on_customer_receipt, display_order_instructions_on_customer_receipt, display_unit_item_price_on_customer_receipt, hide_modifier_name, } = payload.printer_settings;
|
|
490
|
+
const { full_width, included_categories_map, printing_preference, receipt_type, show_modifiers, display_modifiers_on_separate_lines, display_item_instructions_on_customer_receipt, display_order_instructions_on_customer_receipt, display_unit_item_price_on_customer_receipt, hide_modifier_name, display_qr_code_on_receipt, } = payload.printer_settings;
|
|
491
491
|
const currencySymbol = currency_symbol ?? '';
|
|
492
492
|
const grandTotal = payload.order.grand_total ?? 0;
|
|
493
493
|
const { amountPayedSoFar, existingPayments, change, openAmount } = (0, payment_helpers_1.getOrderPaymentsDetails)(payload.order.grand_total, payload.order.payments);
|
|
@@ -811,7 +811,7 @@ function receiptEngine(payload, mappedItems = {}) {
|
|
|
811
811
|
if (payload.order.tax_invoice_id) {
|
|
812
812
|
order_link = payload.order.tax_invoice_id;
|
|
813
813
|
}
|
|
814
|
-
else {
|
|
814
|
+
else if (display_qr_code_on_receipt) {
|
|
815
815
|
const digitalReceiptLink = business_website != null ? `https://${business_website}/orders/${payload.order._id}` : null;
|
|
816
816
|
if (receipt_qr_type === constants_1.RECEIPT_QR_CODE_TYPE_ENUM.DIGITAL_RECEIPT && digitalReceiptLink != null) {
|
|
817
817
|
order_link = digitalReceiptLink;
|