@managesome/eposmatic-toolkit 0.2.232 → 0.2.234

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.
@@ -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;
@@ -198,6 +198,7 @@ export interface ISettingsForPOS {
198
198
  tiktok_link: ITenant['tiktok_link'];
199
199
  playstore_url: ITenant['playstore_url'];
200
200
  appstore_url: ITenant['appstore_url'];
201
+ google_review_link: ITenant['google_review_link'];
201
202
  }
202
203
  export declare function getSettingsForPOS(settings: ITenant): ISettingsForPOS;
203
204
  export interface ISettingsForPrinter {
@@ -295,6 +295,7 @@ function getSettingsForPOS(settings) {
295
295
  tiktok_link: settings.tiktok_link,
296
296
  playstore_url: settings.playstore_url,
297
297
  appstore_url: settings.appstore_url,
298
+ google_review_link: settings.google_review_link,
298
299
  };
299
300
  }
300
301
  function getSettingsForCloud(settings) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managesome/eposmatic-toolkit",
3
- "version": "0.2.232",
3
+ "version": "0.2.234",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",