shareneus 1.4.11 → 1.4.13

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.
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DebitNotePdfService = exports.DCWithoutPricePdfService = exports.DCLandscapeWithoutPricePdfService = exports.DCLandscapePdfService = exports.CustomerBalancesService = exports.SalesByCustomerPDFService = exports.CustWiseSalesDetailsService = exports.CreditNoteTotalsService = exports.CreditNotePdfService = exports.ConsultationPDFService = exports.ConsultationFullPrintService = exports.ConsultationFeeReceiptPrintService = exports.CNPrintService = exports.ChecklistsPDFService = exports.CheckListPrintService = exports.CategoryWiseItemPDFService = exports.SalesReceiptprintService = exports.AppointmentTotalsService = exports.AnalysisPDFService = exports.VenBalanceXlsxFileService = exports.TallySalesImportXlsxFileService = exports.StockXlsxFileService = exports.IssueSparesXlsxFileService = exports.ScheduledDrugXlsxFileService = exports.ScheduledDrugSummaryXlsxFileService = exports.SalesByServiceSummaryXlsxFileService = exports.SummaryXlsxFileService = exports.ServiceAdvisorWisePartXlsxFileService = exports.ServiceAdvisorWiseLaborXlsxFileService = exports.RepairOrdersXlsxFileService = exports.PaymentsMadeXlsxFileService = exports.PaymentReceiveXlsxFileService = exports.OperatorWiseSummaryXlsxFileService = exports.OperatorWiseDetailsXlsxFileService = exports.ManfWiseSalesXlsxFileService = exports.ItemsWiseSalesXlsxFileService = exports.ItemWiseMOSummaryXlsxFileService = exports.ItemWiseMODetailsXlsxFileService = exports.ItemWiseDoctorSaleXlsxFileService = exports.InvoicesWiseXlsxFileService = exports.InsuranceExpireXlsxFileService = exports.GSTR2ExcelService = exports.GSTR1ExcelService = exports.GSTROXlsxFileService = exports.ExpiringDrugsXlsxFileService = exports.SalesByCustomerXlsxFileService = exports.CustWiseSalesXlsxFileService = exports.CustBalanceXlsxFileService = exports.CategoryWiseItemXlsxFileService = exports.AnalysisXlsxFileService = void 0;
4
4
  exports.SharedPDFService = exports.SharedInvoiceprintService = exports.WOPrintService = exports.ScheduledDrugSummaryPDFService = exports.ScheduledDrugPDFService = exports.SalesTotalsService = exports.SaleReceiptPrintService = exports.SalesReceiptpdfService = exports.SalesPrintService = exports.SalesPdfService = exports.SalesByServiceSummaryPDF = exports.ROTotalsService = exports.ROPrintService = exports.RoprintService = exports.RepairOrdersReportsPDFService = exports.ReorderPointPDFService = exports.ReceiptPrintService = exports.PurchaseOrderPDFService = exports.PurchaseOrderTotalsService = exports.PurchaseOrderPrintService = exports.PosReceiptPrintService = exports.POTotalsService = exports.PaymentsReportPDFService = exports.ReceiptPDFService = exports.PackShipPrintService = exports.PackShipPDFService = exports.OperatorWiseSalesSummaryPDF = exports.OperatorWiseSalesDetailsPDF = exports.MaterialOutprintService = exports.MeetingPdfService = exports.ManfWiseSalesService = exports.ItemWiseSalesPDFService = exports.ItemWiseMOSummaryPDF = exports.ItemWiseMODetailsPDF = exports.ItemWiseDoctorSalePDFService = exports.ItemDetaisPdf = exports.IssuePartsprintService = exports.InvoiceTotalsService = exports.InvoiceLandscapePdfService = exports.InvPrintService = exports.InvoiceprintService = exports.InsuranceExpirePDF = exports.ExpiringDrugPDFService = exports.EstPrintService = exports.EquipmentDesignPdf = exports.DeliveryChallanTotalsService = exports.DeliveryChallanPrintService = exports.DeliveryChallanPdfService = exports.DebitNoteTotalsService = exports.DebitNotePrintService = void 0;
5
- exports.NextServiceDatePDFService = exports.NextServiceDateXlsxFileService = exports.ConsultationLetterHeadPDFService = exports.InvoiceLetterheadPdfService = exports.HCInvoiceprintService = exports.InvoicePortraitPrintService = exports.MyDate = exports.TrUtils = exports.VendorDebitNoteTotalsService = exports.VendorDebitNotePrintService = exports.VendorDebitNotePdfService = exports.VendorCreditNoteTotalsService = exports.VendorCreditNotePrintService = exports.VendorCreditNotePDFService = exports.VendorBalancesService = exports.TransferOrderPrintService = exports.TechnicianPrintService = exports.TechnicianpdfService = exports.TaskReportsPDfService = exports.TaskPDfService = exports.PrintSharedService = void 0;
5
+ exports.ItemBarCodeLabelPdf = exports.NextServiceDatePDFService = exports.NextServiceDateXlsxFileService = exports.ConsultationLetterHeadPDFService = exports.InvoiceLetterheadPdfService = exports.HCInvoiceprintService = exports.InvoicePortraitPrintService = exports.MyDate = exports.TrUtils = exports.VendorDebitNoteTotalsService = exports.VendorDebitNotePrintService = exports.VendorDebitNotePdfService = exports.VendorCreditNoteTotalsService = exports.VendorCreditNotePrintService = exports.VendorCreditNotePDFService = exports.VendorBalancesService = exports.TransferOrderPrintService = exports.TechnicianPrintService = exports.TechnicianpdfService = exports.TaskReportsPDfService = exports.TaskPDfService = exports.PrintSharedService = void 0;
6
6
  var analysis_excel_service_1 = require("./excel-files/analysis-excel.service");
7
7
  Object.defineProperty(exports, "AnalysisXlsxFileService", { enumerable: true, get: function () { return analysis_excel_service_1.AnalysisXlsxFileService; } });
8
8
  var category_wise_item_excel_service_1 = require("./excel-files/category-wise-item-excel.service");
@@ -245,3 +245,5 @@ var next_service_date_excel_service_1 = require("./excel-files/next-service-date
245
245
  Object.defineProperty(exports, "NextServiceDateXlsxFileService", { enumerable: true, get: function () { return next_service_date_excel_service_1.NextServiceDateXlsxFileService; } });
246
246
  var next_service_date_pdf_service_1 = require("./services/next-service-date-pdf.service");
247
247
  Object.defineProperty(exports, "NextServiceDatePDFService", { enumerable: true, get: function () { return next_service_date_pdf_service_1.NextServiceDatePDFService; } });
248
+ var item_bar_code_label_pdf_1 = require("./services/item-bar-code-label-pdf");
249
+ Object.defineProperty(exports, "ItemBarCodeLabelPdf", { enumerable: true, get: function () { return item_bar_code_label_pdf_1.ItemBarCodeLabelPdf; } });
@@ -0,0 +1,182 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ItemBarCodeLabelPdf = void 0;
7
+ const shared_pdf_service_1 = require("./shared-pdf.service");
8
+ const tr_utils_1 = require("../utils/tr-utils");
9
+ const jsbarcode_1 = __importDefault(require("jsbarcode"));
10
+ class ItemBarCodeLabelPdf {
11
+ static ItemDetailsPrint(Item, win, custom, txt) {
12
+ let dd = {
13
+ background: function (currentPage, pageSize) {
14
+ if (custom) {
15
+ return [
16
+ {
17
+ canvas: [
18
+ { type: 'line', x1: 5, y1: 5, x2: 385, y2: 5, lineWidth: 1 }, //Up line
19
+ { type: 'line', x1: 5, y1: 5, x2: 5, y2: 560, lineWidth: 1 }, //Left line
20
+ { type: 'line', x1: 5, y1: 560, x2: 385, y2: 560, lineWidth: 1 }, //Bottom line
21
+ { type: 'line', x1: 385, y1: 5, x2: 385, y2: 560, lineWidth: 1 }, //Rigth line
22
+ ]
23
+ }
24
+ ];
25
+ }
26
+ else {
27
+ return [
28
+ {
29
+ canvas: [
30
+ { type: 'line', x1: 5, y1: 15, x2: 372.95275591, y2: 15, lineWidth: 1 }, //Up line
31
+ { type: 'line', x1: 5, y1: 15, x2: 5, y2: 550.92913386, lineWidth: 1 }, //Left line
32
+ { type: 'line', x1: 5, y1: 550.92913386, x2: 372.95275591, y2: 550.92913386, lineWidth: 1 }, //Bottom line
33
+ { type: 'line', x1: 372.95275591, y1: 15, x2: 372.95275591, y2: 550.92913386, lineWidth: 1 }, //Rigth line
34
+ ]
35
+ }
36
+ ];
37
+ }
38
+ },
39
+ info: {
40
+ title: 'ItemDetails',
41
+ },
42
+ header: function (currentPage, pageCount) {
43
+ return { text: currentPage.toString() + ' of ' + pageCount, alignment: 'right', marginRight: 7, fontSize: 8, marginTop: 2 };
44
+ },
45
+ // footer: {
46
+ // columns: [
47
+ // {
48
+ // text: Item.Entity.CName, bold: 'true'
49
+ // },
50
+ // { text: Item.Entity.CName, alignment: 'right' }
51
+ // ]
52
+ // },
53
+ // pageMargins: [10, 15, 10, 15],
54
+ pageMargins: [10, 20, 10, 20],
55
+ pageSize: {
56
+ width: 377.95275591,
57
+ height: 566.92913386
58
+ },
59
+ content: [
60
+ // SharedPDFService.MainHeading(CheckListData.Entity.CName, CheckListData.Entity.Header, CheckListData.Image, CheckListData.HColor, null),
61
+ // SharedPDFService.GetPrintType('INSPECTION'),
62
+ // SharedPDFService.HeaderAfterLine(),
63
+ this.ChangeTableFormat(Item.Item, custom, txt),
64
+ { stack: [shared_pdf_service_1.SharedPDFService.MainHeading(Item.Entity.CName, Item.Entity, Image, Item.AColor, null)], marginTop: 15 },
65
+ { stack: [this.GetHeader(Item.Entity, Item.HColor)], marginTop: 15 }
66
+ // this.TableCreation(Item.Item),
67
+ // this.CheckListTable(CheckListData.Sections)
68
+ ],
69
+ styles: shared_pdf_service_1.SharedPDFService.GetStyles()
70
+ };
71
+ // return dd;
72
+ pdfMake.createPdf(dd).open();
73
+ // this.PrintFile = TrUtils.Stringify(dd);
74
+ // pdfMake.createPdf(dd).getDataUrl((DataURL: any) => {
75
+ // document.getElementById('pdf').setAttribute('src', DataURL);
76
+ // });
77
+ }
78
+ static GetHeader(Entity, HColor) {
79
+ let headerstyle;
80
+ if (Entity.Header === 1) {
81
+ headerstyle = 'ws_adrs_center';
82
+ }
83
+ else {
84
+ headerstyle = 'ws_adrs_left';
85
+ }
86
+ let SubHeader = [
87
+ { text: '' + Entity.Adrs1 + '', style: [headerstyle], fontSize: 10 },
88
+ { text: '' + Entity.City + shared_pdf_service_1.SharedPDFService.getPinCode(Entity.PIN) + ', ' + 'Ph: ' + Entity.Phone, style: headerstyle, fontSize: 10 },
89
+ { text: '' + shared_pdf_service_1.SharedPDFService.GetEmail(Entity.Email) + '', style: headerstyle, fontSize: 10 },
90
+ // { text: 'GSTIN:' + Entity.GSTIN + ', ' + 'PAN: ' + Entity.PAN, style: headerstyle },
91
+ ];
92
+ if (!tr_utils_1.TrUtils.IsEmpty(Entity.Adrs2)) {
93
+ SubHeader.splice(1, 0, { text: '' + Entity.Adrs2 + '', style: [headerstyle], fontSize: 10 });
94
+ }
95
+ // if (!TrUtils.IsEmpty(Entity.TLine)) {
96
+ // SubHeader.unshift({ text: this.GetTagLine(Entity.TLine), fontSize: 10, bold: true, color: HColor, margin: [0, 0, 0, 2] });
97
+ // }
98
+ // if (!TrUtils.IsEmpty(Entity.GSTIN) || !TrUtils.IsEmpty(Entity.PAN)) {
99
+ // let Data: any = '';
100
+ // if (!TrUtils.IsEmpty(Entity.GSTIN)) {
101
+ // Data = 'GSTIN:' + Entity.GSTIN;
102
+ // }
103
+ // if (!TrUtils.IsEmpty(Entity.GSTIN) && !TrUtils.IsEmpty(Entity.PAN)) {
104
+ // Data = Data + ', ';
105
+ // }
106
+ // if (!TrUtils.IsEmpty(Entity.PAN)) {
107
+ // Data = Data + 'PAN:' + Entity.PAN;
108
+ // }
109
+ // SubHeader.push({ text: Data, style: headerstyle, fontSize: this.TermsandCond });
110
+ // }
111
+ // if (Entity.GSTType === 2) {
112
+ // SubHeader.push({ text: '* under composition scheme', fontSize: this.TermsandCond });
113
+ // }
114
+ return SubHeader;
115
+ }
116
+ static ChangeTableFormat(Item, custom, txt) {
117
+ if (txt === 'New') {
118
+ return [{ svg: this.textToSvgBarcode(Item.MPN).svg, alignment: 'center' },
119
+ {
120
+ alignment: 'center',
121
+ marginTop: 10,
122
+ columns: [{ text: 'GSM : ' + Item.GSM, bold: true, marginTop: 25 }, { stack: [{ text: 'QC : Ok', bold: true, lineHeight: 1.7 }, { text: 'Mil : ' + Item.Mil, bold: true }] }]
123
+ },
124
+ {
125
+ alignment: 'center',
126
+ marginTop: 10,
127
+ stack: [{ text: 'SIZE(mm) : ' + Item.Size, bold: true, lineHeight: 1.7 },
128
+ { text: 'GROSS Wt(kg) : ' + Item.GWt, bold: true, lineHeight: 1.7 },
129
+ { text: 'Net Wt(kg) : ' + Item.NWt, bold: true, lineHeight: 1.7 },
130
+ { text: 'No.of Joins : 2', bold: true, lineHeight: 1.7 }
131
+ ]
132
+ }];
133
+ }
134
+ else {
135
+ return {
136
+ stack: [{ svg: this.textToSvgBarcode(Item.MPN).svg, alignment: 'center', marginTop: 20 }, {
137
+ style: 'tableExample',
138
+ marginLeft: custom ? 180 : 238,
139
+ marginTop: 20,
140
+ fontSize: 10,
141
+ table: {
142
+ marginTop: 15,
143
+ widths: [50, 50],
144
+ body: [[{ text: 'QC', marginTop: 7, marginBottom: 7 }, { text: '', marginTop: 7, marginBottom: 7 }]]
145
+ }
146
+ },
147
+ this.TableCreation(Item)
148
+ ]
149
+ };
150
+ }
151
+ }
152
+ static TableCreation(Item) {
153
+ return {
154
+ style: 'tableExample',
155
+ // marginRight: 5,
156
+ fontSize: 10,
157
+ table: {
158
+ widths: ['auto', '*', '*', '*'],
159
+ body: [
160
+ [{ text: 'GSM', marginTop: 7, marginBottom: 7 }, { text: Item.GSM, marginTop: 7, marginBottom: 7 }, { text: 'Mil', marginTop: 7, marginBottom: 7 }, { text: Item.Mil, marginTop: 7, marginBottom: 7 }],
161
+ [{ text: 'Item Desc', marginTop: 7, marginBottom: 7 }, { text: Item.Desc, colSpan: 3, marginTop: 7, marginBottom: 7 }, {}, {}],
162
+ // [{ text: 'Bar Code' }, { image: this.textToBase64Barcode(Item.MPN), colSpan: 3 }, {}, {}],
163
+ [{ text: 'SIZE(mm)', marginTop: 7, marginBottom: 7 }, { text: Item.Size, colSpan: 3, marginTop: 7, marginBottom: 7 }, {}, {}],
164
+ [{ text: 'Gross Wt(Kg)', marginTop: 7, marginBottom: 7 }, { text: Item.GWt, colSpan: 3, marginTop: 7, marginBottom: 7 }, {}, {}],
165
+ [{ text: 'Net Wt (Kg)', marginTop: 7, marginBottom: 7 }, { text: Item.NWt, colSpan: 3, marginTop: 7, marginBottom: 7 }, {}, {}],
166
+ [{ text: 'No.of Joints', marginTop: 7, marginBottom: 7 }, { text: Item.Join, colSpan: 3, marginTop: 7, marginBottom: 7 }, {}, {}],
167
+ ]
168
+ }
169
+ };
170
+ }
171
+ static textToSvgBarcode(text) {
172
+ const svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
173
+ (0, jsbarcode_1.default)(svgElement, text, { format: "CODE128", width: 1.25, height: 80 });
174
+ return { svg: svgElement.outerHTML };
175
+ }
176
+ static textToBase64Barcode(text, custom) {
177
+ var canvas = document.createElement("canvas");
178
+ (0, jsbarcode_1.default)(canvas, text, { displayValue: true, height: 80, width: 1 });
179
+ return canvas.toDataURL("image/svg");
180
+ }
181
+ }
182
+ exports.ItemBarCodeLabelPdf = ItemBarCodeLabelPdf;
@@ -2361,10 +2361,18 @@ class SharedPDFService {
2361
2361
  fontSize: this.BodySize,
2362
2362
  alignment: 'center',
2363
2363
  },
2364
+ ws_adrs_center1: {
2365
+ fontSize: 10,
2366
+ alignment: 'center',
2367
+ },
2364
2368
  ws_adrs_left: {
2365
2369
  fontSize: this.BodySize,
2366
2370
  alignment: 'left',
2367
2371
  },
2372
+ ws_adrs_left1: {
2373
+ fontSize: 10,
2374
+ alignment: 'left',
2375
+ },
2368
2376
  columnheader: {
2369
2377
  margin: [0, 5, 0, 0],
2370
2378
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.4.11",
3
+ "version": "1.4.13",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",