shareneus 1.4.59 → 1.4.60

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.
@@ -1,5 +1,6 @@
1
1
  export declare class PosReceiptPrintService {
2
2
  static GetPrint(InvoicePDFData: any, size: string): any;
3
+ static CustomerInfo(InvoicePDFData: any): any;
3
4
  static GetBarCode(code: string, PrCustBar: boolean): {
4
5
  svg: any;
5
6
  } | {
@@ -74,11 +74,7 @@ class PosReceiptPrintService {
74
74
  // { text: 'Doctor : ' + InvoicePDFData.Name, style: ['headerstyle'] }],
75
75
  table: {
76
76
  lineHeight: 0.5,
77
- body: [
78
- [{ text: 'UHID', style: ['headerstyle'] }, { text: ':', style: ['headerstyle'] }, { text: InvoicePDFData.Customer.Code, style: ['headerstyle'] }],
79
- [{ text: 'Name', style: ['headerstyle'] }, { text: ':', style: ['headerstyle'] }, { text: InvoicePDFData.Customer.Name, style: ['headerstyle'] }],
80
- [{ text: 'Doctor', style: ['headerstyle'] }, { text: ':', style: ['headerstyle'] }, { text: InvoicePDFData.Name, style: ['headerstyle'] }]
81
- ]
77
+ body: this.CustomerInfo(InvoicePDFData)
82
78
  }, layout: 'noBorders'
83
79
  }, this.GetBarCode(InvoicePDFData.Customer.Code, InvoicePDFData.Entity.PrCustBar),
84
80
  {
@@ -153,6 +149,16 @@ class PosReceiptPrintService {
153
149
  };
154
150
  return dd;
155
151
  }
152
+ static CustomerInfo(InvoicePDFData) {
153
+ let CustomerTable = [
154
+ [{ text: 'Name', style: ['headerstyle'] }, { text: ':', style: ['headerstyle'] }, { text: InvoicePDFData.Customer.Name, style: ['headerstyle'] }],
155
+ [{ text: 'Doctor', style: ['headerstyle'] }, { text: ':', style: ['headerstyle'] }, { text: InvoicePDFData.Name, style: ['headerstyle'] }]
156
+ ];
157
+ if (InvoicePDFData.Customer.Code) {
158
+ CustomerTable.unshift([{ text: 'UHID', style: ['headerstyle'] }, { text: ':', style: ['headerstyle'] }, { text: InvoicePDFData.Customer.Code, style: ['headerstyle'] }]);
159
+ }
160
+ return CustomerTable;
161
+ }
156
162
  static GetBarCode(code, PrCustBar) {
157
163
  if (PrCustBar) {
158
164
  return { svg: this.textToSvgBarcode(code).svg };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.4.59",
3
+ "version": "1.4.60",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",