shareneus 1.4.21 → 1.4.22

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.
@@ -38,7 +38,7 @@ class InvoicePortraitPrintService {
38
38
  },
39
39
  this.GetItemsTable(InvoicePDFData.Ops, InvoicePDFData.Items, InvoicePDFData.ShowTaxColumn, InvoicePDFData.SType, printOptions, size),
40
40
  [this.TotalDetails(InvoicePDFData)],
41
- [shared_pdf_service_1.SharedPDFService.InvoiceDueStatus(InvoicePDFData.Type, InvoicePDFData.Paid, InvoicePDFData.Due, InvoicePDFData.Sts, InvoicePDFData.isCountersale),
41
+ [this.InvoiceDueStatus(InvoicePDFData.Type, InvoicePDFData.Paid, InvoicePDFData.Due, InvoicePDFData.Sts, InvoicePDFData.isCountersale),
42
42
  ],
43
43
  {
44
44
  style: 'tableExample',
@@ -92,6 +92,36 @@ class InvoicePortraitPrintService {
92
92
  };
93
93
  return dd;
94
94
  }
95
+ static LayOutStyle() {
96
+ return {
97
+ hLineColor: function (i, node) {
98
+ return (i === 0 || i === 1 || i === 2 || i === node.table.body.length) ? 'gray' : 'white';
99
+ },
100
+ vLineColor: function (i, node) {
101
+ return (i === 0 || i === node.table.widths.length) ? 'gray' : 'white';
102
+ }
103
+ };
104
+ }
105
+ static InvoiceDueStatus(Type, Paid, Due, Status, isCounter) {
106
+ if (Type === 'Invoice' && !isCounter) {
107
+ return {
108
+ // lineHeight: 0.7,
109
+ fontSize: this.TableHeaders,
110
+ marginTop: 10,
111
+ marginBottom: 5,
112
+ table: {
113
+ widths: ['*', '*', '*'],
114
+ body: [[{ text: 'Paid : ' + Paid },
115
+ { text: 'Due : ' + Due },
116
+ { text: 'Status : ' + Status }]]
117
+ },
118
+ layout: this.LayOutStyle(),
119
+ };
120
+ }
121
+ else {
122
+ return this.emptyObject();
123
+ }
124
+ }
95
125
  static GetMainHeaderInfo(InvoicePDFData) {
96
126
  if (!tr_utils_1.TrUtils.IsNull(InvoicePDFData.Image)) {
97
127
  return {
@@ -756,3 +786,4 @@ class InvoicePortraitPrintService {
756
786
  }
757
787
  }
758
788
  exports.InvoicePortraitPrintService = InvoicePortraitPrintService;
789
+ InvoicePortraitPrintService.TableHeaders = 9;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.4.21",
3
+ "version": "1.4.22",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",