shareneus 1.4.49 → 1.4.51
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-pdf.service.js +1 -1
- package/dist/accounting/counter-sales/sales-receipt-print.service.js +1 -1
- package/dist/accounting/credit-note/credit-note-pdf.service.js +1 -1
- package/dist/accounting/debit-note/debit-note-print.service.js +1 -1
- package/dist/accounting/invoice/inv-pdf.service.js +13 -12
- package/dist/accounting/invoice/inv-print.service.js +6 -6
- package/dist/accounting/invoice/invoice-landscape-pdf.service.d.ts +1 -1
- package/dist/accounting/invoice/invoice-landscape-pdf.service.js +7 -6
- package/dist/accounting/invoice/invoice-letterhead-pdf.service.js +13 -12
- package/dist/accounting/invoice/invoice-portrait-pdf.d.ts +5 -5
- package/dist/accounting/invoice/invoice-portrait-pdf.js +31 -30
- package/dist/accounting/invoice/invoice-total.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 +8 -7
- package/dist/accounting/invoice/reports/excel/category-wise-item-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/category-wise-item-excel.service.js +14 -14
- package/dist/accounting/invoice/reports/excel/cust-wise-sales-details.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/cust-wise-sales-details.js +8 -8
- package/dist/accounting/invoice/reports/excel/cust-wise-sales-summary-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/cust-wise-sales-summary-excel.service.js +8 -8
- package/dist/accounting/invoice/reports/excel/invoice-wise-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/invoice-wise-excel.service.js +8 -8
- package/dist/accounting/invoice/reports/excel/item-wise-doctor-sale-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/item-wise-doctor-sale-excel.service.js +10 -10
- package/dist/accounting/invoice/reports/excel/items-wise-sales-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/items-wise-sales-excel.service.js +14 -13
- package/dist/accounting/invoice/reports/excel/manf-wise-sales-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/manf-wise-sales-excel.service.js +8 -8
- package/dist/accounting/invoice/reports/excel/operator-wise-details.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/operator-wise-details.js +8 -8
- package/dist/accounting/invoice/reports/excel/operator-wise-summary.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/operator-wise-summary.js +8 -8
- package/dist/accounting/invoice/reports/excel/sa-wise-labor-sales-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/sa-wise-labor-sales-excel.service.js +12 -11
- package/dist/accounting/invoice/reports/excel/sa-wise-part-sales-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/sa-wise-part-sales-excel.service.js +12 -11
- package/dist/accounting/invoice/reports/excel/sale-summary-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/sale-summary-excel.service.js +11 -10
- package/dist/accounting/invoice/reports/excel/sales-by-service-summary-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/sales-by-service-summary-excel.service.js +19 -18
- package/dist/accounting/invoice/reports/excel/scheduled-drug-summary-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/scheduled-drug-summary-excel.service.js +11 -11
- package/dist/accounting/invoice/reports/excel/scheduled-drugs-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/scheduled-drugs-excel.service.js +11 -11
- package/dist/accounting/invoice/reports/pdf/analysis-pdf.service.d.ts +3 -3
- package/dist/accounting/invoice/reports/pdf/analysis-pdf.service.js +13 -12
- package/dist/accounting/invoice/reports/pdf/category-wise-item-pdf.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/category-wise-item-pdf.service.js +14 -13
- package/dist/accounting/invoice/reports/pdf/cust-wise-sales-details-pdf.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/cust-wise-sales-details-pdf.service.js +15 -14
- package/dist/accounting/invoice/reports/pdf/cust-wise-sales-summary-pdf.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/cust-wise-sales-summary-pdf.service.js +15 -14
- package/dist/accounting/invoice/reports/pdf/item-wise-doctor-sale-pdf.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/item-wise-doctor-sale-pdf.service.js +10 -10
- package/dist/accounting/invoice/reports/pdf/item-wise-sales-pdf.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/item-wise-sales-pdf.service.js +15 -14
- package/dist/accounting/invoice/reports/pdf/manf-wise-sales-pdf.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/manf-wise-sales-pdf.service.js +13 -12
- package/dist/accounting/invoice/reports/pdf/operator-wise-details-pdf.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/operator-wise-details-pdf.service.js +14 -14
- package/dist/accounting/invoice/reports/pdf/operator-wise-summary-pdf.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/operator-wise-summary-pdf.js +14 -14
- package/dist/accounting/invoice/reports/pdf/sales-by-service-pdf.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/sales-by-service-pdf.service.js +14 -13
- package/dist/accounting/invoice/reports/pdf/scheduled-drug-pdf.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/scheduled-drug-pdf.service.js +8 -8
- package/dist/accounting/invoice/reports/pdf/scheduled-drug-summary-pdf.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/scheduled-drug-summary-pdf.service.js +12 -11
- package/dist/accounting/invoice/shared-inv-pdf.service.js +1 -1
- package/dist/accounting/payment-receive/reports/excel/cust-balance-excel.service.d.ts +4 -4
- package/dist/accounting/payment-receive/reports/excel/cust-balance-excel.service.js +9 -9
- package/dist/accounting/payment-receive/reports/excel/payment-receive-excel.service.d.ts +5 -5
- package/dist/accounting/payment-receive/reports/excel/payment-receive-excel.service.js +11 -11
- package/dist/accounting/payment-receive/reports/pdf/customer-balances-pdf.service.d.ts +3 -3
- package/dist/accounting/payment-receive/reports/pdf/customer-balances-pdf.service.js +10 -10
- package/dist/accounting/payment-receive/reports/pdf/payment-report-pdf.service.d.ts +3 -3
- package/dist/accounting/payment-receive/reports/pdf/payment-report-pdf.service.js +7 -7
- package/dist/appointments/consultations/consultation-fee-receipt.service.d.ts +1 -1
- package/dist/appointments/consultations/consultation-fee-receipt.service.js +4 -4
- package/dist/gst/excel/GSTR-RO-excel.service.d.ts +4 -4
- package/dist/gst/excel/GSTR-RO-excel.service.js +8 -8
- package/dist/gst/excel/GSTR1-excel.service.d.ts +4 -4
- package/dist/gst/excel/GSTR1-excel.service.js +10 -10
- package/dist/gst/excel/GSTR2-excel.service.d.ts +4 -4
- package/dist/gst/excel/GSTR2-excel.service.js +9 -9
- package/dist/gst/excel/tally-sales-import.service.d.ts +4 -4
- package/dist/gst/excel/tally-sales-import.service.js +8 -8
- package/dist/inventory/items/issue-parts-pdf.service.d.ts +6 -6
- package/dist/inventory/items/issue-parts-pdf.service.js +33 -33
- package/dist/inventory/items/reports/excel/expiring-drugs-excel.service.d.ts +4 -4
- package/dist/inventory/items/reports/excel/expiring-drugs-excel.service.js +11 -10
- package/dist/inventory/items/reports/excel/item-wise-mout-details.d.ts +4 -4
- package/dist/inventory/items/reports/excel/item-wise-mout-details.js +8 -8
- package/dist/inventory/items/reports/excel/item-wise-mout-summary.d.ts +4 -4
- package/dist/inventory/items/reports/excel/item-wise-mout-summary.js +8 -8
- package/dist/inventory/items/reports/excel/spares-issue-excel.service.d.ts +4 -4
- package/dist/inventory/items/reports/excel/spares-issue-excel.service.js +12 -12
- package/dist/inventory/items/reports/excel/stock-excel.service.d.ts +4 -4
- package/dist/inventory/items/reports/excel/stock-excel.service.js +8 -8
- package/dist/inventory/items/reports/pdf/expiring-drugs-pdf.service.d.ts +2 -2
- package/dist/inventory/items/reports/pdf/expiring-drugs-pdf.service.js +8 -7
- package/dist/inventory/items/reports/pdf/item-wise-mout-details-pdf.d.ts +4 -4
- package/dist/inventory/items/reports/pdf/item-wise-mout-details-pdf.js +9 -9
- package/dist/inventory/items/reports/pdf/item-wise-mout-summary-pdf.d.ts +4 -4
- package/dist/inventory/items/reports/pdf/item-wise-mout-summary-pdf.js +9 -9
- package/dist/purchases/payment-made/reports/excel/payments-made-excel.service.d.ts +4 -4
- package/dist/purchases/payment-made/reports/excel/payments-made-excel.service.js +9 -9
- package/dist/purchases/payment-made/reports/excel/ven-balance-excel.service.d.ts +6 -6
- package/dist/purchases/payment-made/reports/excel/ven-balance-excel.service.js +14 -14
- package/dist/purchases/payment-made/reports/pdf/vendor-balances-pdf.service.d.ts +3 -3
- package/dist/purchases/payment-made/reports/pdf/vendor-balances-pdf.service.js +8 -8
- package/dist/purchases/purchase-order/purchase-order-pdf.service.js +5 -5
- package/dist/purchases/purchase-order/purchase-order-print.service.d.ts +2 -2
- package/dist/purchases/purchase-order/purchase-order-print.service.js +25 -25
- package/dist/purchases/vendor-credit-note/vendor-credit-note-pdf.service.js +1 -1
- package/dist/purchases/vendor-credit-note/vendor-credit-note-print.service.d.ts +1 -1
- package/dist/purchases/vendor-credit-note/vendor-credit-note-print.service.js +20 -20
- package/dist/purchases/vendor-credit-note/vendor-credit-note-totals.service.d.ts +8 -8
- package/dist/purchases/vendor-credit-note/vendor-credit-note-totals.service.js +31 -32
- package/dist/purchases/vendor-debit-note/vendor-debit-note-pdf.service.js +1 -1
- package/dist/purchases/vendor-debit-note/vendor-debit-note-totals.service.d.ts +6 -6
- package/dist/purchases/vendor-debit-note/vendor-debit-note-totals.service.js +19 -19
- package/dist/sales/delivery-challan/dc-landscape-pdf.service.d.ts +1 -1
- package/dist/sales/delivery-challan/dc-landscape-pdf.service.js +7 -6
- package/dist/sales/delivery-challan/delivery-challan-print.service.js +2 -2
- package/dist/sales/delivery-challan/delivery-challan-totals.d.ts +6 -6
- package/dist/sales/delivery-challan/delivery-challan-totals.js +20 -20
- package/dist/sales/sales/sales-pdf.service.js +1 -1
- package/dist/sales/sales/sales-print.service.js +7 -7
- package/dist/sales/sales/sales-totals.service.d.ts +6 -6
- package/dist/sales/sales/sales-totals.service.js +19 -19
- package/dist/services/est.print-service.js +1 -1
- package/dist/services/reports/excel/insurance-expire-excel.service.d.ts +4 -4
- package/dist/services/reports/excel/insurance-expire-excel.service.js +8 -8
- package/dist/services/reports/excel/next-service-date-excel.service.d.ts +4 -4
- package/dist/services/reports/excel/next-service-date-excel.service.js +8 -8
- package/dist/services/reports/excel/repair-orders-excel.service.d.ts +5 -5
- package/dist/services/reports/excel/repair-orders-excel.service.js +11 -11
- package/dist/services/reports/pdf/repair-orders-pdf.service.d.ts +4 -4
- package/dist/services/reports/pdf/repair-orders-pdf.service.js +9 -9
- package/dist/services/ro-pdf.service.js +2 -2
- package/dist/services/ro-print-service.js +1 -1
- package/dist/services/ro-totals.service.d.ts +11 -11
- package/dist/services/ro-totals.service.js +50 -50
- package/dist/services/separate-wo-print.service.js +1 -1
- package/dist/shared/shared-pdf.service.d.ts +3 -3
- package/dist/shared/shared-pdf.service.js +31 -30
- package/dist/utils/tr-utils.d.ts +1 -1
- package/dist/utils/tr-utils.js +3 -2
- package/package.json +1 -1
|
@@ -28,7 +28,7 @@ const XLSX = __importStar(require("xlsx"));
|
|
|
28
28
|
const my_date_1 = require("../../../../utils/my-date");
|
|
29
29
|
const tr_utils_1 = require("../../../../utils/tr-utils");
|
|
30
30
|
class ItemWiseMOSummaryXlsxFileService {
|
|
31
|
-
static GetItemWiseMOSummaryExcelData(MainData, searchValue, HeaderName) {
|
|
31
|
+
static GetItemWiseMOSummaryExcelData(MainData, searchValue, HeaderName, EntitySettings) {
|
|
32
32
|
this.wb = {};
|
|
33
33
|
this.ws = {};
|
|
34
34
|
this.Row = 0;
|
|
@@ -66,7 +66,7 @@ class ItemWiseMOSummaryXlsxFileService {
|
|
|
66
66
|
// console.log(`${key}: ${searchValue[key]}`);
|
|
67
67
|
}
|
|
68
68
|
this.setHeadingInCell(HeaderName, showSearch);
|
|
69
|
-
this.setInvoiceDetailsInCell(MainData);
|
|
69
|
+
this.setInvoiceDetailsInCell(MainData, EntitySettings.DecimalsNumber);
|
|
70
70
|
this.ws['!ref'] = XLSX.utils.encode_range(this.range);
|
|
71
71
|
this.ws['!merges'] = this.MergeArray;
|
|
72
72
|
this.ws["!cols"] = [{ wch: 30 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 20 }];
|
|
@@ -207,12 +207,12 @@ class ItemWiseMOSummaryXlsxFileService {
|
|
|
207
207
|
});
|
|
208
208
|
this.Row += 2;
|
|
209
209
|
}
|
|
210
|
-
static setInvoiceDetailsInCell(MainData) {
|
|
210
|
+
static setInvoiceDetailsInCell(MainData, DecimalsNumber) {
|
|
211
211
|
MainData.forEach((InvoiceList) => {
|
|
212
|
-
this.SetInvoiceDataInExcel(InvoiceList);
|
|
212
|
+
this.SetInvoiceDataInExcel(InvoiceList, DecimalsNumber);
|
|
213
213
|
});
|
|
214
214
|
}
|
|
215
|
-
static SetInvoiceDataInExcel(InvoiceInfo) {
|
|
215
|
+
static SetInvoiceDataInExcel(InvoiceInfo, DecimalsNumber) {
|
|
216
216
|
InvoiceInfo.Date = my_date_1.MyDate.ConvertUTCDateToReadable(InvoiceInfo.CrDate);
|
|
217
217
|
let InvoiceData = [
|
|
218
218
|
// { text: InvoiceInfo.Code, ColRange: 1, IsString: true },
|
|
@@ -228,7 +228,7 @@ class ItemWiseMOSummaryXlsxFileService {
|
|
|
228
228
|
];
|
|
229
229
|
let ColStart = 0;
|
|
230
230
|
InvoiceData.forEach((InvData) => {
|
|
231
|
-
InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
|
|
231
|
+
InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
|
|
232
232
|
this.SetDataInCell(InvData.text, ColStart, this.Row);
|
|
233
233
|
this.MergeArray.push({
|
|
234
234
|
s: { r: this.Row, c: ColStart },
|
|
@@ -238,7 +238,7 @@ class ItemWiseMOSummaryXlsxFileService {
|
|
|
238
238
|
});
|
|
239
239
|
this.Row += 1;
|
|
240
240
|
}
|
|
241
|
-
static ConvertToString(Text, IsString) {
|
|
241
|
+
static ConvertToString(Text, IsString, DecimalsNumber) {
|
|
242
242
|
if (IsString) {
|
|
243
243
|
if (Text == null) {
|
|
244
244
|
Text = '';
|
|
@@ -250,7 +250,7 @@ class ItemWiseMOSummaryXlsxFileService {
|
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
if (typeof Text === 'number') {
|
|
253
|
-
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
253
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
|
|
254
254
|
}
|
|
255
255
|
else {
|
|
256
256
|
return Text;
|
|
@@ -13,13 +13,13 @@ export declare class IssueSparesXlsxFileService {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
static ws: any;
|
|
16
|
-
static GetInvoiceWiseExcelData(MainData: any, WOTypes: any): any;
|
|
16
|
+
static GetInvoiceWiseExcelData(MainData: any, WOTypes: any, EntitySettings: any): any;
|
|
17
17
|
static GetTotals(MainData: any, WOTypes: any): any;
|
|
18
18
|
static GetWOTypeName(Type: any, WOTypes: any): any;
|
|
19
19
|
static setHeadingInCell(): void;
|
|
20
|
-
static setInvoiceDetailsInCell(MainData: any): void;
|
|
21
|
-
static SetInvoiceDataInExcel(InvoiceInfo: any): void;
|
|
22
|
-
static ConvertToString(Text: any, IsString: any): any;
|
|
20
|
+
static setInvoiceDetailsInCell(MainData: any, DecimalsNumber: number): void;
|
|
21
|
+
static SetInvoiceDataInExcel(InvoiceInfo: any, DecimalsNumber: number): void;
|
|
22
|
+
static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
|
|
23
23
|
static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
|
|
24
24
|
static getcelltype(cell: any): any;
|
|
25
25
|
static ConvertDateToReadableFormat(DateObject: any): any;
|
|
@@ -27,7 +27,7 @@ exports.IssueSparesXlsxFileService = void 0;
|
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
28
|
const tr_utils_1 = require("../../../../utils/tr-utils");
|
|
29
29
|
class IssueSparesXlsxFileService {
|
|
30
|
-
static GetInvoiceWiseExcelData(MainData, WOTypes) {
|
|
30
|
+
static GetInvoiceWiseExcelData(MainData, WOTypes, EntitySettings) {
|
|
31
31
|
this.wb = {};
|
|
32
32
|
this.ws = {};
|
|
33
33
|
this.Row = 0;
|
|
@@ -40,7 +40,7 @@ class IssueSparesXlsxFileService {
|
|
|
40
40
|
this.wb.SheetNames = [];
|
|
41
41
|
MainData = this.GetTotals(MainData, WOTypes);
|
|
42
42
|
this.setHeadingInCell();
|
|
43
|
-
this.setInvoiceDetailsInCell(MainData);
|
|
43
|
+
this.setInvoiceDetailsInCell(MainData, EntitySettings.DecimalsNumber);
|
|
44
44
|
this.ws['!ref'] = XLSX.utils.encode_range(this.range);
|
|
45
45
|
this.ws['!merges'] = this.MergeArray;
|
|
46
46
|
this.ws["!cols"] = [{ wch: 15 }, { wch: 15 }, { wch: 20 }, { wch: 20 }, { wch: 10 }, { wch: 15 }, { wch: 20 }, { wch: 20 }, { wch: 10 }, { wch: 50 }, { wch: 40 }];
|
|
@@ -338,12 +338,12 @@ class IssueSparesXlsxFileService {
|
|
|
338
338
|
});
|
|
339
339
|
this.Row += 2;
|
|
340
340
|
}
|
|
341
|
-
static setInvoiceDetailsInCell(MainData) {
|
|
341
|
+
static setInvoiceDetailsInCell(MainData, DecimalsNumber) {
|
|
342
342
|
MainData.forEach((InvoiceList) => {
|
|
343
|
-
this.SetInvoiceDataInExcel(InvoiceList);
|
|
343
|
+
this.SetInvoiceDataInExcel(InvoiceList, DecimalsNumber);
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
|
-
static SetInvoiceDataInExcel(InvoiceInfo) {
|
|
346
|
+
static SetInvoiceDataInExcel(InvoiceInfo, DecimalsNumber) {
|
|
347
347
|
InvoiceInfo.CrDate = this.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
|
|
348
348
|
InvoiceInfo.WCrDate = this.ConvertDateToReadableFormat(InvoiceInfo.WCrDate);
|
|
349
349
|
if (tr_utils_1.TrUtils.IsNull(InvoiceInfo.Prod)) {
|
|
@@ -363,16 +363,16 @@ class IssueSparesXlsxFileService {
|
|
|
363
363
|
Product = InvoiceInfo.Parts.Desc;
|
|
364
364
|
}
|
|
365
365
|
if (!tr_utils_1.TrUtils.IsZero(InvoiceInfo.Parts.AssPr)) {
|
|
366
|
-
Price = tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Parts.AssPr);
|
|
366
|
+
Price = tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Parts.AssPr, DecimalsNumber);
|
|
367
367
|
}
|
|
368
368
|
else {
|
|
369
|
-
Price = tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Parts.UnPr);
|
|
369
|
+
Price = tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Parts.UnPr, DecimalsNumber);
|
|
370
370
|
}
|
|
371
371
|
if (!tr_utils_1.TrUtils.IsZero(InvoiceInfo.Parts.AssAmt)) {
|
|
372
|
-
UnAmt = tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Parts.AssAmt);
|
|
372
|
+
UnAmt = tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Parts.AssAmt, DecimalsNumber);
|
|
373
373
|
}
|
|
374
374
|
else {
|
|
375
|
-
UnAmt = tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Parts.UnAmt);
|
|
375
|
+
UnAmt = tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Parts.UnAmt, DecimalsNumber);
|
|
376
376
|
}
|
|
377
377
|
;
|
|
378
378
|
}
|
|
@@ -402,7 +402,7 @@ class IssueSparesXlsxFileService {
|
|
|
402
402
|
];
|
|
403
403
|
let ColStart = 0;
|
|
404
404
|
InvoiceData.forEach((InvData) => {
|
|
405
|
-
InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
|
|
405
|
+
InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
|
|
406
406
|
this.SetDataInCell(InvData.text, ColStart, this.Row);
|
|
407
407
|
this.MergeArray.push({
|
|
408
408
|
s: { r: this.Row, c: ColStart },
|
|
@@ -412,7 +412,7 @@ class IssueSparesXlsxFileService {
|
|
|
412
412
|
});
|
|
413
413
|
this.Row += 1;
|
|
414
414
|
}
|
|
415
|
-
static ConvertToString(Text, IsString) {
|
|
415
|
+
static ConvertToString(Text, IsString, DecimalsNumber) {
|
|
416
416
|
if (IsString) {
|
|
417
417
|
if (Text == null) {
|
|
418
418
|
Text = '';
|
|
@@ -424,7 +424,7 @@ class IssueSparesXlsxFileService {
|
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
426
|
if (typeof Text === 'number') {
|
|
427
|
-
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
427
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
|
|
428
428
|
}
|
|
429
429
|
else {
|
|
430
430
|
return Text;
|
|
@@ -13,11 +13,11 @@ export declare class StockXlsxFileService {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
static ws: any;
|
|
16
|
-
static GetStockInfoExcelData(MainData: any, isSale: boolean, isHC: any, HeaderName: any): any;
|
|
16
|
+
static GetStockInfoExcelData(MainData: any, isSale: boolean, isHC: any, HeaderName: any, EntitySettings: any): any;
|
|
17
17
|
static setHeadingInCell(HeaderName: any, isHC: any): void;
|
|
18
|
-
static setInvoiceDetailsInCell(MainData: any, isHC: any): void;
|
|
19
|
-
static SetInvoiceDataInExcel(InvoiceInfo: any, index: any, isHC: any): void;
|
|
20
|
-
static ConvertToString(Text: any, IsString: any): any;
|
|
18
|
+
static setInvoiceDetailsInCell(MainData: any, isHC: any, DecimalsNumber: number): void;
|
|
19
|
+
static SetInvoiceDataInExcel(InvoiceInfo: any, index: any, isHC: any, DecimalsNumber: number): void;
|
|
20
|
+
static ConvertToString(Text: any, IsString: any, DecimalsNumber: any): any;
|
|
21
21
|
static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
|
|
22
22
|
static getcelltype(cell: any): any;
|
|
23
23
|
}
|
|
@@ -27,7 +27,7 @@ exports.StockXlsxFileService = void 0;
|
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
28
|
const tr_utils_1 = require("../../../../utils/tr-utils");
|
|
29
29
|
class StockXlsxFileService {
|
|
30
|
-
static GetStockInfoExcelData(MainData, isSale, isHC, HeaderName) {
|
|
30
|
+
static GetStockInfoExcelData(MainData, isSale, isHC, HeaderName, EntitySettings) {
|
|
31
31
|
this.wb = {};
|
|
32
32
|
this.ws = {};
|
|
33
33
|
this.Row = 0;
|
|
@@ -65,7 +65,7 @@ class StockXlsxFileService {
|
|
|
65
65
|
// // console.log(`${key}: ${searchValue[key]}`);
|
|
66
66
|
// }
|
|
67
67
|
this.setHeadingInCell(HeaderName, isHC);
|
|
68
|
-
this.setInvoiceDetailsInCell(MainData, isHC);
|
|
68
|
+
this.setInvoiceDetailsInCell(MainData, isHC, EntitySettings.DecimalsNumber);
|
|
69
69
|
this.ws['!ref'] = XLSX.utils.encode_range(this.range);
|
|
70
70
|
this.ws['!merges'] = this.MergeArray;
|
|
71
71
|
if (isHC === 'HC') {
|
|
@@ -205,12 +205,12 @@ class StockXlsxFileService {
|
|
|
205
205
|
});
|
|
206
206
|
this.Row += 2;
|
|
207
207
|
}
|
|
208
|
-
static setInvoiceDetailsInCell(MainData, isHC) {
|
|
208
|
+
static setInvoiceDetailsInCell(MainData, isHC, DecimalsNumber) {
|
|
209
209
|
MainData.forEach((InvoiceList, index) => {
|
|
210
|
-
this.SetInvoiceDataInExcel(InvoiceList, index, isHC);
|
|
210
|
+
this.SetInvoiceDataInExcel(InvoiceList, index, isHC, DecimalsNumber);
|
|
211
211
|
});
|
|
212
212
|
}
|
|
213
|
-
static SetInvoiceDataInExcel(InvoiceInfo, index, isHC) {
|
|
213
|
+
static SetInvoiceDataInExcel(InvoiceInfo, index, isHC, DecimalsNumber) {
|
|
214
214
|
var _a;
|
|
215
215
|
let InvoiceData = [
|
|
216
216
|
{ text: index + 1, ColRange: 1, IsString: true },
|
|
@@ -225,7 +225,7 @@ class StockXlsxFileService {
|
|
|
225
225
|
}
|
|
226
226
|
let ColStart = 0;
|
|
227
227
|
InvoiceData.forEach((InvData) => {
|
|
228
|
-
InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
|
|
228
|
+
InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
|
|
229
229
|
this.SetDataInCell(InvData.text, ColStart, this.Row);
|
|
230
230
|
this.MergeArray.push({
|
|
231
231
|
s: { r: this.Row, c: ColStart },
|
|
@@ -235,7 +235,7 @@ class StockXlsxFileService {
|
|
|
235
235
|
});
|
|
236
236
|
this.Row += 1;
|
|
237
237
|
}
|
|
238
|
-
static ConvertToString(Text, IsString) {
|
|
238
|
+
static ConvertToString(Text, IsString, DecimalsNumber) {
|
|
239
239
|
if (IsString) {
|
|
240
240
|
if (Text == null) {
|
|
241
241
|
Text = '';
|
|
@@ -247,7 +247,7 @@ class StockXlsxFileService {
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
if (typeof Text === 'number') {
|
|
250
|
-
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
250
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
|
|
251
251
|
}
|
|
252
252
|
else {
|
|
253
253
|
return Text;
|
|
@@ -28,7 +28,7 @@ export declare class ExpiringDrugPDFService {
|
|
|
28
28
|
text: any;
|
|
29
29
|
})[];
|
|
30
30
|
};
|
|
31
|
-
static GetItemsTable(Items: any): {
|
|
31
|
+
static GetItemsTable(Items: any, DecimalsNumber: number): {
|
|
32
32
|
style: string;
|
|
33
33
|
marginTop: number;
|
|
34
34
|
marginBottom: number;
|
|
@@ -44,6 +44,6 @@ export declare class ExpiringDrugPDFService {
|
|
|
44
44
|
vLineColor: (i: any, node: any) => string;
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
|
-
static BuildTableBodyForLaborAndParts(Items: any): any;
|
|
47
|
+
static BuildTableBodyForLaborAndParts(Items: any, DecimalsNumber: number): any;
|
|
48
48
|
static GetHeaderNames(): any;
|
|
49
49
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ExpiringDrugPDFService = void 0;
|
|
4
|
+
const aggregation_1 = require("../../../../aggregation/aggregation");
|
|
4
5
|
const my_date_1 = require("../../../../utils/my-date");
|
|
5
6
|
const tr_utils_1 = require("../../../../utils/tr-utils");
|
|
6
7
|
class ExpiringDrugPDFService {
|
|
@@ -21,7 +22,7 @@ class ExpiringDrugPDFService {
|
|
|
21
22
|
content: [
|
|
22
23
|
{ text: ReOrderPointData.Entity.CName, style: ['headerstyle'], alignment: 'center', fontSize: 20 },
|
|
23
24
|
{ text: 'Expiring Drugs (' + this.GetDate(DatesDetails, ReOrderPointData.Entity.User.TZ) + ')', style: ['headerstyle'], alignment: 'center', fontSize: 12 },
|
|
24
|
-
this.GetItemsTable(ReOrderPointData.Items),
|
|
25
|
+
this.GetItemsTable(ReOrderPointData.Items, ReOrderPointData.Entity.DecimalsNumber),
|
|
25
26
|
this.GetSignatures(ReOrderPointData.Entity.CName, ReOrderPointData.Type, ReOrderPointData.For),
|
|
26
27
|
],
|
|
27
28
|
styles: {
|
|
@@ -97,7 +98,7 @@ class ExpiringDrugPDFService {
|
|
|
97
98
|
text: ['For ', { text: CName, }],
|
|
98
99
|
};
|
|
99
100
|
}
|
|
100
|
-
static GetItemsTable(Items) {
|
|
101
|
+
static GetItemsTable(Items, DecimalsNumber) {
|
|
101
102
|
return {
|
|
102
103
|
style: 'tableExample',
|
|
103
104
|
marginTop: 3,
|
|
@@ -105,7 +106,7 @@ class ExpiringDrugPDFService {
|
|
|
105
106
|
table: {
|
|
106
107
|
widths: ['*', 80, 50, 40, 50, 70],
|
|
107
108
|
headerRows: 1,
|
|
108
|
-
body: this.BuildTableBodyForLaborAndParts(Items)
|
|
109
|
+
body: this.BuildTableBodyForLaborAndParts(Items, DecimalsNumber)
|
|
109
110
|
},
|
|
110
111
|
layout: {
|
|
111
112
|
hLineWidth: function (i, node) {
|
|
@@ -123,7 +124,7 @@ class ExpiringDrugPDFService {
|
|
|
123
124
|
}
|
|
124
125
|
};
|
|
125
126
|
}
|
|
126
|
-
static BuildTableBodyForLaborAndParts(Items) {
|
|
127
|
+
static BuildTableBodyForLaborAndParts(Items, DecimalsNumber) {
|
|
127
128
|
let body = this.GetHeaderNames();
|
|
128
129
|
let Total = 0;
|
|
129
130
|
Items.forEach((item, index) => {
|
|
@@ -133,11 +134,11 @@ class ExpiringDrugPDFService {
|
|
|
133
134
|
dataRow.push({ text: item.Batch.BN, alignment: 'left', style: ['headerstyle'], });
|
|
134
135
|
dataRow.push({ text: my_date_1.MyDate.ConvertUTCDateToReadableExDateTxt(item.Batch.ExDt), alignment: 'center', style: ['headerstyle'], });
|
|
135
136
|
dataRow.push({ text: item.Batch.Qty, alignment: 'right', style: ['headerstyle'], });
|
|
136
|
-
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(item.Batch.Cost), alignment: 'right', style: ['headerstyle'], });
|
|
137
|
-
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(item.Batch.Qty
|
|
137
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(item.Batch.Cost, DecimalsNumber), alignment: 'right', style: ['headerstyle'], });
|
|
138
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.multiply)(item.Batch.Qty, item.Batch.Cost), DecimalsNumber), alignment: 'right', style: ['headerstyle'], });
|
|
138
139
|
body.push(dataRow);
|
|
139
140
|
});
|
|
140
|
-
let Row = [{ text: 'Total', alignment: 'right', colSpan: 5, bold: true, fontSize: 12 }, {}, {}, {}, {}, { text: tr_utils_1.TrUtils.FixPriceValue(Total), fontSize: 12, alignment: 'right', bold: true }];
|
|
141
|
+
let Row = [{ text: 'Total', alignment: 'right', colSpan: 5, bold: true, fontSize: 12 }, {}, {}, {}, {}, { text: tr_utils_1.TrUtils.FixPriceValue(Total, DecimalsNumber), fontSize: 12, alignment: 'right', bold: true }];
|
|
141
142
|
body.push(Row);
|
|
142
143
|
return body;
|
|
143
144
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare class ItemWiseMODetailsPDF {
|
|
2
|
-
static GetItemWiseMODetailsPrint(InvoicesData: any,
|
|
2
|
+
static GetItemWiseMODetailsPrint(InvoicesData: any, EntityData: any, isPhar: boolean, isHC: boolean, HeaderName: any, searchValue: any): {
|
|
3
3
|
info: {
|
|
4
4
|
title: string;
|
|
5
5
|
};
|
|
@@ -206,9 +206,9 @@ export declare class ItemWiseMODetailsPDF {
|
|
|
206
206
|
};
|
|
207
207
|
};
|
|
208
208
|
};
|
|
209
|
-
static GetInvoiceDataTable(InvoicesData: any, isPhar: boolean, isHC: boolean): any;
|
|
209
|
+
static GetInvoiceDataTable(InvoicesData: any, isPhar: boolean, isHC: boolean, DecimalsNumber: number): any;
|
|
210
210
|
static getTableWidths(isHC: any): (string | number)[];
|
|
211
|
-
static GetItemsTable(InvoiceData: any, isPhar: boolean, isHC: boolean): {
|
|
211
|
+
static GetItemsTable(InvoiceData: any, isPhar: boolean, isHC: boolean, DecimalsNumber: number): {
|
|
212
212
|
style: string;
|
|
213
213
|
marginTop: number;
|
|
214
214
|
marginBottom: number;
|
|
@@ -224,6 +224,6 @@ export declare class ItemWiseMODetailsPDF {
|
|
|
224
224
|
vLineColor: (i: any, node: any) => string;
|
|
225
225
|
};
|
|
226
226
|
};
|
|
227
|
-
static BuildTableBodyForLaborAndParts(InvoiceData: any, isPhar: boolean, isHC: boolean): any;
|
|
227
|
+
static BuildTableBodyForLaborAndParts(InvoiceData: any, isPhar: boolean, isHC: boolean, DecimalsNumber: number): any;
|
|
228
228
|
static GetHeaderNames(isPhar: boolean, isHC: boolean): any;
|
|
229
229
|
}
|
|
@@ -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 ItemWiseMODetailsPDF {
|
|
8
|
-
static GetItemWiseMODetailsPrint(InvoicesData,
|
|
8
|
+
static GetItemWiseMODetailsPrint(InvoicesData, EntityData, isPhar, isHC, HeaderName, searchValue) {
|
|
9
9
|
var dd = {
|
|
10
10
|
info: {
|
|
11
11
|
title: 'ItemWiseMO',
|
|
@@ -16,26 +16,26 @@ class ItemWiseMODetailsPDF {
|
|
|
16
16
|
pageMargins: [10, 15, 10, 15],
|
|
17
17
|
pageOrientation: 'landscape',
|
|
18
18
|
content: [
|
|
19
|
-
{ text: '' +
|
|
19
|
+
{ text: '' + EntityData.DName + '', style: ['header'] },
|
|
20
20
|
{ text: HeaderName, alignment: 'center', fontSize: 15, bold: true },
|
|
21
21
|
shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
|
|
22
|
-
this.GetInvoiceDataTable(InvoicesData, isPhar, isHC),
|
|
22
|
+
this.GetInvoiceDataTable(InvoicesData, isPhar, isHC, EntityData.Settings.DecimalsNumber),
|
|
23
23
|
],
|
|
24
24
|
styles: shared_pdf_service_1.SharedPDFService.GetStyles()
|
|
25
25
|
};
|
|
26
26
|
return dd;
|
|
27
27
|
}
|
|
28
|
-
static GetInvoiceDataTable(InvoicesData, isPhar, isHC) {
|
|
28
|
+
static GetInvoiceDataTable(InvoicesData, isPhar, isHC, DecimalsNumber) {
|
|
29
29
|
let Data = [];
|
|
30
30
|
// InvoicesData.forEach((invoice: any) => {
|
|
31
|
-
Data.push(this.GetItemsTable(InvoicesData, isPhar, isHC));
|
|
31
|
+
Data.push(this.GetItemsTable(InvoicesData, isPhar, isHC, DecimalsNumber));
|
|
32
32
|
// });
|
|
33
33
|
return Data;
|
|
34
34
|
}
|
|
35
35
|
static getTableWidths(isHC) {
|
|
36
36
|
return [25, 50, 50, 50, 100, '*', 100, 40, 50, 40, 100];
|
|
37
37
|
}
|
|
38
|
-
static GetItemsTable(InvoiceData, isPhar, isHC) {
|
|
38
|
+
static GetItemsTable(InvoiceData, isPhar, isHC, DecimalsNumber) {
|
|
39
39
|
return {
|
|
40
40
|
style: 'tableExample',
|
|
41
41
|
marginTop: 3,
|
|
@@ -43,7 +43,7 @@ class ItemWiseMODetailsPDF {
|
|
|
43
43
|
table: {
|
|
44
44
|
widths: this.getTableWidths(isHC),
|
|
45
45
|
headerRows: 1,
|
|
46
|
-
body: this.BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC)
|
|
46
|
+
body: this.BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC, DecimalsNumber)
|
|
47
47
|
},
|
|
48
48
|
layout: {
|
|
49
49
|
hLineWidth: function (i, node) {
|
|
@@ -61,7 +61,7 @@ class ItemWiseMODetailsPDF {
|
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
static BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC) {
|
|
64
|
+
static BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC, DecimalsNumber) {
|
|
65
65
|
let body = this.GetHeaderNames(isPhar, isHC);
|
|
66
66
|
InvoiceData.forEach((invoice, index) => {
|
|
67
67
|
var _a;
|
|
@@ -75,7 +75,7 @@ class ItemWiseMODetailsPDF {
|
|
|
75
75
|
dataRow.push({ text: invoice.ShipToUser, alignment: 'left' });
|
|
76
76
|
dataRow.push({ text: invoice.Name, alignment: 'left' });
|
|
77
77
|
dataRow.push({ text: invoice.MPN, alignment: 'left' });
|
|
78
|
-
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Qty), alignment: 'right' });
|
|
78
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Qty, DecimalsNumber), alignment: 'right' });
|
|
79
79
|
dataRow.push({ text: invoice.ReName, alignment: 'left' });
|
|
80
80
|
dataRow.push({ text: invoice.Sts, alignment: 'left' });
|
|
81
81
|
dataRow.push({ text: invoice.Notes, alignment: 'left' });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare class ItemWiseMOSummaryPDF {
|
|
2
|
-
static GetItemWiseMOSummaryPrint(InvoicesData: any,
|
|
2
|
+
static GetItemWiseMOSummaryPrint(InvoicesData: any, EntityData: any, isPhar: boolean, isHC: boolean, HeaderName: any, searchValue: any): {
|
|
3
3
|
info: {
|
|
4
4
|
title: string;
|
|
5
5
|
};
|
|
@@ -205,9 +205,9 @@ export declare class ItemWiseMOSummaryPDF {
|
|
|
205
205
|
};
|
|
206
206
|
};
|
|
207
207
|
};
|
|
208
|
-
static GetInvoiceDataTable(InvoicesData: any, isPhar: boolean, isHC: boolean): any;
|
|
208
|
+
static GetInvoiceDataTable(InvoicesData: any, isPhar: boolean, isHC: boolean, DecimalsNumber: number): any;
|
|
209
209
|
static getTableWidths(isHC: any): (string | number)[];
|
|
210
|
-
static GetItemsTable(InvoiceData: any, isPhar: boolean, isHC: boolean): {
|
|
210
|
+
static GetItemsTable(InvoiceData: any, isPhar: boolean, isHC: boolean, DecimalsNumber: number): {
|
|
211
211
|
style: string;
|
|
212
212
|
marginTop: number;
|
|
213
213
|
marginBottom: number;
|
|
@@ -223,6 +223,6 @@ export declare class ItemWiseMOSummaryPDF {
|
|
|
223
223
|
vLineColor: (i: any, node: any) => string;
|
|
224
224
|
};
|
|
225
225
|
};
|
|
226
|
-
static BuildTableBodyForLaborAndParts(InvoiceData: any, isPhar: boolean, isHC: boolean): any;
|
|
226
|
+
static BuildTableBodyForLaborAndParts(InvoiceData: any, isPhar: boolean, isHC: boolean, DecimalsNumber: number): any;
|
|
227
227
|
static GetHeaderNames(isPhar: boolean, isHC: boolean): any;
|
|
228
228
|
}
|
|
@@ -4,7 +4,7 @@ exports.ItemWiseMOSummaryPDF = void 0;
|
|
|
4
4
|
const shared_pdf_service_1 = require("../../../../shared/shared-pdf.service");
|
|
5
5
|
const tr_utils_1 = require("../../../../utils/tr-utils");
|
|
6
6
|
class ItemWiseMOSummaryPDF {
|
|
7
|
-
static GetItemWiseMOSummaryPrint(InvoicesData,
|
|
7
|
+
static GetItemWiseMOSummaryPrint(InvoicesData, EntityData, isPhar, isHC, HeaderName, searchValue) {
|
|
8
8
|
var dd = {
|
|
9
9
|
info: {
|
|
10
10
|
title: 'ItemWiseMOSummary',
|
|
@@ -14,19 +14,19 @@ class ItemWiseMOSummaryPDF {
|
|
|
14
14
|
},
|
|
15
15
|
pageMargins: [10, 15, 10, 15],
|
|
16
16
|
content: [
|
|
17
|
-
{ text: '' +
|
|
17
|
+
{ text: '' + EntityData.DName + '', style: ['header'] },
|
|
18
18
|
{ text: HeaderName, alignment: 'center', fontSize: 15, bold: true },
|
|
19
19
|
shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
|
|
20
|
-
this.GetInvoiceDataTable(InvoicesData, isPhar, isHC),
|
|
20
|
+
this.GetInvoiceDataTable(InvoicesData, isPhar, isHC, EntityData.Settings.DecimalsNumber),
|
|
21
21
|
],
|
|
22
22
|
styles: shared_pdf_service_1.SharedPDFService.GetStyles()
|
|
23
23
|
};
|
|
24
24
|
return dd;
|
|
25
25
|
}
|
|
26
|
-
static GetInvoiceDataTable(InvoicesData, isPhar, isHC) {
|
|
26
|
+
static GetInvoiceDataTable(InvoicesData, isPhar, isHC, DecimalsNumber) {
|
|
27
27
|
let Data = [];
|
|
28
28
|
// InvoicesData.forEach((invoice: any) => {
|
|
29
|
-
Data.push(this.GetItemsTable(InvoicesData, isPhar, isHC));
|
|
29
|
+
Data.push(this.GetItemsTable(InvoicesData, isPhar, isHC, DecimalsNumber));
|
|
30
30
|
// });
|
|
31
31
|
return Data;
|
|
32
32
|
}
|
|
@@ -37,7 +37,7 @@ class ItemWiseMOSummaryPDF {
|
|
|
37
37
|
return [25, '*', '*'];
|
|
38
38
|
// }
|
|
39
39
|
}
|
|
40
|
-
static GetItemsTable(InvoiceData, isPhar, isHC) {
|
|
40
|
+
static GetItemsTable(InvoiceData, isPhar, isHC, DecimalsNumber) {
|
|
41
41
|
return {
|
|
42
42
|
style: 'tableExample',
|
|
43
43
|
marginTop: 3,
|
|
@@ -45,7 +45,7 @@ class ItemWiseMOSummaryPDF {
|
|
|
45
45
|
table: {
|
|
46
46
|
widths: this.getTableWidths(isHC),
|
|
47
47
|
headerRows: 1,
|
|
48
|
-
body: this.BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC)
|
|
48
|
+
body: this.BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC, DecimalsNumber)
|
|
49
49
|
},
|
|
50
50
|
layout: {
|
|
51
51
|
hLineWidth: function (i, node) {
|
|
@@ -63,7 +63,7 @@ class ItemWiseMOSummaryPDF {
|
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
static BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC) {
|
|
66
|
+
static BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC, DecimalsNumber) {
|
|
67
67
|
let body = this.GetHeaderNames(isPhar, isHC);
|
|
68
68
|
InvoiceData.forEach((invoice, index) => {
|
|
69
69
|
let dataRow = [];
|
|
@@ -74,7 +74,7 @@ class ItemWiseMOSummaryPDF {
|
|
|
74
74
|
// dataRow.push({ text: invoice.OfQty, alignment: 'right' });
|
|
75
75
|
// dataRow.push({ text: invoice.ShipToUser, alignment: 'left' });
|
|
76
76
|
dataRow.push({ text: invoice.Name, alignment: 'left' });
|
|
77
|
-
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Qty), alignment: 'right' });
|
|
77
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Qty, DecimalsNumber), alignment: 'right' });
|
|
78
78
|
// dataRow.push({ text: invoice.ReName, alignment: 'left' });
|
|
79
79
|
// dataRow.push({ text: invoice.Sts, alignment: 'left' });
|
|
80
80
|
// dataRow.push({ text: TrUtils.FixPriceValue(invoice.Total ), alignment: 'right', style: ['headerstyle'], });
|
|
@@ -13,12 +13,12 @@ export declare class PaymentsMadeXlsxFileService {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
static ws: any;
|
|
16
|
-
static GetPaymentsMadeDetailsExcelData(MainData: any, isPur: boolean, isSale: boolean, searchValue: any, HeaderName: string, ExtraFields: boolean): any;
|
|
16
|
+
static GetPaymentsMadeDetailsExcelData(MainData: any, isPur: boolean, isSale: boolean, searchValue: any, HeaderName: string, ExtraFields: boolean, EntitySettings: any): any;
|
|
17
17
|
static GetTotals(MainData: any): any;
|
|
18
18
|
static setHeadingInCell(isPur: boolean, showSearch: any, HeaderName: any, ExtraFields: boolean): void;
|
|
19
|
-
static setInvoiceDetailsInCell(MainData: any, isSale: boolean, isPur: boolean, ExtraFields: boolean): void;
|
|
20
|
-
static SetInvoiceDataInExcel(InvoiceInfo: any, index: any, isSale: boolean, isPur: any, ExtraFields: boolean): void;
|
|
21
|
-
static ConvertToString(Text: any, IsString: any): any;
|
|
19
|
+
static setInvoiceDetailsInCell(MainData: any, isSale: boolean, isPur: boolean, ExtraFields: boolean, DecimalsNumber: number): void;
|
|
20
|
+
static SetInvoiceDataInExcel(InvoiceInfo: any, index: any, isSale: boolean, isPur: any, ExtraFields: boolean, DecimalsNumber: number): void;
|
|
21
|
+
static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
|
|
22
22
|
static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
|
|
23
23
|
static getcelltype(cell: any): any;
|
|
24
24
|
static ConvertDateToReadableFormat(DateObject: any): any;
|
|
@@ -28,7 +28,7 @@ const XLSX = __importStar(require("xlsx"));
|
|
|
28
28
|
const my_date_1 = require("../../../../utils/my-date");
|
|
29
29
|
const tr_utils_1 = require("../../../../utils/tr-utils");
|
|
30
30
|
class PaymentsMadeXlsxFileService {
|
|
31
|
-
static GetPaymentsMadeDetailsExcelData(MainData, isPur, isSale, searchValue, HeaderName, ExtraFields) {
|
|
31
|
+
static GetPaymentsMadeDetailsExcelData(MainData, isPur, isSale, searchValue, HeaderName, ExtraFields, EntitySettings) {
|
|
32
32
|
this.wb = {};
|
|
33
33
|
this.ws = {};
|
|
34
34
|
this.Row = 0;
|
|
@@ -66,7 +66,7 @@ class PaymentsMadeXlsxFileService {
|
|
|
66
66
|
// console.log(`${key}: ${searchValue[key]}`);
|
|
67
67
|
}
|
|
68
68
|
this.setHeadingInCell(isPur, showSearch, HeaderName, ExtraFields);
|
|
69
|
-
this.setInvoiceDetailsInCell(MainData, isSale, isPur, ExtraFields);
|
|
69
|
+
this.setInvoiceDetailsInCell(MainData, isSale, isPur, ExtraFields, EntitySettings.DecimalsNumber);
|
|
70
70
|
this.ws['!ref'] = XLSX.utils.encode_range(this.range);
|
|
71
71
|
this.ws['!merges'] = this.MergeArray;
|
|
72
72
|
this.ws["!cols"] = [{ wch: 10 }, { wch: 15 }, { wch: 50 }, { wch: 10 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 20 }];
|
|
@@ -183,12 +183,12 @@ class PaymentsMadeXlsxFileService {
|
|
|
183
183
|
});
|
|
184
184
|
this.Row += 2;
|
|
185
185
|
}
|
|
186
|
-
static setInvoiceDetailsInCell(MainData, isSale, isPur, ExtraFields) {
|
|
186
|
+
static setInvoiceDetailsInCell(MainData, isSale, isPur, ExtraFields, DecimalsNumber) {
|
|
187
187
|
MainData.forEach((InvoiceList, index) => {
|
|
188
|
-
this.SetInvoiceDataInExcel(InvoiceList, index, isSale, isPur, ExtraFields);
|
|
188
|
+
this.SetInvoiceDataInExcel(InvoiceList, index, isSale, isPur, ExtraFields, DecimalsNumber);
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
static SetInvoiceDataInExcel(InvoiceInfo, index, isSale, isPur, ExtraFields) {
|
|
191
|
+
static SetInvoiceDataInExcel(InvoiceInfo, index, isSale, isPur, ExtraFields, DecimalsNumber) {
|
|
192
192
|
var _a;
|
|
193
193
|
if (isSale) {
|
|
194
194
|
InvoiceInfo.Date = this.ConvertDateToReadableFormat(InvoiceInfo.Pay.Dt);
|
|
@@ -205,14 +205,14 @@ class PaymentsMadeXlsxFileService {
|
|
|
205
205
|
{ text: isSale ? InvoiceInfo.CustName : InvoiceInfo.Name, ColRange: 1, IsString: true },
|
|
206
206
|
{ text: InvoiceInfo.Date, ColRange: 1, IsString: true },
|
|
207
207
|
{ text: isSale ? InvoiceInfo.Pay.Type : InvoiceInfo.PType, ColRange: 1, IsString: true },
|
|
208
|
-
{ text: isSale ? tr_utils_1.TrUtils.FixPriceValue((_a = InvoiceInfo.Pay) === null || _a === void 0 ? void 0 : _a.Amt) : tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Amt), ColRange: 1, IsString: false }
|
|
208
|
+
{ text: isSale ? tr_utils_1.TrUtils.FixPriceValue((_a = InvoiceInfo.Pay) === null || _a === void 0 ? void 0 : _a.Amt, DecimalsNumber) : tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Amt, DecimalsNumber), ColRange: 1, IsString: false }
|
|
209
209
|
];
|
|
210
210
|
if (ExtraFields) {
|
|
211
211
|
InvoiceData.splice(2, 0, { text: isPur ? InvoiceInfo.BNo : InvoiceInfo.InvCode, ColRange: 1, IsString: false }, { text: isPur ? InvoiceInfo.POCode : InvoiceInfo.OrdCode, ColRange: 1, IsString: false }, { text: InvoiceInfo.RegNo, ColRange: 1, IsString: true });
|
|
212
212
|
}
|
|
213
213
|
let ColStart = 0;
|
|
214
214
|
InvoiceData.forEach((InvData) => {
|
|
215
|
-
InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
|
|
215
|
+
InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
|
|
216
216
|
this.SetDataInCell(InvData.text, ColStart, this.Row);
|
|
217
217
|
this.MergeArray.push({
|
|
218
218
|
s: { r: this.Row, c: ColStart },
|
|
@@ -222,7 +222,7 @@ class PaymentsMadeXlsxFileService {
|
|
|
222
222
|
});
|
|
223
223
|
this.Row += 1;
|
|
224
224
|
}
|
|
225
|
-
static ConvertToString(Text, IsString) {
|
|
225
|
+
static ConvertToString(Text, IsString, DecimalsNumber) {
|
|
226
226
|
if (IsString) {
|
|
227
227
|
if (Text == null) {
|
|
228
228
|
Text = '';
|
|
@@ -234,7 +234,7 @@ class PaymentsMadeXlsxFileService {
|
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
236
|
if (typeof Text === 'number') {
|
|
237
|
-
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
237
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
|
|
238
238
|
}
|
|
239
239
|
else {
|
|
240
240
|
return Text;
|
|
@@ -13,14 +13,14 @@ export declare class VenBalanceXlsxFileService {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
static ws: any;
|
|
16
|
-
static GetInvoiceWiseExcelData(MainData: any): any;
|
|
16
|
+
static GetInvoiceWiseExcelData(MainData: any, EntitySettings: any): any;
|
|
17
17
|
static GetWOTypeName(Type: any, WOTypes: any): any;
|
|
18
18
|
static setHeadingInCell(): void;
|
|
19
|
-
static setHeading1InCell(Name: any): void;
|
|
20
|
-
static setInvoiceFinalRowInCell(Due: any): void;
|
|
21
|
-
static setInvoiceDetailsInCell(MainData: any): void;
|
|
22
|
-
static SetInvoiceDataInExcel(BillInfo: any, index: any): void;
|
|
23
|
-
static ConvertToString(Text: any, IsString: any): any;
|
|
19
|
+
static setHeading1InCell(Name: any, DecimalsNumber: number): void;
|
|
20
|
+
static setInvoiceFinalRowInCell(Due: any, DecimalsNumber: number): void;
|
|
21
|
+
static setInvoiceDetailsInCell(MainData: any, DecimalsNumber: number): void;
|
|
22
|
+
static SetInvoiceDataInExcel(BillInfo: any, index: any, DecimalsNumber: number): void;
|
|
23
|
+
static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
|
|
24
24
|
static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
|
|
25
25
|
static getcelltype(cell: any): any;
|
|
26
26
|
static ConvertDateToReadableFormat(DateObject: any): any;
|