shareneus 1.4.47 → 1.4.48
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/accounting/counter-sales/auto-sales-receipt-pdf.service.js +1 -1
- package/dist/accounting/counter-sales/sales-receipt-print.service.js +1 -1
- package/dist/accounting/invoice/inv-pdf.service.js +1 -1
- package/dist/accounting/invoice/invoice-letterhead-pdf.service.js +1 -1
- package/dist/accounting/invoice/reports/excel/analysis-excel.service.d.ts +3 -3
- package/dist/accounting/invoice/reports/excel/analysis-excel.service.js +6 -6
- package/dist/accounting/invoice/reports/pdf/analysis-pdf.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/analysis-pdf.service.js +10 -9
- package/dist/accounting/invoice/reports/pdf/category-wise-item-pdf.service.js +0 -2
- package/dist/accounting/invoice/reports/pdf/cust-wise-sales-details-pdf.service.js +0 -2
- package/dist/accounting/invoice/reports/pdf/cust-wise-sales-summary-pdf.service.js +0 -2
- package/dist/accounting/invoice/reports/pdf/item-wise-doctor-sale-pdf.service.js +0 -2
- package/dist/accounting/invoice/reports/pdf/item-wise-sales-pdf.service.js +0 -2
- package/dist/accounting/invoice/reports/pdf/manf-wise-sales-pdf.service.js +0 -2
- package/dist/accounting/invoice/reports/pdf/operator-wise-details-pdf.service.js +0 -2
- package/dist/accounting/invoice/reports/pdf/operator-wise-summary-pdf.js +0 -2
- package/dist/accounting/invoice/reports/pdf/sales-by-service-pdf.service.js +0 -2
- package/dist/accounting/invoice/reports/pdf/scheduled-drug-pdf.service.js +0 -2
- package/dist/accounting/invoice/reports/pdf/scheduled-drug-summary-pdf.service.js +0 -2
- package/dist/accounting/invoice/shared-inv-pdf.service.js +1 -1
- package/dist/accounting/payment-receive/reports/pdf/customer-balances-pdf.service.d.ts +1 -1
- package/dist/accounting/payment-receive/reports/pdf/customer-balances-pdf.service.js +3 -3
- package/dist/accounting/payment-receive/reports/pdf/payment-report-pdf.service.d.ts +4 -4
- package/dist/accounting/payment-receive/reports/pdf/payment-report-pdf.service.js +9 -11
- package/dist/appointments/consultations/consultation-fee-receipt.service.d.ts +1 -1
- package/dist/appointments/consultations/consultation-fee-receipt.service.js +3 -3
- package/dist/appointments/consultations/consultation-full-pdf.service.d.ts +2 -2
- package/dist/appointments/consultations/consultation-full-pdf.service.js +7 -7
- package/dist/appointments/consultations/consultation-letterhead-pdf.service.d.ts +2 -3
- package/dist/appointments/consultations/consultation-letterhead-pdf.service.js +7 -15
- package/dist/appointments/consultations/consultation-pdf.service.d.ts +2 -3
- package/dist/appointments/consultations/consultation-pdf.service.js +14 -15
- package/dist/inventory/items/issue-parts-pdf.service.js +1 -1
- package/dist/inventory/items/reports/pdf/expiring-drugs-pdf.service.d.ts +1 -1
- package/dist/inventory/items/reports/pdf/expiring-drugs-pdf.service.js +4 -4
- package/dist/inventory/items/reports/pdf/item-wise-mout-details-pdf.js +0 -2
- package/dist/inventory/items/reports/pdf/item-wise-mout-summary-pdf.js +0 -2
- package/dist/inventory/items/reports/pdf/reorder-point-pdf.service.js +1 -1
- package/dist/inventory/transfer-order/transfer-order-pdf.service.js +1 -2
- package/dist/purchases/payment-made/reports/pdf/vendor-balances-pdf.service.d.ts +1 -1
- package/dist/purchases/payment-made/reports/pdf/vendor-balances-pdf.service.js +3 -3
- package/dist/services/reports/pdf/next-service-date-pdf.service.js +0 -2
- package/dist/services/reports/pdf/repair-orders-pdf.service.js +0 -1
- package/dist/services/separate-wo-print.service.d.ts +1 -1
- package/dist/services/separate-wo-print.service.js +4 -4
- package/dist/shared/shared-print.service.js +2 -1
- package/dist/tasks/meetings/meeting-pdf.d.ts +4 -4
- package/dist/tasks/meetings/meeting-pdf.js +9 -9
- package/dist/tasks/tasks/task-pdf.service.d.ts +4 -4
- package/dist/tasks/tasks/task-pdf.service.js +8 -8
- package/dist/tasks/tasks/task-reports-pdf.service.d.ts +6 -6
- package/dist/tasks/tasks/task-reports-pdf.service.js +14 -14
- package/dist/utils/my-date.d.ts +6 -7
- package/dist/utils/my-date.js +16 -16
- package/package.json +1 -1
|
@@ -479,7 +479,7 @@ class SalesReceiptprintService {
|
|
|
479
479
|
stack: [
|
|
480
480
|
{
|
|
481
481
|
columns: [{ text: '' }, { text: 'Gate Pass', bold: true, fontSize: 9, alignment: 'center', marginTop: 5 },
|
|
482
|
-
{ text: 'Date: ' + my_date_1.MyDate.ConvertUTCDateToReadable(my_date_1.MyDate.GetDateTimeNowInUTC()), marginTop: 5, fontSize: 9, alignment: 'right' }]
|
|
482
|
+
{ text: 'Date: ' + my_date_1.MyDate.ConvertUTCDateToReadable(my_date_1.MyDate.GetDateTimeNowInUTC(ROPrintData.Entity.User.TZ)), marginTop: 5, fontSize: 9, alignment: 'right' }]
|
|
483
483
|
},
|
|
484
484
|
{ text: ROPrintData.Entity.CName, alignment: 'center', bold: true, fontSize: 12, marginTop: 5, marginBottom: 5 },
|
|
485
485
|
{
|
|
@@ -141,7 +141,7 @@ class SaleReceiptPrintService {
|
|
|
141
141
|
InvoicePrintData._id = OriginalInvoiceData.Code;
|
|
142
142
|
InvoicePrintData.Sts = OriginalInvoiceData.Sts;
|
|
143
143
|
InvoicePrintData.Name = OriginalInvoiceData.Name;
|
|
144
|
-
InvoicePrintData.CrDate = my_date_1.MyDate.ConvertUTCDateTimeToReadable(OriginalInvoiceData.CrDate);
|
|
144
|
+
InvoicePrintData.CrDate = my_date_1.MyDate.ConvertUTCDateTimeToReadable(OriginalInvoiceData.CrDate, InvoicePrintData.Entity.User.TZ);
|
|
145
145
|
return InvoicePrintData;
|
|
146
146
|
}
|
|
147
147
|
static GetLaborPrintInfo(LaborList, Consolidate, TaxCodes, LineTotal) {
|
|
@@ -725,7 +725,7 @@ class InvoiceprintService {
|
|
|
725
725
|
stack: [
|
|
726
726
|
{
|
|
727
727
|
columns: [{ text: '' }, { text: 'Gate Pass', bold: true, fontSize: 9, alignment: 'center', marginTop: 5 },
|
|
728
|
-
{ text: 'Date: ' + my_date_1.MyDate.ConvertUTCDateToReadable(my_date_1.MyDate.GetDateTimeNowInUTC()), marginTop: 5, fontSize: 9, alignment: 'right' }]
|
|
728
|
+
{ text: 'Date: ' + my_date_1.MyDate.ConvertUTCDateToReadable(my_date_1.MyDate.GetDateTimeNowInUTC(ROPrintData.Entity.User.TZ)), marginTop: 5, fontSize: 9, alignment: 'right' }]
|
|
729
729
|
},
|
|
730
730
|
{ text: ROPrintData.Entity.CName, alignment: 'center', bold: true, fontSize: 12, marginTop: 5, marginBottom: 5 },
|
|
731
731
|
{
|
|
@@ -725,7 +725,7 @@ class InvoiceLetterheadPdfService {
|
|
|
725
725
|
stack: [
|
|
726
726
|
{
|
|
727
727
|
columns: [{ text: '' }, { text: 'Gate Pass', bold: true, fontSize: 9, alignment: 'center', marginTop: 5 },
|
|
728
|
-
{ text: 'Date: ' + my_date_1.MyDate.ConvertUTCDateToReadable(my_date_1.MyDate.GetDateTimeNowInUTC()), marginTop: 5, fontSize: 9, alignment: 'right' }]
|
|
728
|
+
{ text: 'Date: ' + my_date_1.MyDate.ConvertUTCDateToReadable(my_date_1.MyDate.GetDateTimeNowInUTC(ROPrintData.Entity.User.TZ)), marginTop: 5, fontSize: 9, alignment: 'right' }]
|
|
729
729
|
},
|
|
730
730
|
{ text: ROPrintData.Entity.CName, alignment: 'center', bold: true, fontSize: 12, marginTop: 5, marginBottom: 5 },
|
|
731
731
|
{
|
|
@@ -13,10 +13,10 @@ export declare class AnalysisXlsxFileService {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
static ws: any;
|
|
16
|
-
static GetAnalysisExcelData(MainData: any, isSale: boolean, searchValue: any, HeaderName: any, HeaderText: any): any;
|
|
16
|
+
static GetAnalysisExcelData(MainData: any, isSale: boolean, searchValue: any, HeaderName: any, HeaderText: any, EntityData: any): any;
|
|
17
17
|
static setHeadingInCell(HeaderName: any, showSearch: any, HeadText: any): void;
|
|
18
|
-
static setInvoiceDetailsInCell(MainData: any, isSale: boolean, HeaderText: any): void;
|
|
19
|
-
static SetInvoiceDataInExcel(InvoiceInfo: any, isSale: boolean, HeaderText: any): void;
|
|
18
|
+
static setInvoiceDetailsInCell(MainData: any, isSale: boolean, HeaderText: any, TZ: any): void;
|
|
19
|
+
static SetInvoiceDataInExcel(InvoiceInfo: any, isSale: boolean, HeaderText: any, TZ: any): void;
|
|
20
20
|
static ConvertToString(Text: any, IsString: any): any;
|
|
21
21
|
static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
|
|
22
22
|
static getcelltype(cell: any): any;
|
|
@@ -28,7 +28,7 @@ const XLSX = __importStar(require("xlsx"));
|
|
|
28
28
|
const tr_utils_1 = require("../../../../utils/tr-utils");
|
|
29
29
|
const my_date_1 = require("../../../../utils/my-date");
|
|
30
30
|
class AnalysisXlsxFileService {
|
|
31
|
-
static GetAnalysisExcelData(MainData, isSale, searchValue, HeaderName, HeaderText) {
|
|
31
|
+
static GetAnalysisExcelData(MainData, isSale, searchValue, HeaderName, HeaderText, EntityData) {
|
|
32
32
|
this.wb = {};
|
|
33
33
|
this.ws = {};
|
|
34
34
|
this.Row = 0;
|
|
@@ -66,7 +66,7 @@ class AnalysisXlsxFileService {
|
|
|
66
66
|
// console.log(`${key}: ${searchValue[key]}`);
|
|
67
67
|
}
|
|
68
68
|
this.setHeadingInCell(HeaderName, showSearch, HeaderText);
|
|
69
|
-
this.setInvoiceDetailsInCell(MainData, isSale, HeaderText);
|
|
69
|
+
this.setInvoiceDetailsInCell(MainData, isSale, HeaderText, EntityData.User.TZ);
|
|
70
70
|
this.ws['!ref'] = XLSX.utils.encode_range(this.range);
|
|
71
71
|
this.ws['!merges'] = this.MergeArray;
|
|
72
72
|
this.ws["!cols"] = [{ wch: 50 }, { wch: 10 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }];
|
|
@@ -212,14 +212,14 @@ class AnalysisXlsxFileService {
|
|
|
212
212
|
});
|
|
213
213
|
this.Row += 2;
|
|
214
214
|
}
|
|
215
|
-
static setInvoiceDetailsInCell(MainData, isSale, HeaderText) {
|
|
215
|
+
static setInvoiceDetailsInCell(MainData, isSale, HeaderText, TZ) {
|
|
216
216
|
MainData.forEach((InvoiceList) => {
|
|
217
|
-
this.SetInvoiceDataInExcel(InvoiceList, isSale, HeaderText);
|
|
217
|
+
this.SetInvoiceDataInExcel(InvoiceList, isSale, HeaderText, TZ);
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
|
-
static SetInvoiceDataInExcel(InvoiceInfo, isSale, HeaderText) {
|
|
220
|
+
static SetInvoiceDataInExcel(InvoiceInfo, isSale, HeaderText, TZ) {
|
|
221
221
|
if (HeaderText === 'Month') {
|
|
222
|
-
InvoiceInfo._id = my_date_1.MyDate.GetMonthName(InvoiceInfo._id);
|
|
222
|
+
InvoiceInfo._id = my_date_1.MyDate.GetMonthName(InvoiceInfo._id, TZ);
|
|
223
223
|
}
|
|
224
224
|
else {
|
|
225
225
|
InvoiceInfo._id = my_date_1.MyDate.ConvertUTCDateToReadable(InvoiceInfo._id);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare class AnalysisPDFService {
|
|
2
|
-
static GetAnalysisPDFPrint(InvoicesData: any,
|
|
2
|
+
static GetAnalysisPDFPrint(InvoicesData: any, EntityData: any, isPhar: boolean, isHC: boolean, IsSales: boolean, HeaerName: any, searchValue: any, HeaderText: any): {
|
|
3
3
|
info: {
|
|
4
4
|
title: string;
|
|
5
5
|
};
|
|
@@ -205,9 +205,9 @@ export declare class AnalysisPDFService {
|
|
|
205
205
|
};
|
|
206
206
|
};
|
|
207
207
|
};
|
|
208
|
-
static GetInvoiceDataTable(InvoicesData: any, isPhar: boolean, isHC: boolean, IsSales: boolean, HeaderText: any): any;
|
|
208
|
+
static GetInvoiceDataTable(InvoicesData: any, isPhar: boolean, isHC: boolean, IsSales: boolean, HeaderText: any, UserTimeZone: any): any;
|
|
209
209
|
static getTableWidths(isHC: any): (string | number)[];
|
|
210
|
-
static GetItemsTable(InvoiceData: any, isPhar: boolean, isHC: boolean, IsSales: boolean, HeaderText: any): {
|
|
210
|
+
static GetItemsTable(InvoiceData: any, isPhar: boolean, isHC: boolean, IsSales: boolean, HeaderText: any, UserTimeZone: any): {
|
|
211
211
|
style: string;
|
|
212
212
|
marginTop: number;
|
|
213
213
|
marginBottom: number;
|
|
@@ -223,6 +223,6 @@ export declare class AnalysisPDFService {
|
|
|
223
223
|
vLineColor: (i: any, node: any) => string;
|
|
224
224
|
};
|
|
225
225
|
};
|
|
226
|
-
static BuildTableBodyForLaborAndParts(InvoiceData: any, isPhar: boolean, isHC: boolean, IsSales: boolean, HeaderText: any): any;
|
|
226
|
+
static BuildTableBodyForLaborAndParts(InvoiceData: any, isPhar: boolean, isHC: boolean, IsSales: boolean, HeaderText: any, UserTimeZone: any): any;
|
|
227
227
|
static GetHeaderNames(isPhar: boolean, isHC: boolean, HeaderText: any): any;
|
|
228
228
|
}
|
|
@@ -5,7 +5,7 @@ const shared_pdf_service_1 = require("../../../../shared/shared-pdf.service");
|
|
|
5
5
|
const my_date_1 = require("../../../../utils/my-date");
|
|
6
6
|
const tr_utils_1 = require("../../../../utils/tr-utils");
|
|
7
7
|
class AnalysisPDFService {
|
|
8
|
-
static GetAnalysisPDFPrint(InvoicesData,
|
|
8
|
+
static GetAnalysisPDFPrint(InvoicesData, EntityData, isPhar, isHC, IsSales, HeaerName, searchValue, HeaderText) {
|
|
9
9
|
var dd = {
|
|
10
10
|
info: {
|
|
11
11
|
title: 'Analysis',
|
|
@@ -15,18 +15,18 @@ class AnalysisPDFService {
|
|
|
15
15
|
},
|
|
16
16
|
pageMargins: [10, 15, 10, 15],
|
|
17
17
|
content: [
|
|
18
|
-
{ text: '' +
|
|
18
|
+
{ text: '' + EntityData.Entity.DName + '', style: ['header'] },
|
|
19
19
|
{ text: HeaerName, alignment: 'center', fontSize: 15, bold: true },
|
|
20
20
|
shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
|
|
21
|
-
this.GetInvoiceDataTable(InvoicesData, isPhar, isHC, IsSales, HeaderText),
|
|
21
|
+
this.GetInvoiceDataTable(InvoicesData, isPhar, isHC, IsSales, HeaderText, EntityData.User.TZ),
|
|
22
22
|
],
|
|
23
23
|
styles: shared_pdf_service_1.SharedPDFService.GetStyles()
|
|
24
24
|
};
|
|
25
25
|
return dd;
|
|
26
26
|
}
|
|
27
|
-
static GetInvoiceDataTable(InvoicesData, isPhar, isHC, IsSales, HeaderText) {
|
|
27
|
+
static GetInvoiceDataTable(InvoicesData, isPhar, isHC, IsSales, HeaderText, UserTimeZone) {
|
|
28
28
|
let Data = [];
|
|
29
|
-
Data.push(this.GetItemsTable(InvoicesData, isPhar, isHC, IsSales, HeaderText));
|
|
29
|
+
Data.push(this.GetItemsTable(InvoicesData, isPhar, isHC, IsSales, HeaderText, UserTimeZone));
|
|
30
30
|
return Data;
|
|
31
31
|
}
|
|
32
32
|
static getTableWidths(isHC) {
|
|
@@ -36,7 +36,8 @@ class AnalysisPDFService {
|
|
|
36
36
|
// return [25, '*', 40, 40, 80];
|
|
37
37
|
// }
|
|
38
38
|
}
|
|
39
|
-
static GetItemsTable(InvoiceData, isPhar, isHC, IsSales, HeaderText) {
|
|
39
|
+
static GetItemsTable(InvoiceData, isPhar, isHC, IsSales, HeaderText, UserTimeZone) {
|
|
40
|
+
// InvoiceData.forEach((InvoiceData: any) => {
|
|
40
41
|
return {
|
|
41
42
|
style: 'tableExample',
|
|
42
43
|
marginTop: 3,
|
|
@@ -44,7 +45,7 @@ class AnalysisPDFService {
|
|
|
44
45
|
table: {
|
|
45
46
|
widths: this.getTableWidths(isHC),
|
|
46
47
|
headerRows: 1,
|
|
47
|
-
body: this.BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC, IsSales, HeaderText)
|
|
48
|
+
body: this.BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC, IsSales, HeaderText, UserTimeZone)
|
|
48
49
|
},
|
|
49
50
|
layout: {
|
|
50
51
|
hLineWidth: function (i, node) {
|
|
@@ -62,13 +63,13 @@ class AnalysisPDFService {
|
|
|
62
63
|
}
|
|
63
64
|
};
|
|
64
65
|
}
|
|
65
|
-
static BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC, IsSales, HeaderText) {
|
|
66
|
+
static BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC, IsSales, HeaderText, UserTimeZone) {
|
|
66
67
|
let body = this.GetHeaderNames(isPhar, isHC, HeaderText);
|
|
67
68
|
InvoiceData.forEach((invoice, index) => {
|
|
68
69
|
let dataRow = [];
|
|
69
70
|
dataRow.push({ text: index + 1 });
|
|
70
71
|
if (HeaderText === 'Month') {
|
|
71
|
-
dataRow.push({ text: my_date_1.MyDate.GetMonthName(invoice._id), style: ['headerstyle'], });
|
|
72
|
+
dataRow.push({ text: my_date_1.MyDate.GetMonthName(invoice._id, UserTimeZone), style: ['headerstyle'], });
|
|
72
73
|
}
|
|
73
74
|
else {
|
|
74
75
|
dataRow.push({ text: my_date_1.MyDate.ConvertUTCDateToReadable(invoice._id), style: ['headerstyle'], });
|
|
@@ -16,8 +16,6 @@ class CategoryWiseItemPDFService {
|
|
|
16
16
|
content: [
|
|
17
17
|
{ text: '' + CName + '', style: ['header'] },
|
|
18
18
|
{ text: isSale ? 'Category Wise Item Sales' : 'Category Wise Service Sales', alignment: 'center', fontSize: 15, bold: true },
|
|
19
|
-
// { text: 'As of ' + MyDate.ConvertUTCDateToReadable(MyDate.GetDateTimeNowInUTC()), alignment: 'center', fontSize: 10 },
|
|
20
|
-
// SharedPDFService.HeaderAfterLine(),
|
|
21
19
|
shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
|
|
22
20
|
this.GetInvoiceDataTable(InvoicesData, isPhar, isHC, isSale),
|
|
23
21
|
],
|
|
@@ -17,8 +17,6 @@ class CustWiseSalesDetailsService {
|
|
|
17
17
|
content: [
|
|
18
18
|
{ text: '' + CName + '', style: ['header'] },
|
|
19
19
|
{ text: isSale ? 'Customer Wise Sales Details' : 'Vendor Wise Purchases Details', alignment: 'center', fontSize: 15, bold: true },
|
|
20
|
-
// { text: 'As of ' + MyDate.ConvertUTCDateToReadable(MyDate.GetDateTimeNowInUTC()), alignment: 'center', fontSize: 10 },
|
|
21
|
-
// SharedPDFService.HeaderAfterLine(),
|
|
22
20
|
shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
|
|
23
21
|
this.GetInvoiceDataTable(InvoicesData, isPhar, isHC, isSale),
|
|
24
22
|
],
|
|
@@ -16,8 +16,6 @@ class SalesByCustomerPDFService {
|
|
|
16
16
|
content: [
|
|
17
17
|
{ text: '' + CName + '', style: ['header'] },
|
|
18
18
|
{ text: HeaerName, alignment: 'center', fontSize: 15, bold: true },
|
|
19
|
-
// { text: 'As of ' + MyDate.ConvertUTCDateToReadable(MyDate.GetDateTimeNowInUTC()), alignment: 'center', fontSize: 10 },
|
|
20
|
-
// SharedPDFService.HeaderAfterLine(),
|
|
21
19
|
shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
|
|
22
20
|
this.GetInvoiceDataTable(InvoicesData, isPhar, isHC, IsSales),
|
|
23
21
|
],
|
|
@@ -16,8 +16,6 @@ class ItemWiseDoctorSalePDFService {
|
|
|
16
16
|
content: [
|
|
17
17
|
{ text: '' + CName + '', style: ['header'] },
|
|
18
18
|
{ text: 'Item Wise Doctor Sale', alignment: 'center', fontSize: 15, bold: true },
|
|
19
|
-
// { text: 'As of ' + MyDate.ConvertUTCDateToReadable(MyDate.GetDateTimeNowInUTC()), alignment: 'center', fontSize: 10 },
|
|
20
|
-
// SharedPDFService.HeaderAfterLine(),
|
|
21
19
|
shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
|
|
22
20
|
this.GetInvoiceDataTable(InvoicesData),
|
|
23
21
|
],
|
|
@@ -16,8 +16,6 @@ class ItemWiseSalesPDFService {
|
|
|
16
16
|
content: [
|
|
17
17
|
{ text: '' + CName + '', style: ['header'] },
|
|
18
18
|
{ text: HeaerName, alignment: 'center', fontSize: 15, bold: true },
|
|
19
|
-
// { text: 'As of ' + MyDate.ConvertUTCDateToReadable(MyDate.GetDateTimeNowInUTC()), alignment: 'center', fontSize: 10 },
|
|
20
|
-
// SharedPDFService.HeaderAfterLine(),
|
|
21
19
|
shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
|
|
22
20
|
this.GetInvoiceDataTable(InvoicesData),
|
|
23
21
|
],
|
|
@@ -16,8 +16,6 @@ class ManfWiseSalesService {
|
|
|
16
16
|
content: [
|
|
17
17
|
{ text: '' + CName + '', style: ['header'] },
|
|
18
18
|
{ text: HeaderName, alignment: 'center', fontSize: 15, bold: true },
|
|
19
|
-
// { text: 'As of ' + MyDate.ConvertUTCDateToReadable(MyDate.GetDateTimeNowInUTC()), alignment: 'center', fontSize: 10 },
|
|
20
|
-
// SharedPDFService.HeaderAfterLine(),
|
|
21
19
|
shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
|
|
22
20
|
this.GetInvoiceDataTable(InvoicesData, isPhar, isHC, isSale),
|
|
23
21
|
],
|
|
@@ -18,8 +18,6 @@ class OperatorWiseSalesDetailsPDF {
|
|
|
18
18
|
content: [
|
|
19
19
|
{ text: '' + CName + '', style: ['header'] },
|
|
20
20
|
{ text: isSale ? 'Operator Wise Sales Details' : 'Doctor Wise Sales Details', alignment: 'center', fontSize: 15, bold: true },
|
|
21
|
-
// { text: 'As of ' + MyDate.ConvertUTCDateToReadable(MyDate.GetDateTimeNowInUTC()), alignment: 'center', fontSize: 10 },
|
|
22
|
-
// SharedPDFService.HeaderAfterLine(),
|
|
23
21
|
shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
|
|
24
22
|
this.GetInvoiceDataTable(InvoicesData, isPhar, isHC),
|
|
25
23
|
],
|
|
@@ -16,8 +16,6 @@ class OperatorWiseSalesSummaryPDF {
|
|
|
16
16
|
content: [
|
|
17
17
|
{ text: '' + CName + '', style: ['header'] },
|
|
18
18
|
{ text: HeaderName, alignment: 'center', fontSize: 15, bold: true },
|
|
19
|
-
// { text: 'As of ' + MyDate.ConvertUTCDateToReadable(MyDate.GetDateTimeNowInUTC()), alignment: 'center', fontSize: 10 },
|
|
20
|
-
// SharedPDFService.HeaderAfterLine(),
|
|
21
19
|
shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
|
|
22
20
|
this.GetInvoiceDataTable(InvoicesData, isPhar, isHC),
|
|
23
21
|
],
|
|
@@ -16,8 +16,6 @@ class SalesByServiceSummaryPDF {
|
|
|
16
16
|
content: [
|
|
17
17
|
{ text: '' + CName + '', style: ['header'] },
|
|
18
18
|
{ text: HeaderName, alignment: 'center', fontSize: 15, bold: true },
|
|
19
|
-
// { text: 'As of ' + MyDate.ConvertUTCDateToReadable(MyDate.GetDateTimeNowInUTC()), alignment: 'center', fontSize: 10 },
|
|
20
|
-
// SharedPDFService.HeaderAfterLine(),
|
|
21
19
|
shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
|
|
22
20
|
this.GetInvoiceDataTable(InvoicesData, ForService),
|
|
23
21
|
],
|
|
@@ -17,8 +17,6 @@ class ScheduledDrugPDFService {
|
|
|
17
17
|
content: [
|
|
18
18
|
{ text: '' + CName + '', style: ['header'] },
|
|
19
19
|
{ text: 'Schedule Wise Drug Sales', alignment: 'center', fontSize: 15, bold: true },
|
|
20
|
-
// { text: 'As of ' + MyDate.ConvertUTCDateToReadable(MyDate.GetDateTimeNowInUTC()), alignment: 'center', fontSize: 10 },
|
|
21
|
-
// SharedPDFService.HeaderAfterLine(),
|
|
22
20
|
shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
|
|
23
21
|
this.GetInvoiceDataTable(InvoicesData),
|
|
24
22
|
],
|
|
@@ -16,8 +16,6 @@ class ScheduledDrugSummaryPDFService {
|
|
|
16
16
|
content: [
|
|
17
17
|
{ text: '' + CName + '', style: ['header'] },
|
|
18
18
|
{ text: 'Schedule Wise Drug Sales', alignment: 'center', fontSize: 15, bold: true },
|
|
19
|
-
// { text: 'As of ' + MyDate.ConvertUTCDateToReadable(MyDate.GetDateTimeNowInUTC()), alignment: 'center', fontSize: 10 },
|
|
20
|
-
// SharedPDFService.HeaderAfterLine(),
|
|
21
19
|
shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
|
|
22
20
|
this.GetInvoiceDataTable(InvoicesData),
|
|
23
21
|
],
|
|
@@ -703,7 +703,7 @@ class SharedInvoiceprintService {
|
|
|
703
703
|
stack: [
|
|
704
704
|
{
|
|
705
705
|
columns: [{ text: '' }, { text: 'Gate Pass', bold: true, fontSize: 9, alignment: 'center', marginTop: 5 },
|
|
706
|
-
{ text: 'Date: ' + my_date_1.MyDate.ConvertUTCDateToReadable(my_date_1.MyDate.GetDateTimeNowInUTC()), marginTop: 5, fontSize: 9, alignment: 'right' }]
|
|
706
|
+
{ text: 'Date: ' + my_date_1.MyDate.ConvertUTCDateToReadable(my_date_1.MyDate.GetDateTimeNowInUTC(ROPrintData.Entity.User.TZ)), marginTop: 5, fontSize: 9, alignment: 'right' }]
|
|
707
707
|
},
|
|
708
708
|
{ text: ROPrintData.Entity.CName, alignment: 'center', bold: true, fontSize: 12, marginTop: 5, marginBottom: 5 },
|
|
709
709
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare class CustomerBalancesService {
|
|
2
|
-
static GetCustomerBalancesPrint(InvoicesData: any,
|
|
2
|
+
static GetCustomerBalancesPrint(InvoicesData: any, EntityData: any, isPhar: boolean, isHC: boolean): {
|
|
3
3
|
info: {
|
|
4
4
|
title: string;
|
|
5
5
|
};
|
|
@@ -5,7 +5,7 @@ const shared_pdf_service_1 = require("../../../../shared/shared-pdf.service");
|
|
|
5
5
|
const my_date_1 = require("../../../../utils/my-date");
|
|
6
6
|
const tr_utils_1 = require("../../../../utils/tr-utils");
|
|
7
7
|
class CustomerBalancesService {
|
|
8
|
-
static GetCustomerBalancesPrint(InvoicesData,
|
|
8
|
+
static GetCustomerBalancesPrint(InvoicesData, EntityData, isPhar, isHC) {
|
|
9
9
|
var dd = {
|
|
10
10
|
info: {
|
|
11
11
|
title: 'CustomerBalances',
|
|
@@ -15,9 +15,9 @@ class CustomerBalancesService {
|
|
|
15
15
|
},
|
|
16
16
|
pageMargins: [10, 15, 10, 15],
|
|
17
17
|
content: [
|
|
18
|
-
{ text: '' +
|
|
18
|
+
{ text: '' + EntityData.Entity.DName + '', style: ['header'] },
|
|
19
19
|
{ text: 'Customer Balances', alignment: 'center', fontSize: 15, bold: true },
|
|
20
|
-
{ text: 'As of ' + my_date_1.MyDate.ConvertUTCDateToReadable(my_date_1.MyDate.GetDateTimeNowInUTC()), alignment: 'center', fontSize: 10 },
|
|
20
|
+
{ text: 'As of ' + my_date_1.MyDate.ConvertUTCDateToReadable(my_date_1.MyDate.GetDateTimeNowInUTC(EntityData.User.TZ)), alignment: 'center', fontSize: 10 },
|
|
21
21
|
// SharedPDFService.HeaderAfterLine(),
|
|
22
22
|
this.GetInvoiceDataTable(InvoicesData, isPhar, isHC),
|
|
23
23
|
],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare class PaymentsReportPDFService {
|
|
2
|
-
static GetPaymentsReportPrint(InvoicesData: any,
|
|
2
|
+
static GetPaymentsReportPrint(InvoicesData: any, EntityData: any, HeaerName: any, ispur: boolean, isSale: boolean, searchValue: any): {
|
|
3
3
|
info: {
|
|
4
4
|
title: string;
|
|
5
5
|
};
|
|
@@ -205,9 +205,9 @@ export declare class PaymentsReportPDFService {
|
|
|
205
205
|
};
|
|
206
206
|
};
|
|
207
207
|
};
|
|
208
|
-
static GetInvoiceDataTable(InvoicesData: any, ispur: boolean, isSale: boolean): any;
|
|
208
|
+
static GetInvoiceDataTable(InvoicesData: any, ispur: boolean, isSale: boolean, UserTimeZone: any): any;
|
|
209
209
|
static getTableWidths(): (string | number)[];
|
|
210
|
-
static GetItemsTable(InvoiceData: any, ispur: boolean, isSale: boolean): {
|
|
210
|
+
static GetItemsTable(InvoiceData: any, ispur: boolean, isSale: boolean, UserTimeZone: any): {
|
|
211
211
|
style: string;
|
|
212
212
|
marginTop: number;
|
|
213
213
|
marginBottom: number;
|
|
@@ -223,6 +223,6 @@ export declare class PaymentsReportPDFService {
|
|
|
223
223
|
vLineColor: (i: any, node: any) => string;
|
|
224
224
|
};
|
|
225
225
|
};
|
|
226
|
-
static BuildTableBodyForLaborAndParts(InvoiceData: any, ispur: boolean, isSale: boolean): any;
|
|
226
|
+
static BuildTableBodyForLaborAndParts(InvoiceData: any, ispur: boolean, isSale: boolean, UserTimeZone: any): any;
|
|
227
227
|
static GetHeaderNames(ispur: boolean): any;
|
|
228
228
|
}
|
|
@@ -5,7 +5,7 @@ const shared_pdf_service_1 = require("../../../../shared/shared-pdf.service");
|
|
|
5
5
|
const my_date_1 = require("../../../../utils/my-date");
|
|
6
6
|
const tr_utils_1 = require("../../../../utils/tr-utils");
|
|
7
7
|
class PaymentsReportPDFService {
|
|
8
|
-
static GetPaymentsReportPrint(InvoicesData,
|
|
8
|
+
static GetPaymentsReportPrint(InvoicesData, EntityData, HeaerName, ispur, isSale, searchValue) {
|
|
9
9
|
var dd = {
|
|
10
10
|
info: {
|
|
11
11
|
title: 'PaymentReport',
|
|
@@ -15,21 +15,19 @@ class PaymentsReportPDFService {
|
|
|
15
15
|
},
|
|
16
16
|
pageMargins: [10, 15, 10, 15],
|
|
17
17
|
content: [
|
|
18
|
-
{ text: '' +
|
|
18
|
+
{ text: '' + EntityData.Entity.DName + '', style: ['header'] },
|
|
19
19
|
{ text: HeaerName, alignment: 'center', fontSize: 15, bold: true },
|
|
20
|
-
// { text: 'As of ' + MyDate.ConvertUTCDateToReadable(MyDate.GetDateTimeNowInUTC()), alignment: 'center', fontSize: 10 },
|
|
21
|
-
// SharedPDFService.HeaderAfterLine(),
|
|
22
20
|
shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
|
|
23
|
-
this.GetInvoiceDataTable(InvoicesData, ispur, isSale),
|
|
21
|
+
this.GetInvoiceDataTable(InvoicesData, ispur, isSale, EntityData.User.TZ),
|
|
24
22
|
],
|
|
25
23
|
styles: shared_pdf_service_1.SharedPDFService.GetStyles()
|
|
26
24
|
};
|
|
27
25
|
return dd;
|
|
28
26
|
}
|
|
29
|
-
static GetInvoiceDataTable(InvoicesData, ispur, isSale) {
|
|
27
|
+
static GetInvoiceDataTable(InvoicesData, ispur, isSale, UserTimeZone) {
|
|
30
28
|
let Data = [];
|
|
31
29
|
// InvoicesData.forEach((invoice: any) => {
|
|
32
|
-
Data.push(this.GetItemsTable(InvoicesData, ispur, isSale));
|
|
30
|
+
Data.push(this.GetItemsTable(InvoicesData, ispur, isSale, UserTimeZone));
|
|
33
31
|
// });
|
|
34
32
|
return Data;
|
|
35
33
|
}
|
|
@@ -40,7 +38,7 @@ class PaymentsReportPDFService {
|
|
|
40
38
|
// return [25, '*', 40, 40, 80];
|
|
41
39
|
// }
|
|
42
40
|
}
|
|
43
|
-
static GetItemsTable(InvoiceData, ispur, isSale) {
|
|
41
|
+
static GetItemsTable(InvoiceData, ispur, isSale, UserTimeZone) {
|
|
44
42
|
// InvoicesData.forEach((InvoiceData: any) => {
|
|
45
43
|
return {
|
|
46
44
|
style: 'tableExample',
|
|
@@ -49,7 +47,7 @@ class PaymentsReportPDFService {
|
|
|
49
47
|
table: {
|
|
50
48
|
widths: this.getTableWidths(),
|
|
51
49
|
headerRows: 1,
|
|
52
|
-
body: this.BuildTableBodyForLaborAndParts(InvoiceData, ispur, isSale)
|
|
50
|
+
body: this.BuildTableBodyForLaborAndParts(InvoiceData, ispur, isSale, UserTimeZone)
|
|
53
51
|
// body:[['fsdfsdf','asfafdas','asdasdas','asdasdasd','asddass']]
|
|
54
52
|
},
|
|
55
53
|
layout: {
|
|
@@ -72,7 +70,7 @@ class PaymentsReportPDFService {
|
|
|
72
70
|
};
|
|
73
71
|
// });
|
|
74
72
|
}
|
|
75
|
-
static BuildTableBodyForLaborAndParts(InvoiceData, ispur, isSale) {
|
|
73
|
+
static BuildTableBodyForLaborAndParts(InvoiceData, ispur, isSale, UserTimeZone) {
|
|
76
74
|
let body = this.GetHeaderNames(ispur);
|
|
77
75
|
InvoiceData.forEach((invoice, index) => {
|
|
78
76
|
var _a;
|
|
@@ -80,7 +78,7 @@ class PaymentsReportPDFService {
|
|
|
80
78
|
dataRow.push({ text: index + 1 });
|
|
81
79
|
dataRow.push({ text: invoice.Code, style: ['headerstyle'], });
|
|
82
80
|
dataRow.push({ text: isSale ? invoice.CustName : invoice.Name });
|
|
83
|
-
dataRow.push({ text: isSale ? my_date_1.MyDate.ConvertUTCDateTimeToReadable(invoice.Pay.Dt) : my_date_1.MyDate.ConvertUTCDateTimeToReadable(invoice.Date) });
|
|
81
|
+
dataRow.push({ text: isSale ? my_date_1.MyDate.ConvertUTCDateTimeToReadable(invoice.Pay.Dt, UserTimeZone) : my_date_1.MyDate.ConvertUTCDateTimeToReadable(invoice.Date, UserTimeZone) });
|
|
84
82
|
dataRow.push({ text: isSale ? invoice.Pay.Type : invoice.PType });
|
|
85
83
|
dataRow.push({ text: isSale ? tr_utils_1.TrUtils.FixPriceValue((_a = invoice.Pay) === null || _a === void 0 ? void 0 : _a.Amt) : tr_utils_1.TrUtils.FixPriceValue(invoice.Amt), alignment: 'right' });
|
|
86
84
|
body.push(dataRow);
|
|
@@ -215,7 +215,7 @@ export declare class ConsultationFeeReceiptPrintService {
|
|
|
215
215
|
static GetPhoneNumber(phone: any): string;
|
|
216
216
|
static getDoctorName(DocName: any): any;
|
|
217
217
|
static GetPhone(Phone: any): any;
|
|
218
|
-
static DifferenceInYears(DOB: any): string;
|
|
218
|
+
static DifferenceInYears(DOB: any, TZ: any): string;
|
|
219
219
|
static HeaderLayOut(): {
|
|
220
220
|
hLineWidth: (i: any, node: any) => 0 | 1;
|
|
221
221
|
vLineWidth: (i: any, node: any) => 0 | 1;
|
|
@@ -95,7 +95,7 @@ class ConsultationFeeReceiptPrintService {
|
|
|
95
95
|
{
|
|
96
96
|
columns: [{
|
|
97
97
|
stack: [{ text: CnstData.Pat.Name, fontSize: 10, marginTop: 5 },
|
|
98
|
-
{ text: CnstData.Pat.Code + ' | ' + this.DifferenceInYears(CnstData.Pat.DOB) + ' | ' + CnstData.Pat.Sex + this.GetPhoneNumber((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Pat) === null || _a === void 0 ? void 0 : _a.Ph), fontSize: 10, marginBottom: 5 }]
|
|
98
|
+
{ text: CnstData.Pat.Code + ' | ' + this.DifferenceInYears(CnstData.Pat.DOB, Entity.User.TZ) + ' | ' + CnstData.Pat.Sex + this.GetPhoneNumber((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Pat) === null || _a === void 0 ? void 0 : _a.Ph), fontSize: 10, marginBottom: 5 }]
|
|
99
99
|
},
|
|
100
100
|
{
|
|
101
101
|
stack: [{ text: 'Bill No : ' + CnstData.Code, style: ['headerstyle'] },
|
|
@@ -149,11 +149,11 @@ class ConsultationFeeReceiptPrintService {
|
|
|
149
149
|
return Phone;
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
static DifferenceInYears(DOB) {
|
|
152
|
+
static DifferenceInYears(DOB, TZ) {
|
|
153
153
|
if (tr_utils_1.TrUtils.IsNull(DOB)) {
|
|
154
154
|
return 'DOB Not Specified';
|
|
155
155
|
}
|
|
156
|
-
const result = (0, date_fns_1.differenceInYears)(my_date_1.MyDate.GetDateTimeNowInUTC(), new Date(DOB));
|
|
156
|
+
const result = (0, date_fns_1.differenceInYears)(my_date_1.MyDate.GetDateTimeNowInUTC(TZ), new Date(DOB));
|
|
157
157
|
return result + ' Years';
|
|
158
158
|
}
|
|
159
159
|
static HeaderLayOut() {
|
|
@@ -96,7 +96,7 @@ export declare class ConsultationFullPrintService {
|
|
|
96
96
|
width: number;
|
|
97
97
|
})[];
|
|
98
98
|
})[];
|
|
99
|
-
static GetCnsltDate(CnstData: any): string | null;
|
|
99
|
+
static GetCnsltDate(CnstData: any, User: any): string | null;
|
|
100
100
|
static GetHeaderBasedOnCondition(CnstData: any, Entity: any, HeaderName: any, Image: any, HColor: any, AColor: any, text: any): {
|
|
101
101
|
columns: ({
|
|
102
102
|
columns: any;
|
|
@@ -161,7 +161,7 @@ export declare class ConsultationFullPrintService {
|
|
|
161
161
|
static GetPhoneNumber(phone: any): string;
|
|
162
162
|
static getDoctorName(DocName: any): any;
|
|
163
163
|
static GetPhone(Phone: any): any;
|
|
164
|
-
static DifferenceInYears(DOB: any): string;
|
|
164
|
+
static DifferenceInYears(DOB: any, TZ: any): string;
|
|
165
165
|
static HeaderLayOut(): {
|
|
166
166
|
hLineWidth: (i: any, node: any) => 0 | 1;
|
|
167
167
|
vLineWidth: (i: any, node: any) => 0 | 1;
|
|
@@ -76,22 +76,22 @@ class ConsultationFullPrintService {
|
|
|
76
76
|
{
|
|
77
77
|
columns: [{
|
|
78
78
|
stack: [{ text: CnstData.Pat.Name, fontSize: 10, marginTop: 5, bold: true },
|
|
79
|
-
{ text: CnstData.Pat.Code + ' | ' + this.DifferenceInYears(CnstData.Pat.DOB) + ' | ' + CnstData.Pat.Sex + this.GetPhoneNumber((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Pat) === null || _a === void 0 ? void 0 : _a.Ph), fontSize: 10, marginBottom: 5 }]
|
|
79
|
+
{ text: CnstData.Pat.Code + ' | ' + this.DifferenceInYears(CnstData.Pat.DOB, Entity.User.TZ) + ' | ' + CnstData.Pat.Sex + this.GetPhoneNumber((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Pat) === null || _a === void 0 ? void 0 : _a.Ph), fontSize: 10, marginBottom: 5 }]
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
stack: [
|
|
83
|
-
{ text: this.GetCnsltDate(CnstData), style: ['headerstyle'] }
|
|
83
|
+
{ text: this.GetCnsltDate(CnstData, Entity.User), style: ['headerstyle'] }
|
|
84
84
|
], marginTop: 5, width: 120
|
|
85
85
|
}]
|
|
86
86
|
}
|
|
87
87
|
];
|
|
88
88
|
}
|
|
89
|
-
static GetCnsltDate(CnstData) {
|
|
89
|
+
static GetCnsltDate(CnstData, User) {
|
|
90
90
|
if (!tr_utils_1.TrUtils.IsNull(CnstData.ClDate)) {
|
|
91
|
-
return my_date_1.MyDate.GetWeekDateAndTime(CnstData.ClDate);
|
|
91
|
+
return my_date_1.MyDate.GetWeekDateAndTime(CnstData.ClDate, User.TZ);
|
|
92
92
|
}
|
|
93
93
|
else {
|
|
94
|
-
return my_date_1.MyDate.GetWeekDateAndTime(CnstData.CrDate);
|
|
94
|
+
return my_date_1.MyDate.GetWeekDateAndTime(CnstData.CrDate, User.TZ);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
static GetHeaderBasedOnCondition(CnstData, Entity, HeaderName, Image, HColor, AColor, text) {
|
|
@@ -141,11 +141,11 @@ class ConsultationFullPrintService {
|
|
|
141
141
|
return Phone;
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
static DifferenceInYears(DOB) {
|
|
144
|
+
static DifferenceInYears(DOB, TZ) {
|
|
145
145
|
if (tr_utils_1.TrUtils.IsNull(DOB)) {
|
|
146
146
|
return 'DOB Not Specified';
|
|
147
147
|
}
|
|
148
|
-
const result = (0, date_fns_1.differenceInYears)(my_date_1.MyDate.GetDateTimeNowInUTC(), new Date(DOB));
|
|
148
|
+
const result = (0, date_fns_1.differenceInYears)(my_date_1.MyDate.GetDateTimeNowInUTC(TZ), new Date(DOB));
|
|
149
149
|
return result + ' Years';
|
|
150
150
|
}
|
|
151
151
|
static HeaderLayOut() {
|
|
@@ -145,7 +145,7 @@ export declare class ConsultationLetterHeadPDFService {
|
|
|
145
145
|
width: number;
|
|
146
146
|
})[];
|
|
147
147
|
}[];
|
|
148
|
-
static GetCnsltDate(CnstData: any): string | null;
|
|
148
|
+
static GetCnsltDate(CnstData: any, User: any): string | null;
|
|
149
149
|
static GetHeaderBasedOnCondition(CnstData: any, Entity: any, HeaderName: any, Image: any, HColor: any, AColor: any, text: any): {
|
|
150
150
|
columns: ({
|
|
151
151
|
columns: any;
|
|
@@ -208,10 +208,9 @@ export declare class ConsultationLetterHeadPDFService {
|
|
|
208
208
|
})[];
|
|
209
209
|
};
|
|
210
210
|
static GetPhoneNumber(phone: any): string;
|
|
211
|
-
static DifferenceInYears(DOB: any): string;
|
|
211
|
+
static DifferenceInYears(DOB: any, TZ: any): string;
|
|
212
212
|
static GetDiagnosis(Diags: any): any;
|
|
213
213
|
static GetComplaints(Comps: any): any;
|
|
214
|
-
static GetDate(DatesDetails: any): string;
|
|
215
214
|
static CustomerAndVehicleDetailsAfterLine(): {
|
|
216
215
|
canvas: {
|
|
217
216
|
type: string;
|
|
@@ -224,11 +224,11 @@ class ConsultationLetterHeadPDFService {
|
|
|
224
224
|
{
|
|
225
225
|
columns: [{
|
|
226
226
|
stack: [{ text: CnstData.Pat.Name, fontSize: 10, marginTop: 5, bold: true },
|
|
227
|
-
{ text: CnstData.Pat.Code + ' | ' + this.DifferenceInYears(CnstData.Pat.DOB) + ' | ' + CnstData.Pat.Sex + this.GetPhoneNumber((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Pat) === null || _a === void 0 ? void 0 : _a.Ph), fontSize: 10, marginBottom: 5 }]
|
|
227
|
+
{ text: CnstData.Pat.Code + ' | ' + this.DifferenceInYears(CnstData.Pat.DOB, Entity.User.TZ) + ' | ' + CnstData.Pat.Sex + this.GetPhoneNumber((_a = CnstData === null || CnstData === void 0 ? void 0 : CnstData.Pat) === null || _a === void 0 ? void 0 : _a.Ph), fontSize: 10, marginBottom: 5 }]
|
|
228
228
|
},
|
|
229
229
|
{
|
|
230
230
|
stack: [
|
|
231
|
-
{ text: this.GetCnsltDate(CnstData), style: ['headerstyle'] }
|
|
231
|
+
{ text: this.GetCnsltDate(CnstData, Entity.User), style: ['headerstyle'] }
|
|
232
232
|
], marginTop: 5, width: 120
|
|
233
233
|
}]
|
|
234
234
|
}
|
|
@@ -236,12 +236,12 @@ class ConsultationLetterHeadPDFService {
|
|
|
236
236
|
// { text: CnstData.Pat.Code + ' | ' + this.DifferenceInYears(CnstData.Pat.DOB) + ' | ' + CnstData.Pat.Sex + this.GetPhoneNumber(CnstData?.Pat?.Ph), fontSize: 10, marginBottom: 5 },
|
|
237
237
|
];
|
|
238
238
|
}
|
|
239
|
-
static GetCnsltDate(CnstData) {
|
|
239
|
+
static GetCnsltDate(CnstData, User) {
|
|
240
240
|
if (!tr_utils_1.TrUtils.IsNull(CnstData.ClDate)) {
|
|
241
|
-
return my_date_1.MyDate.GetWeekDateAndTime(CnstData.ClDate);
|
|
241
|
+
return my_date_1.MyDate.GetWeekDateAndTime(CnstData.ClDate, User.TZ);
|
|
242
242
|
}
|
|
243
243
|
else {
|
|
244
|
-
return my_date_1.MyDate.GetWeekDateAndTime(CnstData.CrDate);
|
|
244
|
+
return my_date_1.MyDate.GetWeekDateAndTime(CnstData.CrDate, User.TZ);
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
static GetHeaderBasedOnCondition(CnstData, Entity, HeaderName, Image, HColor, AColor, text) {
|
|
@@ -280,11 +280,11 @@ class ConsultationLetterHeadPDFService {
|
|
|
280
280
|
return '';
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
|
-
static DifferenceInYears(DOB) {
|
|
283
|
+
static DifferenceInYears(DOB, TZ) {
|
|
284
284
|
if (tr_utils_1.TrUtils.IsNull(DOB)) {
|
|
285
285
|
return 'DOB Not Specified';
|
|
286
286
|
}
|
|
287
|
-
let Datei = my_date_1.MyDate.GetDateTimeNowInUTC();
|
|
287
|
+
let Datei = my_date_1.MyDate.GetDateTimeNowInUTC(TZ);
|
|
288
288
|
const result = (0, date_fns_1.differenceInYears)(Datei, new Date(DOB));
|
|
289
289
|
return result + ' Years';
|
|
290
290
|
}
|
|
@@ -308,14 +308,6 @@ class ConsultationLetterHeadPDFService {
|
|
|
308
308
|
});
|
|
309
309
|
return Complaints;
|
|
310
310
|
}
|
|
311
|
-
static GetDate(DatesDetails) {
|
|
312
|
-
if (DatesDetails.Date === 'CustomRange') {
|
|
313
|
-
return my_date_1.MyDate.GetWeekAndDate(DatesDetails.StDate) + ' - ' + my_date_1.MyDate.GetWeekAndDate(DatesDetails.EnDate);
|
|
314
|
-
}
|
|
315
|
-
else {
|
|
316
|
-
return 'till ' + my_date_1.MyDate.GetWeekAndDate(DatesDetails.EnDate);
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
311
|
static CustomerAndVehicleDetailsAfterLine() {
|
|
320
312
|
return {
|
|
321
313
|
canvas: [
|