shareneus 1.5.97 → 1.5.99

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.
@@ -320,8 +320,9 @@ function buildBarcodeStack(code) {
320
320
  return [
321
321
  {
322
322
  svg,
323
- width: 160,
324
- margin: [0, 8, 0, 0]
323
+ width: 92,
324
+ alignment: 'center',
325
+ margin: [0, 0, 0, 0]
325
326
  }
326
327
  ];
327
328
  }
@@ -401,12 +402,12 @@ function formatDisplayDate(value) {
401
402
  return value;
402
403
  }
403
404
  function resolveShowBarCode(transactionData, printConfig = {}) {
404
- var _a;
405
- if (Object.prototype.hasOwnProperty.call(printConfig || {}, 'ShowBarCode')) {
406
- return isTruthy(printConfig === null || printConfig === void 0 ? void 0 : printConfig.ShowBarCode);
405
+ var _a, _b;
406
+ if (Object.prototype.hasOwnProperty.call(printConfig || {}, 'Customer')) {
407
+ return isTruthy((_a = printConfig === null || printConfig === void 0 ? void 0 : printConfig.Customer) === null || _a === void 0 ? void 0 : _a.ShowBarCode);
407
408
  }
408
409
  return isTruthy(transactionData === null || transactionData === void 0 ? void 0 : transactionData.ShowBarCode)
409
- || isTruthy((_a = transactionData === null || transactionData === void 0 ? void 0 : transactionData.Entity) === null || _a === void 0 ? void 0 : _a.PrCustBar)
410
+ || isTruthy((_b = transactionData === null || transactionData === void 0 ? void 0 : transactionData.Entity) === null || _b === void 0 ? void 0 : _b.PrCustBar)
410
411
  || isTruthy(transactionData === null || transactionData === void 0 ? void 0 : transactionData.PrCustBar);
411
412
  }
412
413
  function resolveBillToCode(transactionData) {
@@ -446,13 +447,13 @@ function textToSvgBarcode(text) {
446
447
  const svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
447
448
  (0, jsbarcode_1.default)(svgElement, text, {
448
449
  format: "CODE128",
449
- width: 1.25,
450
- height: 20,
450
+ width: 1,
451
+ height: 18,
451
452
  margin: 0,
452
- marginTop: 6,
453
+ marginTop: 0,
453
454
  displayValue: true,
454
- fontSize: 7,
455
- textMargin: 0,
455
+ fontSize: 8,
456
+ textMargin: 1,
456
457
  fontOptions: 'bold'
457
458
  });
458
459
  return svgElement.outerHTML;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.5.97",
3
+ "version": "1.5.99",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",