shareneus 1.4.47 → 1.4.49
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.d.ts +3 -3
- package/dist/accounting/counter-sales/sales-receipt-print.service.js +31 -30
- package/dist/accounting/credit-note/cn-print.service.d.ts +1 -2
- package/dist/accounting/credit-note/cn-print.service.js +10 -32
- package/dist/accounting/credit-note/credit-note-totals.service.d.ts +6 -6
- package/dist/accounting/credit-note/credit-note-totals.service.js +19 -19
- package/dist/accounting/debit-note/debit-note-print.service.d.ts +2 -2
- package/dist/accounting/debit-note/debit-note-print.service.js +15 -15
- package/dist/accounting/debit-note/debit-note-totals.service.d.ts +6 -6
- package/dist/accounting/debit-note/debit-note-totals.service.js +18 -18
- package/dist/accounting/invoice/hc-inv-pdf.service.d.ts +7 -7
- package/dist/accounting/invoice/hc-inv-pdf.service.js +36 -36
- package/dist/accounting/invoice/inv-pdf.service.d.ts +6 -6
- package/dist/accounting/invoice/inv-pdf.service.js +44 -44
- package/dist/accounting/invoice/inv-print.service.d.ts +3 -3
- package/dist/accounting/invoice/inv-print.service.js +24 -24
- package/dist/accounting/invoice/invoice-letterhead-pdf.service.d.ts +6 -6
- package/dist/accounting/invoice/invoice-letterhead-pdf.service.js +44 -44
- package/dist/accounting/invoice/invoice-total.service.d.ts +11 -11
- package/dist/accounting/invoice/invoice-total.service.js +54 -54
- 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.d.ts +6 -6
- package/dist/accounting/invoice/shared-inv-pdf.service.js +30 -30
- 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/appointments/appointment-total.service.d.ts +6 -6
- package/dist/appointments/appointments/appointment-total.service.js +28 -29
- 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/purchases/purchase-order/po-totals.service.d.ts +7 -7
- package/dist/purchases/purchase-order/po-totals.service.js +24 -25
- package/dist/purchases/purchase-order/purchase-order-print.service.js +3 -3
- package/dist/purchases/purchase-order/purchase-order-totals.service.d.ts +10 -10
- package/dist/purchases/purchase-order/purchase-order-totals.service.js +27 -27
- package/dist/purchases/vendor-debit-note/vendor-debit-note-print.service.d.ts +1 -2
- package/dist/purchases/vendor-debit-note/vendor-debit-note-print.service.js +10 -32
- package/dist/sales/delivery-challan/delivery-challan-print.service.d.ts +1 -2
- package/dist/sales/delivery-challan/delivery-challan-print.service.js +9 -32
- package/dist/sales/sales/sales-print.service.d.ts +2 -2
- package/dist/sales/sales/sales-print.service.js +17 -17
- package/dist/services/est.print-service.d.ts +18 -18
- package/dist/services/est.print-service.js +132 -132
- 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/ro-print-service.d.ts +6 -6
- package/dist/services/ro-print-service.js +39 -39
- 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-pdf.service.d.ts +0 -16
- package/dist/shared/shared-pdf.service.js +36 -34
- package/dist/shared/shared-print.service.js +3 -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/dist/utils/tr-utils.d.ts +2 -3
- package/dist/utils/tr-utils.js +5 -5
- package/package.json +1 -1
- package/dist/shared/shared-pdfs/shared-pdf.service.d.ts +0 -926
- package/dist/shared/shared-pdfs/shared-pdf.service.js +0 -2608
|
@@ -87,7 +87,7 @@ class InvoiceLetterheadPdfService {
|
|
|
87
87
|
if (tr_utils_1.TrUtils.IsNull(ROPrintData.PrintInfo[i].Text)) {
|
|
88
88
|
ROPrintData.PrintInfo[i].Text = '';
|
|
89
89
|
}
|
|
90
|
-
List.push(ROPrintData.PrintInfo[i].Text, this.WithOutDiscountFieldTable(tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Items), tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Ops), ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn, isAuto));
|
|
90
|
+
List.push(ROPrintData.PrintInfo[i].Text, this.WithOutDiscountFieldTable(tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Items), tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Ops), ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn, isAuto, ROPrintData.Entity.DecimalsNumber));
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
else {
|
|
@@ -99,7 +99,7 @@ class InvoiceLetterheadPdfService {
|
|
|
99
99
|
if (tr_utils_1.TrUtils.IsNull(ROPrintData.PrintInfo[i].Text)) {
|
|
100
100
|
ROPrintData.PrintInfo[i].Text = '';
|
|
101
101
|
}
|
|
102
|
-
List.push(ROPrintData.PrintInfo[i].Text, this.GetWithOutDiscAndTaxFieldHeader(tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Items), tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Ops), ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn, isAuto));
|
|
102
|
+
List.push(ROPrintData.PrintInfo[i].Text, this.GetWithOutDiscAndTaxFieldHeader(tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Items), tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Ops), ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn, isAuto, ROPrintData.Entity.DecimalsNumber));
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
}
|
|
@@ -138,7 +138,7 @@ class InvoiceLetterheadPdfService {
|
|
|
138
138
|
return a;
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
static WithOutDiscountFieldTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto) {
|
|
141
|
+
static WithOutDiscountFieldTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber) {
|
|
142
142
|
if (Parts.length !== 0 || Ops.length !== 0) {
|
|
143
143
|
if (PrintPartNo) {
|
|
144
144
|
return {
|
|
@@ -147,7 +147,7 @@ class InvoiceLetterheadPdfService {
|
|
|
147
147
|
table: {
|
|
148
148
|
widths: [25, 60, 155, 30, 50, 60, 30, 50],
|
|
149
149
|
headerRows: 1,
|
|
150
|
-
body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto)
|
|
150
|
+
body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber)
|
|
151
151
|
},
|
|
152
152
|
layout: shared_print_service_1.PrintSharedService.LayOutStyleanother()
|
|
153
153
|
};
|
|
@@ -159,7 +159,7 @@ class InvoiceLetterheadPdfService {
|
|
|
159
159
|
table: {
|
|
160
160
|
widths: [25, 215, 25, 50, 60, 45, 50],
|
|
161
161
|
headerRows: 1,
|
|
162
|
-
body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto)
|
|
162
|
+
body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber)
|
|
163
163
|
},
|
|
164
164
|
layout: shared_print_service_1.PrintSharedService.LayOutStyleanother()
|
|
165
165
|
};
|
|
@@ -170,7 +170,7 @@ class InvoiceLetterheadPdfService {
|
|
|
170
170
|
return a;
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
static BuildTableBodyForLaborAndParts(Parts, Labor, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto) {
|
|
173
|
+
static BuildTableBodyForLaborAndParts(Parts, Labor, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber) {
|
|
174
174
|
var body = [];
|
|
175
175
|
let columns = shared_print_service_1.PrintSharedService.GetWithOutDiscountFieldHeader(PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn);
|
|
176
176
|
// if (ShowTaxColumn) {
|
|
@@ -193,24 +193,24 @@ class InvoiceLetterheadPdfService {
|
|
|
193
193
|
let FinalTotal = 0;
|
|
194
194
|
Parts.forEach((part) => {
|
|
195
195
|
// console.log('part', part);
|
|
196
|
-
Qty = Qty + tr_utils_1.TrUtils.FixedTo(part.Qty);
|
|
197
|
-
CGSTAMT = CGSTAMT + tr_utils_1.TrUtils.FixedTo(part.CGSTAmt);
|
|
198
|
-
SGSTAMT = SGSTAMT + tr_utils_1.TrUtils.FixedTo(part.SGSTAmt);
|
|
199
|
-
IGSTAMT = IGSTAMT + tr_utils_1.TrUtils.FixedTo(part.IGSTAmt);
|
|
200
|
-
Taxable = Taxable + tr_utils_1.TrUtils.FixedTo(part.AfterPartDisc);
|
|
201
|
-
FinalTotal = FinalTotal + tr_utils_1.TrUtils.FixedTo(part.AfterPartTax);
|
|
196
|
+
Qty = Qty + tr_utils_1.TrUtils.FixedTo(part.Qty, DecimalsNumber);
|
|
197
|
+
CGSTAMT = CGSTAMT + tr_utils_1.TrUtils.FixedTo(part.CGSTAmt, DecimalsNumber);
|
|
198
|
+
SGSTAMT = SGSTAMT + tr_utils_1.TrUtils.FixedTo(part.SGSTAmt, DecimalsNumber);
|
|
199
|
+
IGSTAMT = IGSTAMT + tr_utils_1.TrUtils.FixedTo(part.IGSTAmt, DecimalsNumber);
|
|
200
|
+
Taxable = Taxable + tr_utils_1.TrUtils.FixedTo(part.AfterPartDisc, DecimalsNumber);
|
|
201
|
+
FinalTotal = FinalTotal + tr_utils_1.TrUtils.FixedTo(part.AfterPartTax, DecimalsNumber);
|
|
202
202
|
});
|
|
203
203
|
let dpartadding1 = {};
|
|
204
204
|
dpartadding1.SNo = '';
|
|
205
205
|
dpartadding1.Desc = 'Spare Total';
|
|
206
|
-
dpartadding1.QtyAndUoM = tr_utils_1.TrUtils.FixedTo(Qty);
|
|
206
|
+
dpartadding1.QtyAndUoM = tr_utils_1.TrUtils.FixedTo(Qty, DecimalsNumber);
|
|
207
207
|
dpartadding1.bold = true;
|
|
208
|
-
dpartadding1.UnPr = tr_utils_1.TrUtils.FixedTo(Taxable);
|
|
209
|
-
dpartadding1.SGSTAmt = tr_utils_1.TrUtils.FixedTo(SGSTAMT);
|
|
210
|
-
dpartadding1.IGSTAmt = tr_utils_1.TrUtils.FixedTo(IGSTAMT);
|
|
211
|
-
dpartadding1.CGSTAmt = tr_utils_1.TrUtils.FixedTo(CGSTAMT);
|
|
208
|
+
dpartadding1.UnPr = tr_utils_1.TrUtils.FixedTo(Taxable, DecimalsNumber);
|
|
209
|
+
dpartadding1.SGSTAmt = tr_utils_1.TrUtils.FixedTo(SGSTAMT, DecimalsNumber);
|
|
210
|
+
dpartadding1.IGSTAmt = tr_utils_1.TrUtils.FixedTo(IGSTAMT, DecimalsNumber);
|
|
211
|
+
dpartadding1.CGSTAmt = tr_utils_1.TrUtils.FixedTo(CGSTAMT, DecimalsNumber);
|
|
212
212
|
dpartadding1.TCode = ShowTaxColumn ? 114 : undefined;
|
|
213
|
-
dpartadding1.LineTotal = tr_utils_1.TrUtils.FixPriceValue(FinalTotal);
|
|
213
|
+
dpartadding1.LineTotal = tr_utils_1.TrUtils.FixPriceValue(FinalTotal, DecimalsNumber);
|
|
214
214
|
Parts.push({ SNo: '' });
|
|
215
215
|
Parts.push(dpartadding1);
|
|
216
216
|
}
|
|
@@ -312,23 +312,23 @@ class InvoiceLetterheadPdfService {
|
|
|
312
312
|
Labor.forEach((operation) => {
|
|
313
313
|
// console.log('operation', operation);
|
|
314
314
|
// Qty = Qty + operation.Qty;
|
|
315
|
-
CGSTAMT = CGSTAMT + tr_utils_1.TrUtils.FixedTo(operation.CGSTAmt);
|
|
316
|
-
SGSTAMT = SGSTAMT + tr_utils_1.TrUtils.FixedTo(operation.SGSTAmt);
|
|
317
|
-
IGSTAMT = IGSTAMT + tr_utils_1.TrUtils.FixedTo(operation.IGSTAmt);
|
|
318
|
-
Taxable = Taxable + tr_utils_1.TrUtils.FixedTo(operation.AfterLaborDisc);
|
|
319
|
-
FinalTotal = FinalTotal + tr_utils_1.TrUtils.FixedTo(operation.AfterLaborTax);
|
|
315
|
+
CGSTAMT = CGSTAMT + tr_utils_1.TrUtils.FixedTo(operation.CGSTAmt, DecimalsNumber);
|
|
316
|
+
SGSTAMT = SGSTAMT + tr_utils_1.TrUtils.FixedTo(operation.SGSTAmt, DecimalsNumber);
|
|
317
|
+
IGSTAMT = IGSTAMT + tr_utils_1.TrUtils.FixedTo(operation.IGSTAmt, DecimalsNumber);
|
|
318
|
+
Taxable = Taxable + tr_utils_1.TrUtils.FixedTo(operation.AfterLaborDisc, DecimalsNumber);
|
|
319
|
+
FinalTotal = FinalTotal + tr_utils_1.TrUtils.FixedTo(operation.AfterLaborTax, DecimalsNumber);
|
|
320
320
|
});
|
|
321
321
|
let dpartadding1 = {};
|
|
322
322
|
dpartadding1.SNo = '';
|
|
323
323
|
dpartadding1.Desc = 'Labor Total';
|
|
324
324
|
// dpartadding1.QtyAndUoM = Qty;
|
|
325
|
-
dpartadding1.UnPr = tr_utils_1.TrUtils.FixedTo(Taxable);
|
|
326
|
-
dpartadding1.SGSTAmt = tr_utils_1.TrUtils.FixedTo(SGSTAMT);
|
|
327
|
-
dpartadding1.IGSTAmt = tr_utils_1.TrUtils.FixedTo(IGSTAMT);
|
|
328
|
-
dpartadding1.CGSTAmt = tr_utils_1.TrUtils.FixedTo(CGSTAMT);
|
|
325
|
+
dpartadding1.UnPr = tr_utils_1.TrUtils.FixedTo(Taxable, DecimalsNumber);
|
|
326
|
+
dpartadding1.SGSTAmt = tr_utils_1.TrUtils.FixedTo(SGSTAMT, DecimalsNumber);
|
|
327
|
+
dpartadding1.IGSTAmt = tr_utils_1.TrUtils.FixedTo(IGSTAMT, DecimalsNumber);
|
|
328
|
+
dpartadding1.CGSTAmt = tr_utils_1.TrUtils.FixedTo(CGSTAMT, DecimalsNumber);
|
|
329
329
|
dpartadding1.TCode = ShowTaxColumn ? 114 : undefined;
|
|
330
330
|
dpartadding1.bold = true;
|
|
331
|
-
dpartadding1.LineTotal = tr_utils_1.TrUtils.FixPriceValue(FinalTotal);
|
|
331
|
+
dpartadding1.LineTotal = tr_utils_1.TrUtils.FixPriceValue(FinalTotal, DecimalsNumber);
|
|
332
332
|
Labor.push({ SNo: '' });
|
|
333
333
|
Labor.push(dpartadding1);
|
|
334
334
|
}
|
|
@@ -414,17 +414,17 @@ class InvoiceLetterheadPdfService {
|
|
|
414
414
|
});
|
|
415
415
|
return body;
|
|
416
416
|
}
|
|
417
|
-
static GetWithOutDiscAndTaxFieldHeader(Parts, Ops, ShowTaxColumn, PrintPartNo, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto) {
|
|
417
|
+
static GetWithOutDiscAndTaxFieldHeader(Parts, Ops, ShowTaxColumn, PrintPartNo, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber) {
|
|
418
418
|
if (Parts.length !== 0 || Ops.length !== 0) {
|
|
419
419
|
if (ShowTaxColumn) {
|
|
420
|
-
return this.TaxDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto);
|
|
420
|
+
return this.TaxDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber);
|
|
421
421
|
}
|
|
422
422
|
else {
|
|
423
423
|
if (ConsolidateGST) {
|
|
424
|
-
return this.ConsolidateDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto);
|
|
424
|
+
return this.ConsolidateDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber);
|
|
425
425
|
}
|
|
426
426
|
else {
|
|
427
|
-
return this.NoTaxDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto);
|
|
427
|
+
return this.NoTaxDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber);
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
430
|
}
|
|
@@ -433,7 +433,7 @@ class InvoiceLetterheadPdfService {
|
|
|
433
433
|
return a;
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
static TaxDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto) {
|
|
436
|
+
static TaxDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber) {
|
|
437
437
|
if (PrintPartNo) {
|
|
438
438
|
if (ShowIGST) {
|
|
439
439
|
return {
|
|
@@ -441,7 +441,7 @@ class InvoiceLetterheadPdfService {
|
|
|
441
441
|
table: {
|
|
442
442
|
widths: shared_print_service_1.PrintSharedService.TaxTableWidths(PrintPartNo, ShowIGST, ShowDiscountColumn),
|
|
443
443
|
// headerRows: 2,
|
|
444
|
-
body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto)
|
|
444
|
+
body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber)
|
|
445
445
|
},
|
|
446
446
|
layout: shared_print_service_1.PrintSharedService.LayOutStyle()
|
|
447
447
|
};
|
|
@@ -452,7 +452,7 @@ class InvoiceLetterheadPdfService {
|
|
|
452
452
|
table: {
|
|
453
453
|
widths: shared_print_service_1.PrintSharedService.TaxTableWidths(PrintPartNo, ShowIGST, ShowDiscountColumn),
|
|
454
454
|
// headerRows: 2,
|
|
455
|
-
body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto)
|
|
455
|
+
body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber)
|
|
456
456
|
},
|
|
457
457
|
layout: shared_print_service_1.PrintSharedService.LayOutStyle()
|
|
458
458
|
};
|
|
@@ -465,7 +465,7 @@ class InvoiceLetterheadPdfService {
|
|
|
465
465
|
table: {
|
|
466
466
|
widths: shared_print_service_1.PrintSharedService.TaxTableWidths(PrintPartNo, ShowIGST, ShowDiscountColumn),
|
|
467
467
|
// headerRows: 2,
|
|
468
|
-
body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto)
|
|
468
|
+
body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber)
|
|
469
469
|
},
|
|
470
470
|
layout: shared_print_service_1.PrintSharedService.LayOutStyle()
|
|
471
471
|
};
|
|
@@ -476,21 +476,21 @@ class InvoiceLetterheadPdfService {
|
|
|
476
476
|
table: {
|
|
477
477
|
widths: shared_print_service_1.PrintSharedService.TaxTableWidths(PrintPartNo, ShowIGST, ShowDiscountColumn),
|
|
478
478
|
// headerRows: 2,
|
|
479
|
-
body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto)
|
|
479
|
+
body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber)
|
|
480
480
|
},
|
|
481
481
|
layout: shared_print_service_1.PrintSharedService.LayOutStyle()
|
|
482
482
|
};
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
static ConsolidateDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto) {
|
|
486
|
+
static ConsolidateDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber) {
|
|
487
487
|
if (PrintPartNo) {
|
|
488
488
|
return {
|
|
489
489
|
style: 'tableExample',
|
|
490
490
|
table: {
|
|
491
491
|
widths: [25, 70, 263, 25, 60, 80, 10, 40],
|
|
492
492
|
// headerRows: 1,
|
|
493
|
-
body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto)
|
|
493
|
+
body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber)
|
|
494
494
|
},
|
|
495
495
|
layout: shared_print_service_1.PrintSharedService.LayOutStyle()
|
|
496
496
|
};
|
|
@@ -501,20 +501,20 @@ class InvoiceLetterheadPdfService {
|
|
|
501
501
|
table: {
|
|
502
502
|
widths: [25, 295, 50, 80, 80, 10, 40],
|
|
503
503
|
// headerRows: 1,
|
|
504
|
-
body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto)
|
|
504
|
+
body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber)
|
|
505
505
|
},
|
|
506
506
|
layout: shared_print_service_1.PrintSharedService.LayOutStyle()
|
|
507
507
|
};
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
|
-
static NoTaxDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto) {
|
|
510
|
+
static NoTaxDataTable(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber) {
|
|
511
511
|
if (PrintPartNo) {
|
|
512
512
|
return {
|
|
513
513
|
style: 'tableExample',
|
|
514
514
|
table: {
|
|
515
515
|
widths: shared_print_service_1.PrintSharedService.WidthForInsuranceOrNot(ShowDiscountColumn, PrintPartNo),
|
|
516
516
|
// headerRows: 1,
|
|
517
|
-
body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto)
|
|
517
|
+
body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber)
|
|
518
518
|
},
|
|
519
519
|
layout: shared_print_service_1.PrintSharedService.LayOutStyle()
|
|
520
520
|
};
|
|
@@ -525,7 +525,7 @@ class InvoiceLetterheadPdfService {
|
|
|
525
525
|
table: {
|
|
526
526
|
widths: shared_print_service_1.PrintSharedService.WidthForInsuranceOrNot(ShowDiscountColumn, PrintPartNo),
|
|
527
527
|
// headerRows: 1,
|
|
528
|
-
body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto)
|
|
528
|
+
body: this.BuildTableBodyForLaborAndParts(Parts, Ops, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ConsolidateGST, ShowDiscountColumn, isAuto, DecimalsNumber)
|
|
529
529
|
},
|
|
530
530
|
layout: shared_print_service_1.PrintSharedService.LayOutStyle()
|
|
531
531
|
};
|
|
@@ -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
|
{
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
export declare class InvoiceTotalsService {
|
|
2
|
-
static GetTotalsValue(opCodesList: any, PartsList: any, IsIndependentTax: boolean, DetailedInfo: boolean, LDisc: any, LPerc: string, PDisc: any, PPerc: string, Disc: any, Perc: string, TaxCodes: any, WithItems: boolean, Settings: any, Adjust: number, isRoundable: boolean): any;
|
|
2
|
+
static GetTotalsValue(opCodesList: any, PartsList: any, IsIndependentTax: boolean, DetailedInfo: boolean, LDisc: any, LPerc: string, PDisc: any, PPerc: string, Disc: any, Perc: string, TaxCodes: any, WithItems: boolean, Settings: any, Adjust: number, isRoundable: boolean, EntitySettings: any): any;
|
|
3
3
|
static CalculateLaborValues(opCodesList: any, IsIndependentTax: boolean): any;
|
|
4
4
|
static ResetLaborValues(opCodesList: any, IsIndependentTax: boolean): any;
|
|
5
5
|
static ResetLaborValueIfInvalid(Operation: any): any;
|
|
6
6
|
static CalculateLaborPartValues(PartsList: any, IsIndependentTax: boolean): any;
|
|
7
7
|
static ResetLaborPartValues(PartsList: any, IsIndependentTax: boolean): any;
|
|
8
8
|
static ResetLaborPartValueIfInvalid(Part: any): any;
|
|
9
|
-
static GetFinalRODataForSave(LaborList: any, PartsList: any, IsIndependentTax: boolean, LDisc: any, LPerc: string, PDisc: string, PPerc: string, Disc: any, Perc: string, DetailedInfo: boolean, Settings: any, Adjust: number, isRoundable: boolean): any;
|
|
9
|
+
static GetFinalRODataForSave(LaborList: any, PartsList: any, IsIndependentTax: boolean, LDisc: any, LPerc: string, PDisc: string, PPerc: string, Disc: any, Perc: string, DetailedInfo: boolean, Settings: any, Adjust: number, isRoundable: boolean, DecimalsNumber: any): any;
|
|
10
10
|
static SetMainDiscountValues(LPerc: string, PPerc: string, LDisc: any, PDisc: any, Disc: any, Perc: string, finalTotalsData: any, DetailedInfo: boolean): any;
|
|
11
11
|
static GetPartsAfterDiscount1(PartsList: any): number;
|
|
12
12
|
static GetLaborTotalAfterDiscount1(OperationsList: any): number;
|
|
13
|
-
static GetFinalCustomerTotalsData(finalTotalsData: any, LaborList: any, PartsList: any, IsIndependentTax: boolean, DetailedInfo: boolean, Adjust: number, isRoundable: boolean): any;
|
|
13
|
+
static GetFinalCustomerTotalsData(finalTotalsData: any, LaborList: any, PartsList: any, IsIndependentTax: boolean, DetailedInfo: boolean, Adjust: number, isRoundable: boolean, DecimalsNumber: any): any;
|
|
14
14
|
static GetSubTotalFor(LaborList: any, PartsList: any): any;
|
|
15
15
|
static GetLaborTotalAfterDiscount(LaborList: any): any;
|
|
16
16
|
static GetPartsTotalAfterDiscount(PartsList: any): any;
|
|
17
17
|
static GetRetPartsTotalAfterDiscount(PartsList: any): any;
|
|
18
18
|
static GetNonRetPartsTotalAfterDiscount(PartsList: any): any;
|
|
19
|
-
static GetDetailedTotalsData(finalTotalsData: any, IsIndependentTax: boolean, opCodesList: any, PartsList: any, TaxCodes: any): any;
|
|
20
|
-
static GetTaxGroupingForLaborByPerc(opCodesList: any, TaxCodes: any): any[];
|
|
21
|
-
static GetTaxGroupingForPartsByPerc(Parts: any, TaxCodes: any): any[];
|
|
22
|
-
static GetTaxGroupingInfoBySAC(FinalMatchedLabors: any, TaxCodes: any): any[];
|
|
19
|
+
static GetDetailedTotalsData(finalTotalsData: any, IsIndependentTax: boolean, opCodesList: any, PartsList: any, TaxCodes: any, DecimalsNumber: any): any;
|
|
20
|
+
static GetTaxGroupingForLaborByPerc(opCodesList: any, TaxCodes: any, DecimalsNumber: any): any[];
|
|
21
|
+
static GetTaxGroupingForPartsByPerc(Parts: any, TaxCodes: any, DecimalsNumber: any): any[];
|
|
22
|
+
static GetTaxGroupingInfoBySAC(FinalMatchedLabors: any, TaxCodes: any, DecimalsNumber: any): any[];
|
|
23
23
|
static CompareLaborByPerc(opCodesList: any, TaxCodes: any): any[];
|
|
24
24
|
static ComparePartsByPerc(Parts: any, TaxCodes: any): any[];
|
|
25
25
|
static GetLaborDiscountedTotal(LaborList: any, isTaxable: boolean, finalTotalsData: any): any;
|
|
@@ -29,15 +29,15 @@ export declare class InvoiceTotalsService {
|
|
|
29
29
|
static GetRetPartsTaxTotalFor(PartsList: any, IsIndependentTax: boolean): any;
|
|
30
30
|
static GetNonRetPartsTaxTotalFor(PartsList: any, IsIndependentTax: boolean): any;
|
|
31
31
|
static GetCustomerTotalBasedOnTaxType(finalTotalsData: any, LaborTaxAmount: number, PartsTaxAmount: number, LaborList: any, PartsList: any, IsIndependentTax: boolean, Adjust: any): any;
|
|
32
|
-
static GetRetCustomerTotalBasedOnTaxType(finalTotalsData: any, LaborTaxAmount: number, PartsTaxAmount: number, LaborList: any, PartsList: any, IsIndependentTax: boolean, Adjust: any): any;
|
|
33
|
-
static GetNonRetCustomerTotalBasedOnTaxType(finalTotalsData: any, LaborTaxAmount: number, PartsTaxAmount: number, LaborList: any, PartsList: any, IsIndependentTax: boolean, Adjust: any): any;
|
|
32
|
+
static GetRetCustomerTotalBasedOnTaxType(finalTotalsData: any, LaborTaxAmount: number, PartsTaxAmount: number, LaborList: any, PartsList: any, IsIndependentTax: boolean, Adjust: any, DecimalsNumber: any): any;
|
|
33
|
+
static GetNonRetCustomerTotalBasedOnTaxType(finalTotalsData: any, LaborTaxAmount: number, PartsTaxAmount: number, LaborList: any, PartsList: any, IsIndependentTax: boolean, Adjust: any, DecimalsNumber: any): any;
|
|
34
34
|
static LaborTotalAfterDiscount(LaborTotalAfterDisc: number, LaborTaxAmount: number, MainLDisc: number, LDiscInPerc: string): number;
|
|
35
35
|
static ItemsTotalAfterDiscount(PartsTotalAfterDisc: number, PartsTaxAmount: number, MainPDisc: number, PDiscInPerc: string): number;
|
|
36
36
|
static GetLaborGSTTaxTotal(opCodesList: any, IsIndependentTax: boolean): number[];
|
|
37
37
|
static GetPartGSTTaxTotal(PartsList: any, IsIndependentTax: boolean): number[];
|
|
38
|
-
static GetTaxGroupingForPartsByHSN(Parts: any, TaxCodes: any): any[];
|
|
38
|
+
static GetTaxGroupingForPartsByHSN(Parts: any, TaxCodes: any, DecimalsNumber: any): any[];
|
|
39
39
|
static GetCombinedTaxPercentage(Parts: any, TaxCodes: any): any;
|
|
40
40
|
static ComparePartsByHSN(Parts: any, TaxCodes: any): any[];
|
|
41
|
-
static GetTaxGroupingInfoByHSN(FinalMatchedParts: any, TaxCodes: any): any[];
|
|
41
|
+
static GetTaxGroupingInfoByHSN(FinalMatchedParts: any, TaxCodes: any, DecimalsNumber: any): any[];
|
|
42
42
|
static GetGSTValueBasedOnTaxCode(TCode: any, TaxCodes: any): any[];
|
|
43
43
|
}
|
|
@@ -4,7 +4,7 @@ exports.InvoiceTotalsService = void 0;
|
|
|
4
4
|
const aggregation_1 = require("../../aggregation/aggregation");
|
|
5
5
|
const tr_utils_1 = require("../../utils/tr-utils");
|
|
6
6
|
class InvoiceTotalsService {
|
|
7
|
-
static GetTotalsValue(opCodesList, PartsList, IsIndependentTax, DetailedInfo, LDisc, LPerc, PDisc, PPerc, Disc, Perc, TaxCodes, WithItems, Settings, Adjust, isRoundable) {
|
|
7
|
+
static GetTotalsValue(opCodesList, PartsList, IsIndependentTax, DetailedInfo, LDisc, LPerc, PDisc, PPerc, Disc, Perc, TaxCodes, WithItems, Settings, Adjust, isRoundable, EntitySettings) {
|
|
8
8
|
LPerc = tr_utils_1.TrUtils.SetPercToStringIfNull(LPerc);
|
|
9
9
|
PPerc = tr_utils_1.TrUtils.SetPercToStringIfNull(PPerc);
|
|
10
10
|
Perc = tr_utils_1.TrUtils.SetPercToStringIfNull(Perc);
|
|
@@ -19,9 +19,9 @@ class InvoiceTotalsService {
|
|
|
19
19
|
}
|
|
20
20
|
opCodesList = this.CalculateLaborValues(opCodesList, IsIndependentTax);
|
|
21
21
|
PartsList = this.CalculateLaborPartValues(PartsList, IsIndependentTax);
|
|
22
|
-
let finalTotalsData = this.GetFinalRODataForSave(opCodesList, PartsList, IsIndependentTax, LDisc, LPerc, PDisc, PPerc, Disc, Perc, DetailedInfo, Settings, tr_utils_1.TrUtils.SetValueToZeroIfNull(Adjust), isRoundable);
|
|
22
|
+
let finalTotalsData = this.GetFinalRODataForSave(opCodesList, PartsList, IsIndependentTax, LDisc, LPerc, PDisc, PPerc, Disc, Perc, DetailedInfo, Settings, tr_utils_1.TrUtils.SetValueToZeroIfNull(Adjust), isRoundable, EntitySettings.DecimalsNumber);
|
|
23
23
|
if (DetailedInfo) {
|
|
24
|
-
finalTotalsData = this.GetDetailedTotalsData(finalTotalsData, IsIndependentTax, opCodesList, PartsList, TaxCodes);
|
|
24
|
+
finalTotalsData = this.GetDetailedTotalsData(finalTotalsData, IsIndependentTax, opCodesList, PartsList, TaxCodes, EntitySettings.DecimalsNumber);
|
|
25
25
|
}
|
|
26
26
|
if (WithItems) {
|
|
27
27
|
finalTotalsData.Ops = opCodesList;
|
|
@@ -96,11 +96,11 @@ class InvoiceTotalsService {
|
|
|
96
96
|
Part.IGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.IGST);
|
|
97
97
|
return Part;
|
|
98
98
|
}
|
|
99
|
-
static GetFinalRODataForSave(LaborList, PartsList, IsIndependentTax, LDisc, LPerc, PDisc, PPerc, Disc, Perc, DetailedInfo, Settings, Adjust, isRoundable) {
|
|
99
|
+
static GetFinalRODataForSave(LaborList, PartsList, IsIndependentTax, LDisc, LPerc, PDisc, PPerc, Disc, Perc, DetailedInfo, Settings, Adjust, isRoundable, DecimalsNumber) {
|
|
100
100
|
let finalTotalsData = {};
|
|
101
101
|
finalTotalsData = this.SetMainDiscountValues(LPerc, PPerc, LDisc, PDisc, Disc, Perc, finalTotalsData, DetailedInfo);
|
|
102
102
|
finalTotalsData.Settings = Settings;
|
|
103
|
-
finalTotalsData = this.GetFinalCustomerTotalsData(finalTotalsData, LaborList, PartsList, IsIndependentTax, DetailedInfo, Adjust, isRoundable);
|
|
103
|
+
finalTotalsData = this.GetFinalCustomerTotalsData(finalTotalsData, LaborList, PartsList, IsIndependentTax, DetailedInfo, Adjust, isRoundable, DecimalsNumber);
|
|
104
104
|
return finalTotalsData;
|
|
105
105
|
}
|
|
106
106
|
static SetMainDiscountValues(LPerc, PPerc, LDisc, PDisc, Disc, Perc, finalTotalsData, DetailedInfo) {
|
|
@@ -136,13 +136,13 @@ class InvoiceTotalsService {
|
|
|
136
136
|
});
|
|
137
137
|
return AfterIndvidualDisc;
|
|
138
138
|
}
|
|
139
|
-
static GetFinalCustomerTotalsData(finalTotalsData, LaborList, PartsList, IsIndependentTax, DetailedInfo, Adjust, isRoundable) {
|
|
139
|
+
static GetFinalCustomerTotalsData(finalTotalsData, LaborList, PartsList, IsIndependentTax, DetailedInfo, Adjust, isRoundable, DecimalsNumber) {
|
|
140
140
|
let CustomerAfterDiscTotals = this.GetSubTotalFor(LaborList, PartsList);
|
|
141
141
|
let CustLaborTaxTotal = this.GetLaborTaxTotalFor(LaborList, IsIndependentTax);
|
|
142
142
|
let CustPartTaxTotal = this.GetPartsTaxTotalFor(PartsList, IsIndependentTax);
|
|
143
143
|
let RetCustParrtTaxTotal = this.GetRetPartsTaxTotalFor(PartsList, IsIndependentTax);
|
|
144
144
|
let NonRetCustParrtTaxTotal = this.GetNonRetPartsTaxTotalFor(PartsList, IsIndependentTax);
|
|
145
|
-
finalTotalsData.SubTotal = tr_utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals);
|
|
145
|
+
finalTotalsData.SubTotal = tr_utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals, DecimalsNumber);
|
|
146
146
|
let CustLaborDiscTotal = this.GetLaborDiscountedTotal(LaborList, IsIndependentTax, finalTotalsData);
|
|
147
147
|
let CustPartsDiscTotal = this.GetPartDiscountedTotal(PartsList, IsIndependentTax, finalTotalsData);
|
|
148
148
|
let CustLaborTotalAfterDisc = this.GetLaborTotalAfterDiscount(LaborList);
|
|
@@ -158,21 +158,21 @@ class InvoiceTotalsService {
|
|
|
158
158
|
finalTotalsData.SIndTotal = AmtAfterIndvidualItemDisc;
|
|
159
159
|
finalTotalsData.Disc = !tr_utils_1.TrUtils.IsEmpty(finalTotalsData.Perc) ? tr_utils_1.TrUtils.ConvertPercToVal(finalTotalsData.Perc, AmtAfterIndvidualItemDisc) : finalTotalsData.Disc;
|
|
160
160
|
let CustTotal = this.GetCustomerTotalBasedOnTaxType(finalTotalsData, CustLaborTaxTotal, CustPartTaxTotal, LaborList, PartsList, IsIndependentTax, Adjust);
|
|
161
|
-
let RetCustTotal = this.GetRetCustomerTotalBasedOnTaxType(finalTotalsData, CustLaborTaxTotal, RetCustParrtTaxTotal, LaborList, PartsList, IsIndependentTax, Adjust);
|
|
162
|
-
let NonRetCustTotal = this.GetNonRetCustomerTotalBasedOnTaxType(finalTotalsData, CustLaborTaxTotal, NonRetCustParrtTaxTotal, LaborList, PartsList, IsIndependentTax, Adjust);
|
|
161
|
+
let RetCustTotal = this.GetRetCustomerTotalBasedOnTaxType(finalTotalsData, CustLaborTaxTotal, RetCustParrtTaxTotal, LaborList, PartsList, IsIndependentTax, Adjust, DecimalsNumber);
|
|
162
|
+
let NonRetCustTotal = this.GetNonRetCustomerTotalBasedOnTaxType(finalTotalsData, CustLaborTaxTotal, NonRetCustParrtTaxTotal, LaborList, PartsList, IsIndependentTax, Adjust, DecimalsNumber);
|
|
163
163
|
if (isRoundable) {
|
|
164
164
|
finalTotalsData.Round = (0, aggregation_1.subtraction)(Math.round(CustTotal), CustTotal);
|
|
165
165
|
finalTotalsData.Total = Math.round(CustTotal);
|
|
166
166
|
}
|
|
167
167
|
else {
|
|
168
|
-
finalTotalsData.Total = tr_utils_1.TrUtils.FixedTo(CustTotal);
|
|
168
|
+
finalTotalsData.Total = tr_utils_1.TrUtils.FixedTo(CustTotal, DecimalsNumber);
|
|
169
169
|
}
|
|
170
|
-
finalTotalsData.RetTotal = tr_utils_1.TrUtils.FixedTo(RetCustTotal);
|
|
171
|
-
finalTotalsData.NonRetTotal = tr_utils_1.TrUtils.FixedTo(NonRetCustTotal);
|
|
170
|
+
finalTotalsData.RetTotal = tr_utils_1.TrUtils.FixedTo(RetCustTotal, DecimalsNumber);
|
|
171
|
+
finalTotalsData.NonRetTotal = tr_utils_1.TrUtils.FixedTo(NonRetCustTotal, DecimalsNumber);
|
|
172
172
|
if (DetailedInfo) {
|
|
173
|
-
finalTotalsData.FixedSubTotal = tr_utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals);
|
|
174
|
-
finalTotalsData.FixedTotal = tr_utils_1.TrUtils.FixedTo(CustTotal);
|
|
175
|
-
finalTotalsData.Adj = tr_utils_1.TrUtils.FixedTo(Adjust);
|
|
173
|
+
finalTotalsData.FixedSubTotal = tr_utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals, DecimalsNumber);
|
|
174
|
+
finalTotalsData.FixedTotal = tr_utils_1.TrUtils.FixedTo(CustTotal, DecimalsNumber);
|
|
175
|
+
finalTotalsData.Adj = tr_utils_1.TrUtils.FixedTo(Adjust, DecimalsNumber);
|
|
176
176
|
}
|
|
177
177
|
return finalTotalsData;
|
|
178
178
|
}
|
|
@@ -219,7 +219,7 @@ class InvoiceTotalsService {
|
|
|
219
219
|
});
|
|
220
220
|
return NonRetPartsTotalAfterDisc;
|
|
221
221
|
}
|
|
222
|
-
static GetDetailedTotalsData(finalTotalsData, IsIndependentTax, opCodesList, PartsList, TaxCodes) {
|
|
222
|
+
static GetDetailedTotalsData(finalTotalsData, IsIndependentTax, opCodesList, PartsList, TaxCodes, DecimalsNumber) {
|
|
223
223
|
finalTotalsData.CustLaborDiscTotal = this.GetLaborDiscountedTotal(opCodesList, IsIndependentTax, finalTotalsData);
|
|
224
224
|
finalTotalsData.CustPartsDiscTotal = this.GetPartDiscountedTotal(PartsList, IsIndependentTax, finalTotalsData);
|
|
225
225
|
finalTotalsData.CustLaborTotalAfterDisc = this.GetLaborTotalAfterDiscount(opCodesList);
|
|
@@ -243,36 +243,36 @@ class InvoiceTotalsService {
|
|
|
243
243
|
finalTotalsData.CustPartSGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(PartTaxInfo[1]);
|
|
244
244
|
finalTotalsData.CustLaborAfterTax = (0, aggregation_1.addition)(finalTotalsData.CustLaborITax, finalTotalsData.CustLaborTotalAfterDisc);
|
|
245
245
|
finalTotalsData.CustPartAfterTax = (0, aggregation_1.addition)(finalTotalsData.CustPartITax, finalTotalsData.CustPartsTotalAfterDisc);
|
|
246
|
-
finalTotalsData.CustTaxGroupData = this.GetTaxGroupingForPartsByHSN(PartsList, TaxCodes);
|
|
247
|
-
finalTotalsData.CustTaxGroupDataByPerc = this.GetTaxGroupingForPartsByPerc(PartsList, TaxCodes);
|
|
248
|
-
finalTotalsData.CustLaborTaxGroupDataByPerc = this.GetTaxGroupingForLaborByPerc(opCodesList, TaxCodes);
|
|
249
|
-
finalTotalsData.CustTotalRoundedBy = tr_utils_1.TrUtils.FixedTo(finalTotalsData.Round);
|
|
250
|
-
finalTotalsData.CustRoundedTotal = tr_utils_1.TrUtils.FixedTo(finalTotalsData.Total);
|
|
251
|
-
finalTotalsData.CustRetRoundedTotal = tr_utils_1.TrUtils.FixedTo(finalTotalsData.RetTotal);
|
|
252
|
-
finalTotalsData.CustNonRetRoundedTotal = tr_utils_1.TrUtils.FixedTo(finalTotalsData.NonRetTotal);
|
|
246
|
+
finalTotalsData.CustTaxGroupData = this.GetTaxGroupingForPartsByHSN(PartsList, TaxCodes, DecimalsNumber);
|
|
247
|
+
finalTotalsData.CustTaxGroupDataByPerc = this.GetTaxGroupingForPartsByPerc(PartsList, TaxCodes, DecimalsNumber);
|
|
248
|
+
finalTotalsData.CustLaborTaxGroupDataByPerc = this.GetTaxGroupingForLaborByPerc(opCodesList, TaxCodes, DecimalsNumber);
|
|
249
|
+
finalTotalsData.CustTotalRoundedBy = tr_utils_1.TrUtils.FixedTo(finalTotalsData.Round, DecimalsNumber);
|
|
250
|
+
finalTotalsData.CustRoundedTotal = tr_utils_1.TrUtils.FixedTo(finalTotalsData.Total, DecimalsNumber);
|
|
251
|
+
finalTotalsData.CustRetRoundedTotal = tr_utils_1.TrUtils.FixedTo(finalTotalsData.RetTotal, DecimalsNumber);
|
|
252
|
+
finalTotalsData.CustNonRetRoundedTotal = tr_utils_1.TrUtils.FixedTo(finalTotalsData.NonRetTotal, DecimalsNumber);
|
|
253
253
|
for (var key in finalTotalsData) {
|
|
254
254
|
if (key !== 'Total' && key !== 'SubTotal' &&
|
|
255
255
|
key !== 'LDisc' && key !== 'LPerc' && key !== 'PDisc' &&
|
|
256
256
|
key !== 'PPerc' && key !== 'Disc' && key !== 'Perc' && key !== 'Tax'
|
|
257
257
|
&& typeof finalTotalsData[key] === 'number') {
|
|
258
|
-
finalTotalsData[key] = tr_utils_1.TrUtils.FixPriceValue(finalTotalsData[key]);
|
|
258
|
+
finalTotalsData[key] = tr_utils_1.TrUtils.FixPriceValue(finalTotalsData[key], DecimalsNumber);
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
261
|
return finalTotalsData;
|
|
262
262
|
}
|
|
263
|
-
static GetTaxGroupingForLaborByPerc(opCodesList, TaxCodes) {
|
|
263
|
+
static GetTaxGroupingForLaborByPerc(opCodesList, TaxCodes, DecimalsNumber) {
|
|
264
264
|
opCodesList = this.GetCombinedTaxPercentage(tr_utils_1.TrUtils.Stringify(opCodesList), TaxCodes);
|
|
265
265
|
// opCodesList = this.ResetPartsHSNIfInvalid(opCodesList);
|
|
266
266
|
let FinalMatchedParts = this.CompareLaborByPerc(opCodesList, TaxCodes);
|
|
267
|
-
return this.GetTaxGroupingInfoBySAC(FinalMatchedParts, TaxCodes);
|
|
267
|
+
return this.GetTaxGroupingInfoBySAC(FinalMatchedParts, TaxCodes, DecimalsNumber);
|
|
268
268
|
}
|
|
269
|
-
static GetTaxGroupingForPartsByPerc(Parts, TaxCodes) {
|
|
269
|
+
static GetTaxGroupingForPartsByPerc(Parts, TaxCodes, DecimalsNumber) {
|
|
270
270
|
Parts = this.GetCombinedTaxPercentage(tr_utils_1.TrUtils.Stringify(Parts), TaxCodes);
|
|
271
271
|
// Parts = this.ResetPartsHSNIfInvalid(Parts);
|
|
272
272
|
let FinalMatchedParts = this.ComparePartsByPerc(Parts, TaxCodes);
|
|
273
|
-
return this.GetTaxGroupingInfoByHSN(FinalMatchedParts, TaxCodes);
|
|
273
|
+
return this.GetTaxGroupingInfoByHSN(FinalMatchedParts, TaxCodes, DecimalsNumber);
|
|
274
274
|
}
|
|
275
|
-
static GetTaxGroupingInfoBySAC(FinalMatchedLabors, TaxCodes) {
|
|
275
|
+
static GetTaxGroupingInfoBySAC(FinalMatchedLabors, TaxCodes, DecimalsNumber) {
|
|
276
276
|
let SACTaxInfo = [];
|
|
277
277
|
FinalMatchedLabors === null || FinalMatchedLabors === void 0 ? void 0 : FinalMatchedLabors.forEach((MatchedLabor) => {
|
|
278
278
|
let TaxInfo = {};
|
|
@@ -284,20 +284,20 @@ class InvoiceTotalsService {
|
|
|
284
284
|
let SAC = MatchedLabor[0].SAC;
|
|
285
285
|
TaxInfo.CombinedTaxPercentage = MatchedLabor[0].CombinedTaxPercentage;
|
|
286
286
|
MatchedLabor === null || MatchedLabor === void 0 ? void 0 : MatchedLabor.forEach((argMatchedGSTLabor) => {
|
|
287
|
-
TaxOnAmount = (0, aggregation_1.addition)(TaxOnAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTLabor.AfterLaborDisc));
|
|
288
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTLabor.CGST));
|
|
289
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTLabor.IGST));
|
|
290
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTLabor.SGST));
|
|
291
|
-
CGSTAmt = (0, aggregation_1.addition)(CGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTLabor.CGST));
|
|
292
|
-
SGSTAmt = (0, aggregation_1.addition)(SGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTLabor.SGST));
|
|
293
|
-
IGSTAmt = (0, aggregation_1.addition)(IGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTLabor.IGST));
|
|
287
|
+
TaxOnAmount = (0, aggregation_1.addition)(TaxOnAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTLabor.AfterLaborDisc, DecimalsNumber));
|
|
288
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTLabor.CGST, DecimalsNumber));
|
|
289
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTLabor.IGST, DecimalsNumber));
|
|
290
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTLabor.SGST, DecimalsNumber));
|
|
291
|
+
CGSTAmt = (0, aggregation_1.addition)(CGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTLabor.CGST, DecimalsNumber));
|
|
292
|
+
SGSTAmt = (0, aggregation_1.addition)(SGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTLabor.SGST, DecimalsNumber));
|
|
293
|
+
IGSTAmt = (0, aggregation_1.addition)(IGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTLabor.IGST, DecimalsNumber));
|
|
294
294
|
});
|
|
295
295
|
TaxInfo.SAC = SAC;
|
|
296
296
|
TaxInfo.CGSTAmt = CGSTAmt;
|
|
297
297
|
TaxInfo.SGSTAmt = SGSTAmt;
|
|
298
298
|
TaxInfo.IGSTAmt = IGSTAmt;
|
|
299
|
-
TaxInfo.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(TaxOnAmount);
|
|
300
|
-
TaxInfo.TotalTaxAmount = tr_utils_1.TrUtils.FixPriceValue(TaxAmount);
|
|
299
|
+
TaxInfo.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(TaxOnAmount, DecimalsNumber);
|
|
300
|
+
TaxInfo.TotalTaxAmount = tr_utils_1.TrUtils.FixPriceValue(TaxAmount, DecimalsNumber);
|
|
301
301
|
TaxInfo.ItemsCount = MatchedLabor.length;
|
|
302
302
|
let GSTValues = this.GetGSTValueBasedOnTaxCode(MatchedLabor[0].TCode, TaxCodes);
|
|
303
303
|
TaxInfo.CGST = GSTValues[0];
|
|
@@ -457,24 +457,24 @@ class InvoiceTotalsService {
|
|
|
457
457
|
return (0, aggregation_1.addition)(LaborTotalAfterDisc, PartsTotalAfterDisc, Adjust);
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
|
-
static GetRetCustomerTotalBasedOnTaxType(finalTotalsData, LaborTaxAmount, PartsTaxAmount, LaborList, PartsList, IsIndependentTax, Adjust) {
|
|
460
|
+
static GetRetCustomerTotalBasedOnTaxType(finalTotalsData, LaborTaxAmount, PartsTaxAmount, LaborList, PartsList, IsIndependentTax, Adjust, DecimalsNumber) {
|
|
461
461
|
let LaborTotalAfterDisc = this.GetLaborTotalAfterDiscount(LaborList);
|
|
462
462
|
let PartsTotalAfterDisc = this.GetRetPartsTotalAfterDiscount(PartsList);
|
|
463
463
|
if (IsIndependentTax) {
|
|
464
464
|
return (0, aggregation_1.addition)(LaborTotalAfterDisc, PartsTotalAfterDisc, LaborTaxAmount, PartsTaxAmount);
|
|
465
465
|
}
|
|
466
466
|
else {
|
|
467
|
-
return tr_utils_1.TrUtils.FixedTo((0, aggregation_1.addition)(LaborTotalAfterDisc, PartsTotalAfterDisc));
|
|
467
|
+
return tr_utils_1.TrUtils.FixedTo((0, aggregation_1.addition)(LaborTotalAfterDisc, PartsTotalAfterDisc), DecimalsNumber);
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
|
-
static GetNonRetCustomerTotalBasedOnTaxType(finalTotalsData, LaborTaxAmount, PartsTaxAmount, LaborList, PartsList, IsIndependentTax, Adjust) {
|
|
470
|
+
static GetNonRetCustomerTotalBasedOnTaxType(finalTotalsData, LaborTaxAmount, PartsTaxAmount, LaborList, PartsList, IsIndependentTax, Adjust, DecimalsNumber) {
|
|
471
471
|
let LaborTotalAfterDisc = this.GetLaborTotalAfterDiscount(LaborList);
|
|
472
472
|
let PartsTotalAfterDisc = this.GetNonRetPartsTotalAfterDiscount(PartsList);
|
|
473
473
|
if (IsIndependentTax) {
|
|
474
474
|
return (0, aggregation_1.addition)(LaborTotalAfterDisc, PartsTotalAfterDisc, LaborTaxAmount, PartsTaxAmount);
|
|
475
475
|
}
|
|
476
476
|
else {
|
|
477
|
-
return tr_utils_1.TrUtils.FixedTo((0, aggregation_1.addition)(LaborTotalAfterDisc, PartsTotalAfterDisc));
|
|
477
|
+
return tr_utils_1.TrUtils.FixedTo((0, aggregation_1.addition)(LaborTotalAfterDisc, PartsTotalAfterDisc), DecimalsNumber);
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
static LaborTotalAfterDiscount(LaborTotalAfterDisc, LaborTaxAmount, MainLDisc, LDiscInPerc) {
|
|
@@ -539,11 +539,11 @@ class InvoiceTotalsService {
|
|
|
539
539
|
}
|
|
540
540
|
return [TotalCGSTAmt, TotalSGSTAmt, TotalIGSTAmt];
|
|
541
541
|
}
|
|
542
|
-
static GetTaxGroupingForPartsByHSN(Parts, TaxCodes) {
|
|
542
|
+
static GetTaxGroupingForPartsByHSN(Parts, TaxCodes, DecimalsNumber) {
|
|
543
543
|
Parts = this.GetCombinedTaxPercentage(tr_utils_1.TrUtils.Stringify(Parts), TaxCodes);
|
|
544
544
|
// Parts = this.ResetPartsHSNIfInvalid(Parts);
|
|
545
545
|
let FinalMatchedParts = this.ComparePartsByHSN(Parts, TaxCodes);
|
|
546
|
-
return this.GetTaxGroupingInfoByHSN(FinalMatchedParts, TaxCodes);
|
|
546
|
+
return this.GetTaxGroupingInfoByHSN(FinalMatchedParts, TaxCodes, DecimalsNumber);
|
|
547
547
|
}
|
|
548
548
|
static GetCombinedTaxPercentage(Parts, TaxCodes) {
|
|
549
549
|
Parts.forEach((Part) => {
|
|
@@ -592,7 +592,7 @@ class InvoiceTotalsService {
|
|
|
592
592
|
});
|
|
593
593
|
return FinalMatchedParts;
|
|
594
594
|
}
|
|
595
|
-
static GetTaxGroupingInfoByHSN(FinalMatchedParts, TaxCodes) {
|
|
595
|
+
static GetTaxGroupingInfoByHSN(FinalMatchedParts, TaxCodes, DecimalsNumber) {
|
|
596
596
|
let HSNTaxInfo = [];
|
|
597
597
|
FinalMatchedParts.forEach((MatchedPart) => {
|
|
598
598
|
let TaxInfo = {};
|
|
@@ -604,20 +604,20 @@ class InvoiceTotalsService {
|
|
|
604
604
|
let HSN = MatchedPart[0].HSN;
|
|
605
605
|
TaxInfo.CombinedTaxPercentage = MatchedPart[0].CombinedTaxPercentage;
|
|
606
606
|
MatchedPart.forEach((argMatchedGSTPart) => {
|
|
607
|
-
TaxOnAmount = (0, aggregation_1.addition)(TaxOnAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.AfterPartDisc));
|
|
608
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CGST));
|
|
609
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.IGST));
|
|
610
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.SGST));
|
|
611
|
-
CGSTAmt = (0, aggregation_1.addition)(CGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CGST));
|
|
612
|
-
SGSTAmt = (0, aggregation_1.addition)(SGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.SGST));
|
|
613
|
-
IGSTAmt = (0, aggregation_1.addition)(IGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.IGST));
|
|
607
|
+
TaxOnAmount = (0, aggregation_1.addition)(TaxOnAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.AfterPartDisc, DecimalsNumber));
|
|
608
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CGST, DecimalsNumber));
|
|
609
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.IGST, DecimalsNumber));
|
|
610
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.SGST, DecimalsNumber));
|
|
611
|
+
CGSTAmt = (0, aggregation_1.addition)(CGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CGST, DecimalsNumber));
|
|
612
|
+
SGSTAmt = (0, aggregation_1.addition)(SGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.SGST, DecimalsNumber));
|
|
613
|
+
IGSTAmt = (0, aggregation_1.addition)(IGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.IGST, DecimalsNumber));
|
|
614
614
|
});
|
|
615
615
|
TaxInfo.HSN = HSN;
|
|
616
616
|
TaxInfo.CGSTAmt = CGSTAmt;
|
|
617
617
|
TaxInfo.SGSTAmt = SGSTAmt;
|
|
618
618
|
TaxInfo.IGSTAmt = IGSTAmt;
|
|
619
|
-
TaxInfo.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(TaxOnAmount);
|
|
620
|
-
TaxInfo.TotalTaxAmount = tr_utils_1.TrUtils.FixPriceValue(TaxAmount);
|
|
619
|
+
TaxInfo.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(TaxOnAmount, DecimalsNumber);
|
|
620
|
+
TaxInfo.TotalTaxAmount = tr_utils_1.TrUtils.FixPriceValue(TaxAmount, DecimalsNumber);
|
|
621
621
|
TaxInfo.ItemsCount = MatchedPart.length;
|
|
622
622
|
// let GSTValues: any[] = this.GetGSTValueBasedOnTaxCode(MatchedPart[0].TCode, TaxCodes);
|
|
623
623
|
// TaxInfo.CGST = GSTValues[0];
|
|
@@ -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);
|