shareneus 1.4.78 → 1.4.80

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.
@@ -9,6 +9,7 @@ const shared_pdf_service_1 = require("../../shared/shared-pdf.service");
9
9
  const jsbarcode_1 = __importDefault(require("jsbarcode"));
10
10
  class PosReceiptPrintService {
11
11
  static GetPrint(InvoicePDFData, size) {
12
+ var _a;
12
13
  // console.log('InvoicePDFData', InvoicePDFData);
13
14
  if (tr_utils_1.TrUtils.IsNull(InvoicePDFData.Name)) {
14
15
  InvoicePDFData.Name = '';
@@ -76,7 +77,7 @@ class PosReceiptPrintService {
76
77
  lineHeight: 0.5,
77
78
  body: this.CustomerInfo(InvoicePDFData)
78
79
  }, layout: 'noBorders'
79
- }, this.GetBarCode(InvoicePDFData.Customer.Code, InvoicePDFData.Entity.PrCustBar),
80
+ }, this.GetBarCode((_a = InvoicePDFData.Customer) === null || _a === void 0 ? void 0 : _a.Code, InvoicePDFData.Entity.PrCustBar),
80
81
  {
81
82
  // marginTop: 4,
82
83
  marginRight: 5,
@@ -160,7 +161,7 @@ class PosReceiptPrintService {
160
161
  return CustomerTable;
161
162
  }
162
163
  static GetBarCode(code, PrCustBar) {
163
- if (PrCustBar) {
164
+ if (!tr_utils_1.TrUtils.IsNull(code) && PrCustBar) {
164
165
  return { svg: this.textToSvgBarcode(code).svg };
165
166
  }
166
167
  else {
@@ -111,12 +111,11 @@ class InvoicePortraitPrintService {
111
111
  marginTop: 10,
112
112
  marginBottom: 5,
113
113
  table: {
114
- widths: ['*', '*', '*'],
115
- body: [[{ text: 'Paid : ' + tr_utils_1.TrUtils.FixPriceValue(Paid, DecimalsNumber) },
116
- { text: 'Due : ' + tr_utils_1.TrUtils.FixPriceValue(Due, DecimalsNumber) },
117
- { text: 'Status : ' + Status }]]
114
+ widths: ['*', 'auto'],
115
+ body: [[{ text: 'Paid : ' + tr_utils_1.TrUtils.FixPriceValue(Paid, DecimalsNumber), marginLeft: 20 },
116
+ { text: 'Due : ' + tr_utils_1.TrUtils.FixPriceValue(Due, DecimalsNumber), marginRight: 20 }]]
118
117
  },
119
- layout: this.LayOutStyle(),
118
+ layout: shared_pdf_service_1.SharedPDFService.LayOutLineStyle(),
120
119
  };
121
120
  }
122
121
  else {
@@ -600,7 +599,7 @@ class InvoicePortraitPrintService {
600
599
  widths: ['*', '*'],
601
600
  body: [
602
601
  [
603
- shared_pdf_service_1.SharedPDFService.PartsTaxAmounts(ROPrintData.TaxSummary, true, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn),
602
+ shared_pdf_service_1.SharedPDFService.PartsTaxAmounts1(ROPrintData.TaxSummary, true, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn),
604
603
  {
605
604
  columns: [{ text: '', width: moreDiscDetails ? 120 : 150 }, this.GrandTotal(ROPrintData, '0.00', ROPrintData.CustPartsTotalBeforeDisc, totalDisc, totalTax, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, null, ROPrintData.Consolidate, ROPrintData.STotal, moreDiscDetails, ROPrintData.Entity.DecimalsNumber)],
606
605
  }
@@ -838,7 +838,7 @@ class SharedPDFService {
838
838
  }
839
839
  }
840
840
  static GetBarCode(code, PrCustBar) {
841
- if (PrCustBar) {
841
+ if (!tr_utils_1.TrUtils.IsNull(code) && PrCustBar) {
842
842
  return { svg: this.textToSvgBarcode(code).svg };
843
843
  }
844
844
  else {
@@ -1519,7 +1519,7 @@ class SharedPDFService {
1519
1519
  dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(part[column.Field]), alignment: 'right', opacity: 0.7, nowrap: true, fontSize: 6 });
1520
1520
  }
1521
1521
  else if (column.Field === 'CombinedTaxPercentage') {
1522
- dataRow.push({ text: part[column.Field].toString() + '%', alignment: 'center', opacity: 0.7, nowrap: true, fontSize: 6 });
1522
+ dataRow.push({ text: part[column.Field].toString() + '%', alignment: 'left', opacity: 0.7, nowrap: true, fontSize: 6 });
1523
1523
  }
1524
1524
  else {
1525
1525
  dataRow.push({ text: part[column.Field].toString(), alignment: 'left', opacity: 0.7, nowrap: true, fontSize: 6 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.4.78",
3
+ "version": "1.4.80",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",