shareneus 1.4.79 → 1.4.81
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 {
|
|
@@ -292,7 +292,10 @@ class SharedPDFService {
|
|
|
292
292
|
if (Entity.PrUPI && !Entity.IsProforma) {
|
|
293
293
|
SetData.push({ qr: Entity.UPI, fit: '125', marginLeft: 150 });
|
|
294
294
|
SetData.push({ text: 'Scan To Pay', fontSize: this.TermsandCond, marginLeft: 151, bold: true, marginTop: 2 });
|
|
295
|
-
SetData.push({ text: 'UPI Number: ' + Entity.UPIPhone, fontSize: 9, marginLeft: 151, bold: true, marginTop: 5 });
|
|
295
|
+
// SetData.push({ text: 'UPI Number: ' + Entity.UPIPhone, fontSize: 9, marginLeft: 151, bold: true, marginTop: 5 });
|
|
296
|
+
if (!tr_utils_1.TrUtils.IsNull(Entity.UPIPhone)) {
|
|
297
|
+
SetData.push({ text: 'UPI Number: ' + Entity.UPIPhone, fontSize: 9, marginLeft: 151, bold: true, marginTop: 5 });
|
|
298
|
+
}
|
|
296
299
|
}
|
|
297
300
|
// SetData.push({ columns: [this.GetEntityTax(Entity)] })
|
|
298
301
|
return {
|
|
@@ -838,7 +841,7 @@ class SharedPDFService {
|
|
|
838
841
|
}
|
|
839
842
|
}
|
|
840
843
|
static GetBarCode(code, PrCustBar) {
|
|
841
|
-
if (PrCustBar) {
|
|
844
|
+
if (!tr_utils_1.TrUtils.IsNull(code) && PrCustBar) {
|
|
842
845
|
return { svg: this.textToSvgBarcode(code).svg };
|
|
843
846
|
}
|
|
844
847
|
else {
|