shareneus 1.3.0 → 1.3.2
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.
|
@@ -16,6 +16,9 @@ class InvoicePortraitPrintService {
|
|
|
16
16
|
title: 'TAX INVOICE',
|
|
17
17
|
},
|
|
18
18
|
background: function (currentPage, pageSize) {
|
|
19
|
+
if (size !== 'full') {
|
|
20
|
+
pageSize.height = pageSize.height - 435.945;
|
|
21
|
+
}
|
|
19
22
|
return shared_pdf_service_1.SharedPDFService.GetWatermarkImage(InvoicePDFData.Image, pageSize, InvoicePDFData.Entity.Wmark);
|
|
20
23
|
},
|
|
21
24
|
header: function (currentPage, pageCount, pageSize) {
|
|
@@ -98,7 +101,7 @@ class InvoicePortraitPrintService {
|
|
|
98
101
|
{
|
|
99
102
|
columns: this.GetHeaderInfo(InvoicePDFData, 0)
|
|
100
103
|
},
|
|
101
|
-
{ text: InvoicePDFData.HeaderName, alignment: '
|
|
104
|
+
{ text: InvoicePDFData.HeaderName, alignment: 'left', style: ['Receiptheader1'], marginTop: 5 }
|
|
102
105
|
]
|
|
103
106
|
}
|
|
104
107
|
], columnGap: 10
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PosReceiptPrintService = void 0;
|
|
4
4
|
const tr_utils_1 = require("../utils/tr-utils");
|
|
5
|
+
const shared_pdf_service_1 = require("./shared-pdf.service");
|
|
5
6
|
class PosReceiptPrintService {
|
|
6
7
|
static GetPrint(InvoicePDFData, size) {
|
|
7
8
|
// console.log('InvoicePDFData', InvoicePDFData);
|
|
@@ -15,6 +16,12 @@ class PosReceiptPrintService {
|
|
|
15
16
|
info: {
|
|
16
17
|
title: 'CounterSale',
|
|
17
18
|
},
|
|
19
|
+
background: function (currentPage, pageSize) {
|
|
20
|
+
if (size !== 'full') {
|
|
21
|
+
pageSize.height = pageSize.height - 435.945;
|
|
22
|
+
}
|
|
23
|
+
return shared_pdf_service_1.SharedPDFService.GetWatermarkImage(InvoicePDFData.Image, pageSize, InvoicePDFData.Entity.Wmark);
|
|
24
|
+
},
|
|
18
25
|
header: function (currentPage, pageCount, pageSize) {
|
|
19
26
|
return { text: currentPage.toString() + ' of ' + pageCount, alignment: 'right', marginRight: 25, fontSize: 8, marginTop: 2 };
|
|
20
27
|
},
|
|
@@ -26,11 +33,12 @@ class PosReceiptPrintService {
|
|
|
26
33
|
// },
|
|
27
34
|
// pageOrientation: 'portrait',
|
|
28
35
|
content: [
|
|
29
|
-
|
|
30
|
-
{ text:
|
|
31
|
-
{
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
this.GetMainHeaderInfo(InvoicePDFData),
|
|
37
|
+
// { text: InvoicePDFData.Entity.CName, style: ['headerstyle'], alignment: 'center', fontSize: 20 },
|
|
38
|
+
// { text: this.GetAddress(InvoicePDFData.Entity), alignment: 'center', style: ['headerstyle'] },
|
|
39
|
+
// {
|
|
40
|
+
// columns: this.GetHeaderInfo(InvoicePDFData)
|
|
41
|
+
// },
|
|
34
42
|
// this.CustomerAndVehicleDetailsAfterLine(size),
|
|
35
43
|
// {
|
|
36
44
|
// columns: [{
|
|
@@ -142,21 +150,64 @@ class PosReceiptPrintService {
|
|
|
142
150
|
},
|
|
143
151
|
};
|
|
144
152
|
}
|
|
145
|
-
static
|
|
153
|
+
static GetMainHeaderInfo(InvoicePDFData) {
|
|
154
|
+
if (!tr_utils_1.TrUtils.IsNull(InvoicePDFData.Image)) {
|
|
155
|
+
return {
|
|
156
|
+
columns: [{ image: InvoicePDFData.Image, width: 60, height: 60, marginBottom: 5 },
|
|
157
|
+
{
|
|
158
|
+
stack: [
|
|
159
|
+
{ text: InvoicePDFData.Entity.CName, style: ['headerstyle'], alignment: 'left', fontSize: 15 },
|
|
160
|
+
{ text: this.GetAddress(InvoicePDFData.Entity), alignment: 'left', style: ['headerstyle'] },
|
|
161
|
+
{
|
|
162
|
+
columns: this.GetHeaderInfo(InvoicePDFData, 0)
|
|
163
|
+
},
|
|
164
|
+
{ text: InvoicePDFData.HeaderName, alignment: 'center', style: ['Receiptheader1'], marginTop: 5 }
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
], columnGap: 10
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
return {
|
|
172
|
+
stack: [
|
|
173
|
+
{ text: InvoicePDFData.Entity.CName, style: ['headerstyle'], alignment: 'center', fontSize: 15 },
|
|
174
|
+
{ text: this.GetAddress(InvoicePDFData.Entity), alignment: 'center', style: ['headerstyle'] },
|
|
175
|
+
{
|
|
176
|
+
columns: this.GetHeaderInfo(InvoicePDFData, 5)
|
|
177
|
+
},
|
|
178
|
+
{ text: InvoicePDFData.HeaderName, alignment: 'center', style: ['Receiptheader1'] }
|
|
179
|
+
]
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
static GetHeaderInfo(InvoicePDFData, marginleft) {
|
|
146
184
|
let TaxInfo = [];
|
|
147
185
|
if (!tr_utils_1.TrUtils.IsEmpty(InvoicePDFData.Entity.GSTIN)) {
|
|
148
|
-
TaxInfo.push({ text: 'GSTIN : ' + InvoicePDFData.Entity.GSTIN, marginTop: 2, marginLeft:
|
|
186
|
+
TaxInfo.push({ text: 'GSTIN : ' + InvoicePDFData.Entity.GSTIN, marginTop: 2, marginLeft: marginleft, alignment: 'left', fontSize: 9, width: 'auto' });
|
|
149
187
|
}
|
|
150
|
-
// if (!TrUtils.IsEmpty(InvoicePDFData.Entity.PAN)) {
|
|
151
|
-
// TaxInfo.push({ text: 'PAN : ' + InvoicePDFData.Entity.PAN, marginTop: 2, marginLeft: 5, alignment: 'left', fontSize: 9, width: 'auto' },
|
|
152
|
-
// );
|
|
153
|
-
// }
|
|
154
188
|
if (!tr_utils_1.TrUtils.IsEmpty(InvoicePDFData.Entity.DLNo)) {
|
|
155
189
|
TaxInfo.push({ text: 'D.L.NO : ' + InvoicePDFData.Entity.DLNo, marginTop: 2, marginLeft: 5, alignment: 'left', fontSize: 9, width: '*' });
|
|
156
190
|
}
|
|
157
191
|
TaxInfo.push(this.GetBillofSupplyName(InvoicePDFData.Settings));
|
|
158
192
|
return TaxInfo;
|
|
159
193
|
}
|
|
194
|
+
// static GetHeaderInfo(InvoicePDFData: any) {
|
|
195
|
+
// let TaxInfo: any = [];
|
|
196
|
+
// if (!TrUtils.IsEmpty(InvoicePDFData.Entity.GSTIN)) {
|
|
197
|
+
// TaxInfo.push({ text: 'GSTIN : ' + InvoicePDFData.Entity.GSTIN, marginTop: 2, marginLeft: 5, alignment: 'left', fontSize: 9, width: 'auto' },
|
|
198
|
+
// );
|
|
199
|
+
// }
|
|
200
|
+
// // if (!TrUtils.IsEmpty(InvoicePDFData.Entity.PAN)) {
|
|
201
|
+
// // TaxInfo.push({ text: 'PAN : ' + InvoicePDFData.Entity.PAN, marginTop: 2, marginLeft: 5, alignment: 'left', fontSize: 9, width: 'auto' },
|
|
202
|
+
// // );
|
|
203
|
+
// // }
|
|
204
|
+
// if (!TrUtils.IsEmpty(InvoicePDFData.Entity.DLNo)) {
|
|
205
|
+
// TaxInfo.push({ text: 'D.L.NO : ' + InvoicePDFData.Entity.DLNo, marginTop: 2, marginLeft: 5, alignment: 'left', fontSize: 9, width: '*' },
|
|
206
|
+
// );
|
|
207
|
+
// }
|
|
208
|
+
// TaxInfo.push(this.GetBillofSupplyName(InvoicePDFData.Settings));
|
|
209
|
+
// return TaxInfo;
|
|
210
|
+
// }
|
|
160
211
|
static finalReturnTotal(InvoicePDFData) {
|
|
161
212
|
// if (!TrUtils.IsFixedZero(InvoicePDFData.CustRetRoundedTotal)) {
|
|
162
213
|
// return 'Returns Total : ' + InvoicePDFData.CustRetRoundedTotal
|