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 InvoiceprintService {
|
|
|
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 InvoiceprintService {
|
|
|
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 InvoiceprintService {
|
|
|
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 InvoiceprintService {
|
|
|
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 InvoiceprintService {
|
|
|
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 InvoiceprintService {
|
|
|
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 InvoiceprintService {
|
|
|
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 InvoiceprintService {
|
|
|
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 InvoiceprintService {
|
|
|
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 InvoiceprintService {
|
|
|
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 InvoiceprintService {
|
|
|
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 InvoiceprintService {
|
|
|
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 InvoiceprintService {
|
|
|
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 InvoiceprintService {
|
|
|
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 InvoiceprintService {
|
|
|
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 InvoiceprintService {
|
|
|
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 InvoiceprintService {
|
|
|
725
725
|
stack: [
|
|
726
726
|
{
|
|
727
727
|
columns: [{ text: '' }, { text: 'Gate Pass', bold: true, fontSize: 9, alignment: 'center', marginTop: 5 },
|
|
728
|
-
{ text: 'Date: ' + my_date_1.MyDate.ConvertUTCDateToReadable(my_date_1.MyDate.GetDateTimeNowInUTC()), marginTop: 5, fontSize: 9, alignment: 'right' }]
|
|
728
|
+
{ text: 'Date: ' + my_date_1.MyDate.ConvertUTCDateToReadable(my_date_1.MyDate.GetDateTimeNowInUTC(ROPrintData.Entity.User.TZ)), marginTop: 5, fontSize: 9, alignment: 'right' }]
|
|
729
729
|
},
|
|
730
730
|
{ text: ROPrintData.Entity.CName, alignment: 'center', bold: true, fontSize: 12, marginTop: 5, marginBottom: 5 },
|
|
731
731
|
{
|
|
@@ -3,8 +3,8 @@ export declare class InvPrintService {
|
|
|
3
3
|
static GetPrintConditionsBasedOnInput(InvoicePrintData: any, IncludeGST: boolean, ConsolidateGST: boolean, ForInsurance: boolean, SType: any, OriginalInvoiceData: any, IsProforma: boolean, PartsPrint: boolean, LaborPrint: boolean): any;
|
|
4
4
|
static GetInvoiceTypeHeading(InvoicePrintData: any, OriginalInvoiceData: any, IncludeGST: boolean, ConsolidateGST: boolean, IsProforma: boolean, PartsPrint: boolean, LaborPrint: boolean): any;
|
|
5
5
|
static GetInvoiceOtherDetailsForPrint(InvoicePrintData: any, argInvoiceData: any): any;
|
|
6
|
-
static GetLaborPrintInfo(LaborList: any, Consolidate: boolean, TaxCodes: any, LineTotal: string): any;
|
|
7
|
-
static GetItemsPrintInfo(Items: any, Consolidate: boolean, TaxCodes: any, LineTotal: string): any;
|
|
6
|
+
static GetLaborPrintInfo(LaborList: any, Consolidate: boolean, TaxCodes: any, LineTotal: string, DecimalsNumber: number): any;
|
|
7
|
+
static GetItemsPrintInfo(Items: any, Consolidate: boolean, TaxCodes: any, LineTotal: string, DecimalsNumber: number): any;
|
|
8
8
|
static getTaxName(TCode: any, TaxCodes: any): any;
|
|
9
9
|
static ReverseItemsForInvoicePrint(argInvoiceData: any): any;
|
|
10
10
|
static PrepareFormatForInvoicePrint(InvoicePrintData: any, ROType: any, InvoiceStatus: any): any[];
|
|
@@ -12,5 +12,5 @@ export declare class InvPrintService {
|
|
|
12
12
|
static GetBillNameForInvoicePrint(argInvoiceData: any, InvoicePrintData: any): any;
|
|
13
13
|
static GetCustomerDetails(argInvoiceData: any): any;
|
|
14
14
|
static GetBillToName(Title: any, Name: string): string;
|
|
15
|
-
static GetPaymentsTotal(Credits: any, InvoicePayments: any, Total: number, InvoiceStatus: string): any;
|
|
15
|
+
static GetPaymentsTotal(Credits: any, InvoicePayments: any, Total: number, InvoiceStatus: string, DecimalsNumber: number): any;
|
|
16
16
|
}
|
|
@@ -31,19 +31,19 @@ class InvPrintService {
|
|
|
31
31
|
InvoicePrintData = shared_print_service_1.PrintSharedService.GetEntityHeaderStyles(InvoicePrintData, OriginalEntityData, image);
|
|
32
32
|
InvoicePrintData = this.GetInvoiceOtherDetailsForPrint(InvoicePrintData, argInvoiceData);
|
|
33
33
|
let IsTaxable = (IncludeGST && tr_utils_1.TrUtils.isTaxable(argInvoiceData.Settings.Tax)) ? true : false;
|
|
34
|
-
let finalTotalsData = invoice_total_service_1.InvoiceTotalsService.GetTotalsValue(argInvoiceData.Ops, argInvoiceData.Items, IsTaxable, true, argInvoiceData.LDisc, argInvoiceData.LPerc, argInvoiceData.PDisc, argInvoiceData.PPerc, argInvoiceData.Disc, argInvoiceData.Perc, TaxCodes, true, argInvoiceData.Settings, argInvoiceData.Adjust, InvoicePrintData.Entity.Round);
|
|
34
|
+
let finalTotalsData = invoice_total_service_1.InvoiceTotalsService.GetTotalsValue(argInvoiceData.Ops, argInvoiceData.Items, IsTaxable, true, argInvoiceData.LDisc, argInvoiceData.LPerc, argInvoiceData.PDisc, argInvoiceData.PPerc, argInvoiceData.Disc, argInvoiceData.Perc, TaxCodes, true, argInvoiceData.Settings, argInvoiceData.Adjust, InvoicePrintData.Entity.Round, InvoicePrintData.Entity);
|
|
35
35
|
if (ConsolidateGST) {
|
|
36
36
|
finalTotalsData.CustLaborTotalBeforeDisc = finalTotalsData.CustLaborAfterTax;
|
|
37
37
|
finalTotalsData.CustPartsTotalBeforeDisc = finalTotalsData.CustPartAfterTax;
|
|
38
38
|
}
|
|
39
39
|
InvoicePrintData = tr_utils_1.TrUtils.ConcatObjects(InvoicePrintData, finalTotalsData);
|
|
40
|
-
InvoicePrintData.Ops = this.GetLaborPrintInfo(InvoicePrintData.Ops, ConsolidateGST, TaxCodes, (_b = (_a = OriginalEntityData.Entity.Settings) === null || _a === void 0 ? void 0 : _a.Acc) === null || _b === void 0 ? void 0 : _b.LTot);
|
|
41
|
-
InvoicePrintData.Items = this.GetItemsPrintInfo(InvoicePrintData.Items, ConsolidateGST, TaxCodes, (_d = (_c = OriginalEntityData.Entity.Settings) === null || _c === void 0 ? void 0 : _c.Acc) === null || _d === void 0 ? void 0 : _d.LTot);
|
|
40
|
+
InvoicePrintData.Ops = this.GetLaborPrintInfo(InvoicePrintData.Ops, ConsolidateGST, TaxCodes, (_b = (_a = OriginalEntityData.Entity.Settings) === null || _a === void 0 ? void 0 : _a.Acc) === null || _b === void 0 ? void 0 : _b.LTot, InvoicePrintData.Entity.DecimalsNumber);
|
|
41
|
+
InvoicePrintData.Items = this.GetItemsPrintInfo(InvoicePrintData.Items, ConsolidateGST, TaxCodes, (_d = (_c = OriginalEntityData.Entity.Settings) === null || _c === void 0 ? void 0 : _c.Acc) === null || _d === void 0 ? void 0 : _d.LTot, InvoicePrintData.Entity.DecimalsNumber);
|
|
42
42
|
argInvoiceData = this.ReverseItemsForInvoicePrint(argInvoiceData);
|
|
43
43
|
InvoicePrintData.PrintInfo = this.PrepareFormatForInvoicePrint(InvoicePrintData, code_enums_1.ROTypeEnum.Invoice, argInvoiceData.Sts);
|
|
44
44
|
InvoicePrintData = this.GetFormattedProductDataForPrint(argInvoiceData, InvoicePrintData);
|
|
45
45
|
InvoicePrintData = this.GetBillNameForInvoicePrint(argInvoiceData, InvoicePrintData);
|
|
46
|
-
let PaymentData = this.GetPaymentsTotal(argInvoiceData.Credits, argInvoiceData.Payments, InvoicePrintData.Total, argInvoiceData.Sts);
|
|
46
|
+
let PaymentData = this.GetPaymentsTotal(argInvoiceData.Credits, argInvoiceData.Payments, InvoicePrintData.Total, argInvoiceData.Sts, InvoicePrintData.Entity.DecimalsNumber);
|
|
47
47
|
// if (argInvoiceData.Settings.DiscLvl !== 'REC') {
|
|
48
48
|
// InvoicePrintData.FixedDisc = null;
|
|
49
49
|
// }
|
|
@@ -195,17 +195,17 @@ class InvPrintService {
|
|
|
195
195
|
InvoicePrintData.CrDate = my_date_1.MyDate.ConvertUTCDateToReadable(argInvoiceData.CrDate);
|
|
196
196
|
return InvoicePrintData;
|
|
197
197
|
}
|
|
198
|
-
static GetLaborPrintInfo(LaborList, Consolidate, TaxCodes, LineTotal) {
|
|
198
|
+
static GetLaborPrintInfo(LaborList, Consolidate, TaxCodes, LineTotal, DecimalsNumber) {
|
|
199
199
|
LaborList.forEach((Labor) => {
|
|
200
200
|
Labor.HSN = Labor.SAC;
|
|
201
201
|
if (tr_utils_1.TrUtils.IsNull(Labor.Qty)) {
|
|
202
202
|
Labor.Qty = 1;
|
|
203
203
|
}
|
|
204
204
|
if (Consolidate) {
|
|
205
|
-
Labor.UnPr = tr_utils_1.TrUtils.FixedTo(Labor.AfterLaborTax);
|
|
205
|
+
Labor.UnPr = tr_utils_1.TrUtils.FixedTo(Labor.AfterLaborTax, DecimalsNumber);
|
|
206
206
|
}
|
|
207
207
|
else {
|
|
208
|
-
Labor.UnPr = tr_utils_1.TrUtils.FixPriceValue(Labor.Pr);
|
|
208
|
+
Labor.UnPr = tr_utils_1.TrUtils.FixPriceValue(Labor.Pr, DecimalsNumber);
|
|
209
209
|
}
|
|
210
210
|
Labor.TaxName = this.getTaxName(Labor.TCode, TaxCodes);
|
|
211
211
|
if (!tr_utils_1.TrUtils.IsEmpty(Labor.Perc)) {
|
|
@@ -220,33 +220,33 @@ class InvPrintService {
|
|
|
220
220
|
Labor.DiscPerc = 0;
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
Labor.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.CGST);
|
|
224
|
-
Labor.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.SGST);
|
|
225
|
-
Labor.IGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.IGST);
|
|
223
|
+
Labor.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.CGST, DecimalsNumber);
|
|
224
|
+
Labor.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.SGST, DecimalsNumber);
|
|
225
|
+
Labor.IGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.IGST, DecimalsNumber);
|
|
226
226
|
Labor.QtyAndUoM = Labor.Qty.toString();
|
|
227
227
|
Labor.CGSTPerc = shared_print_service_1.PrintSharedService.GetCGSTValueBasedOnTaxCode(Labor.TCode, TaxCodes);
|
|
228
228
|
Labor.SGSTPerc = shared_print_service_1.PrintSharedService.GetSGSTValueBasedOnTaxCode(Labor.TCode, TaxCodes);
|
|
229
229
|
Labor.IGSTPerc = shared_print_service_1.PrintSharedService.GetIGSTValueBasedOnTaxCode(Labor.TCode, TaxCodes);
|
|
230
230
|
if (LineTotal === 'AT') {
|
|
231
|
-
Labor.LineTotal = tr_utils_1.TrUtils.FixPriceValue(Labor.AfterLaborTax);
|
|
231
|
+
Labor.LineTotal = tr_utils_1.TrUtils.FixPriceValue(Labor.AfterLaborTax, DecimalsNumber);
|
|
232
232
|
}
|
|
233
233
|
else {
|
|
234
|
-
Labor.LineTotal = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.subtraction)(Labor.Amt, Labor.Disc));
|
|
234
|
+
Labor.LineTotal = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.subtraction)(Labor.Amt, Labor.Disc), DecimalsNumber);
|
|
235
235
|
}
|
|
236
236
|
});
|
|
237
237
|
return LaborList;
|
|
238
238
|
}
|
|
239
|
-
static GetItemsPrintInfo(Items, Consolidate, TaxCodes, LineTotal) {
|
|
239
|
+
static GetItemsPrintInfo(Items, Consolidate, TaxCodes, LineTotal, DecimalsNumber) {
|
|
240
240
|
Items.forEach((Item) => {
|
|
241
241
|
if (Consolidate) {
|
|
242
242
|
let AfterDiscForEach = Item.AfterPartDisc / Item.Qty;
|
|
243
243
|
let CTaxAmtPerItem = Item.CGST / Item.Qty;
|
|
244
244
|
let STaxAmtPerItem = Item.SGST / Item.Qty;
|
|
245
245
|
let ITaxAmtPerItem = Item.IGST / Item.Qty;
|
|
246
|
-
Item.UnPr = tr_utils_1.TrUtils.FixedTo(AfterDiscForEach + CTaxAmtPerItem + STaxAmtPerItem + ITaxAmtPerItem);
|
|
246
|
+
Item.UnPr = tr_utils_1.TrUtils.FixedTo((AfterDiscForEach + CTaxAmtPerItem + STaxAmtPerItem + ITaxAmtPerItem), DecimalsNumber);
|
|
247
247
|
}
|
|
248
248
|
else {
|
|
249
|
-
Item.UnPr = tr_utils_1.TrUtils.FixPriceValue(Item.UnPr);
|
|
249
|
+
Item.UnPr = tr_utils_1.TrUtils.FixPriceValue(Item.UnPr, DecimalsNumber);
|
|
250
250
|
}
|
|
251
251
|
// let Index = Item['Desc'].indexOf('#{');
|
|
252
252
|
// if (Index !== -1) {
|
|
@@ -254,10 +254,10 @@ class InvPrintService {
|
|
|
254
254
|
// Item['Desc'].lastIndexOf('}#'));
|
|
255
255
|
// }
|
|
256
256
|
// Item.Desc = Item['Desc'].split(' #{')[0];
|
|
257
|
-
Item.MRP = tr_utils_1.TrUtils.FixPriceValue(Item.MRP);
|
|
258
|
-
Item.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.CGST);
|
|
259
|
-
Item.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.SGST);
|
|
260
|
-
Item.IGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.IGST);
|
|
257
|
+
Item.MRP = tr_utils_1.TrUtils.FixPriceValue(Item.MRP, DecimalsNumber);
|
|
258
|
+
Item.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.CGST, DecimalsNumber);
|
|
259
|
+
Item.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.SGST, DecimalsNumber);
|
|
260
|
+
Item.IGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.IGST, DecimalsNumber);
|
|
261
261
|
Item.TaxName = this.getTaxName(Item.TCode, TaxCodes);
|
|
262
262
|
if (!tr_utils_1.TrUtils.IsEmpty(Item.Perc)) {
|
|
263
263
|
Item.DiscPerc = Item.Perc;
|
|
@@ -275,10 +275,10 @@ class InvPrintService {
|
|
|
275
275
|
Item.SGSTPerc = shared_print_service_1.PrintSharedService.GetSGSTValueBasedOnTaxCode(Item.TCode, TaxCodes);
|
|
276
276
|
Item.IGSTPerc = shared_print_service_1.PrintSharedService.GetIGSTValueBasedOnTaxCode(Item.TCode, TaxCodes);
|
|
277
277
|
if (LineTotal === 'AT') {
|
|
278
|
-
Item.LineTotal = tr_utils_1.TrUtils.FixPriceValue(Item.AfterPartTax);
|
|
278
|
+
Item.LineTotal = tr_utils_1.TrUtils.FixPriceValue(Item.AfterPartTax, DecimalsNumber);
|
|
279
279
|
}
|
|
280
280
|
else {
|
|
281
|
-
Item.LineTotal = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.subtraction)(Item.UnAmt, Item.Disc));
|
|
281
|
+
Item.LineTotal = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.subtraction)(Item.UnAmt, Item.Disc), DecimalsNumber);
|
|
282
282
|
}
|
|
283
283
|
if (!tr_utils_1.TrUtils.IsZero(Item.Qty) && !tr_utils_1.TrUtils.CheckInvalidSelect(Item.UoM)) {
|
|
284
284
|
Item.QtyAndUoM = Item.Qty + ' ' + Item.UoM;
|
|
@@ -426,7 +426,7 @@ class InvPrintService {
|
|
|
426
426
|
static GetBillToName(Title, Name) {
|
|
427
427
|
return tr_utils_1.TrUtils.IsEmpty(Title) ? Name : Title + ' ' + Name;
|
|
428
428
|
}
|
|
429
|
-
static GetPaymentsTotal(Credits, InvoicePayments, Total, InvoiceStatus) {
|
|
429
|
+
static GetPaymentsTotal(Credits, InvoicePayments, Total, InvoiceStatus, DecimalsNumber) {
|
|
430
430
|
var i = 0;
|
|
431
431
|
let Data = {};
|
|
432
432
|
let PaidTotal = 0;
|
|
@@ -446,7 +446,7 @@ class InvPrintService {
|
|
|
446
446
|
Data.Due = 0;
|
|
447
447
|
}
|
|
448
448
|
else {
|
|
449
|
-
Data.Due = tr_utils_1.TrUtils.FixedTo(Total - PaidTotal);
|
|
449
|
+
Data.Due = tr_utils_1.TrUtils.FixedTo((Total - PaidTotal), DecimalsNumber);
|
|
450
450
|
}
|
|
451
451
|
if (Data.Due < 0) {
|
|
452
452
|
Data.Due = 0;
|
|
@@ -454,7 +454,7 @@ class InvPrintService {
|
|
|
454
454
|
if (Data.Due === 0) {
|
|
455
455
|
Data.Sts = enums_1.InvoiceStatusEnum.Closed;
|
|
456
456
|
}
|
|
457
|
-
Data.Paid = tr_utils_1.TrUtils.FixedTo(PaidTotal);
|
|
457
|
+
Data.Paid = tr_utils_1.TrUtils.FixedTo(PaidTotal, DecimalsNumber);
|
|
458
458
|
return Data;
|
|
459
459
|
}
|
|
460
460
|
}
|
|
@@ -242,10 +242,10 @@ export declare class InvoiceLetterheadPdfService {
|
|
|
242
242
|
})[];
|
|
243
243
|
static PreparesparePartsTable(ROPrintData: any, isAuto: boolean): any;
|
|
244
244
|
static GetLaborPartsTableForView(Parts: any, Ops: any, PrintPartNo: any): any;
|
|
245
|
-
static WithOutDiscountFieldTable(Parts: any, Ops: any, PrintPartNo: any, ShowTaxColumn: any, Body: any, ShowIGST: any, ConsolidateGST: any, ShowDiscountColumn: any, isAuto: boolean): any;
|
|
246
|
-
static BuildTableBodyForLaborAndParts(Parts: any, Labor: any, PrintPartNo: any, ShowTaxColumn: any, Body: any, ShowIGST: any, ConsolidateGST: any, ShowDiscountColumn: any, isAuto: boolean): any;
|
|
247
|
-
static GetWithOutDiscAndTaxFieldHeader(Parts: any, Ops: any, ShowTaxColumn: any, PrintPartNo: any, Body: any, ShowIGST: any, ConsolidateGST: any, ShowDiscountColumn: any, isAuto: boolean): any;
|
|
248
|
-
static TaxDataTable(Parts: any, Ops: any, PrintPartNo: any, ShowTaxColumn: any, Body: any, ShowIGST: any, ConsolidateGST: any, ShowDiscountColumn: any, isAuto: boolean): {
|
|
245
|
+
static WithOutDiscountFieldTable(Parts: any, Ops: any, PrintPartNo: any, ShowTaxColumn: any, Body: any, ShowIGST: any, ConsolidateGST: any, ShowDiscountColumn: any, isAuto: boolean, DecimalsNumber: number): any;
|
|
246
|
+
static BuildTableBodyForLaborAndParts(Parts: any, Labor: any, PrintPartNo: any, ShowTaxColumn: any, Body: any, ShowIGST: any, ConsolidateGST: any, ShowDiscountColumn: any, isAuto: boolean, DecimalsNumber: number): any;
|
|
247
|
+
static GetWithOutDiscAndTaxFieldHeader(Parts: any, Ops: any, ShowTaxColumn: any, PrintPartNo: any, Body: any, ShowIGST: any, ConsolidateGST: any, ShowDiscountColumn: any, isAuto: boolean, DecimalsNumber: number): any;
|
|
248
|
+
static TaxDataTable(Parts: any, Ops: any, PrintPartNo: any, ShowTaxColumn: any, Body: any, ShowIGST: any, ConsolidateGST: any, ShowDiscountColumn: any, isAuto: boolean, DecimalsNumber: number): {
|
|
249
249
|
style: string;
|
|
250
250
|
table: {
|
|
251
251
|
widths: (string | number)[];
|
|
@@ -258,7 +258,7 @@ export declare class InvoiceLetterheadPdfService {
|
|
|
258
258
|
vLineColor: (i: any, node: any) => string;
|
|
259
259
|
};
|
|
260
260
|
};
|
|
261
|
-
static ConsolidateDataTable(Parts: any, Ops: any, PrintPartNo: any, ShowTaxColumn: any, Body: any, ShowIGST: any, ConsolidateGST: any, ShowDiscountColumn: any, isAuto: boolean): {
|
|
261
|
+
static ConsolidateDataTable(Parts: any, Ops: any, PrintPartNo: any, ShowTaxColumn: any, Body: any, ShowIGST: any, ConsolidateGST: any, ShowDiscountColumn: any, isAuto: boolean, DecimalsNumber: number): {
|
|
262
262
|
style: string;
|
|
263
263
|
table: {
|
|
264
264
|
widths: number[];
|
|
@@ -271,7 +271,7 @@ export declare class InvoiceLetterheadPdfService {
|
|
|
271
271
|
vLineColor: (i: any, node: any) => string;
|
|
272
272
|
};
|
|
273
273
|
};
|
|
274
|
-
static NoTaxDataTable(Parts: any, Ops: any, PrintPartNo: any, ShowTaxColumn: any, Body: any, ShowIGST: any, ConsolidateGST: any, ShowDiscountColumn: any, isAuto: boolean): {
|
|
274
|
+
static NoTaxDataTable(Parts: any, Ops: any, PrintPartNo: any, ShowTaxColumn: any, Body: any, ShowIGST: any, ConsolidateGST: any, ShowDiscountColumn: any, isAuto: boolean, DecimalsNumber: number): {
|
|
275
275
|
style: string;
|
|
276
276
|
table: {
|
|
277
277
|
widths: number[];
|