shareneus 1.4.48 → 1.4.50
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/sales-receipt-print.service.d.ts +3 -3
- package/dist/accounting/counter-sales/sales-receipt-print.service.js +30 -29
- 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 +43 -43
- 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 +43 -43
- 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 +8 -7
- package/dist/accounting/invoice/reports/excel/category-wise-item-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/category-wise-item-excel.service.js +14 -14
- package/dist/accounting/invoice/reports/excel/cust-wise-sales-details.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/cust-wise-sales-details.js +8 -8
- package/dist/accounting/invoice/reports/excel/cust-wise-sales-summary-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/cust-wise-sales-summary-excel.service.js +8 -8
- package/dist/accounting/invoice/reports/excel/invoice-wise-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/invoice-wise-excel.service.js +8 -8
- package/dist/accounting/invoice/reports/excel/item-wise-doctor-sale-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/item-wise-doctor-sale-excel.service.js +10 -10
- package/dist/accounting/invoice/reports/excel/items-wise-sales-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/items-wise-sales-excel.service.js +14 -13
- package/dist/accounting/invoice/reports/excel/manf-wise-sales-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/manf-wise-sales-excel.service.js +8 -8
- package/dist/accounting/invoice/reports/excel/operator-wise-details.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/operator-wise-details.js +8 -8
- package/dist/accounting/invoice/reports/excel/operator-wise-summary.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/operator-wise-summary.js +8 -8
- package/dist/accounting/invoice/shared-inv-pdf.service.d.ts +6 -6
- package/dist/accounting/invoice/shared-inv-pdf.service.js +29 -29
- package/dist/appointments/appointments/appointment-total.service.d.ts +6 -6
- package/dist/appointments/appointments/appointment-total.service.js +28 -29
- package/dist/gst/excel/GSTR-RO-excel.service.d.ts +4 -4
- package/dist/gst/excel/GSTR-RO-excel.service.js +8 -8
- package/dist/gst/excel/GSTR1-excel.service.d.ts +4 -4
- package/dist/gst/excel/GSTR1-excel.service.js +10 -10
- package/dist/gst/excel/GSTR2-excel.service.d.ts +4 -4
- package/dist/gst/excel/GSTR2-excel.service.js +9 -9
- package/dist/gst/excel/tally-sales-import.service.d.ts +4 -4
- package/dist/gst/excel/tally-sales-import.service.js +8 -8
- package/dist/inventory/items/issue-parts-pdf.service.d.ts +6 -6
- package/dist/inventory/items/issue-parts-pdf.service.js +32 -32
- package/dist/inventory/items/reports/excel/expiring-drugs-excel.service.d.ts +4 -4
- package/dist/inventory/items/reports/excel/expiring-drugs-excel.service.js +11 -10
- package/dist/inventory/items/reports/excel/item-wise-mout-details.d.ts +4 -4
- package/dist/inventory/items/reports/excel/item-wise-mout-details.js +8 -8
- package/dist/inventory/items/reports/excel/item-wise-mout-summary.d.ts +4 -4
- package/dist/inventory/items/reports/excel/item-wise-mout-summary.js +8 -8
- package/dist/inventory/items/reports/excel/spares-issue-excel.service.d.ts +4 -4
- package/dist/inventory/items/reports/excel/spares-issue-excel.service.js +12 -12
- package/dist/inventory/items/reports/excel/stock-excel.service.d.ts +4 -4
- package/dist/inventory/items/reports/excel/stock-excel.service.js +8 -8
- package/dist/purchases/payment-made/reports/excel/payments-made-excel.service.d.ts +4 -4
- package/dist/purchases/payment-made/reports/excel/payments-made-excel.service.js +9 -9
- package/dist/purchases/payment-made/reports/excel/ven-balance-excel.service.d.ts +6 -6
- package/dist/purchases/payment-made/reports/excel/ven-balance-excel.service.js +14 -14
- package/dist/purchases/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-credit-note/vendor-credit-note-print.service.d.ts +1 -1
- package/dist/purchases/vendor-credit-note/vendor-credit-note-print.service.js +20 -20
- package/dist/purchases/vendor-credit-note/vendor-credit-note-totals.service.d.ts +8 -8
- package/dist/purchases/vendor-credit-note/vendor-credit-note-totals.service.js +31 -32
- package/dist/purchases/vendor-debit-note/vendor-debit-note-print.service.d.ts +1 -2
- package/dist/purchases/vendor-debit-note/vendor-debit-note-print.service.js +10 -32
- package/dist/purchases/vendor-debit-note/vendor-debit-note-totals.service.d.ts +6 -6
- package/dist/purchases/vendor-debit-note/vendor-debit-note-totals.service.js +19 -19
- package/dist/sales/delivery-challan/delivery-challan-print.service.d.ts +1 -2
- package/dist/sales/delivery-challan/delivery-challan-print.service.js +10 -33
- package/dist/sales/delivery-challan/delivery-challan-totals.d.ts +6 -6
- package/dist/sales/delivery-challan/delivery-challan-totals.js +20 -20
- package/dist/sales/sales/sales-print.service.d.ts +2 -2
- package/dist/sales/sales/sales-print.service.js +18 -18
- package/dist/sales/sales/sales-totals.service.d.ts +6 -6
- package/dist/sales/sales/sales-totals.service.js +19 -19
- package/dist/services/est.print-service.d.ts +18 -18
- package/dist/services/est.print-service.js +133 -133
- package/dist/services/reports/excel/insurance-expire-excel.service.d.ts +4 -4
- package/dist/services/reports/excel/insurance-expire-excel.service.js +8 -8
- package/dist/services/reports/excel/next-service-date-excel.service.d.ts +4 -4
- package/dist/services/reports/excel/next-service-date-excel.service.js +8 -8
- package/dist/services/reports/excel/repair-orders-excel.service.d.ts +5 -5
- package/dist/services/reports/excel/repair-orders-excel.service.js +11 -11
- package/dist/services/ro-print-service.d.ts +6 -6
- package/dist/services/ro-print-service.js +40 -40
- package/dist/services/ro-totals.service.d.ts +11 -11
- package/dist/services/ro-totals.service.js +50 -50
- 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 +1 -0
- package/dist/utils/tr-utils.d.ts +2 -3
- package/dist/utils/tr-utils.js +7 -6
- 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
|
@@ -13,12 +13,12 @@ export declare class RepairOrdersXlsxFileService {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
static ws: any;
|
|
16
|
-
static GetRepairOrdersExcelData(MainData: any): any;
|
|
17
|
-
static GetTotals(MainData: any): any;
|
|
16
|
+
static GetRepairOrdersExcelData(MainData: any, EntitySettings: any): any;
|
|
17
|
+
static GetTotals(MainData: any, DecimalsNumber: number): any;
|
|
18
18
|
static setHeadingInCell(): void;
|
|
19
|
-
static setWorkOrderDetailsInCell(MainData: any): void;
|
|
20
|
-
static SetWorkOrderDataInExcel(WorkOrder: any, index: any): void;
|
|
21
|
-
static ConvertToString(Text: any, IsString: any): any;
|
|
19
|
+
static setWorkOrderDetailsInCell(MainData: any, DecimalsNumber: number): void;
|
|
20
|
+
static SetWorkOrderDataInExcel(WorkOrder: any, index: any, DecimalsNumber: number): void;
|
|
21
|
+
static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
|
|
22
22
|
static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
|
|
23
23
|
static getcelltype(cell: any): any;
|
|
24
24
|
}
|
|
@@ -28,7 +28,7 @@ const XLSX = __importStar(require("xlsx"));
|
|
|
28
28
|
const my_date_1 = require("../../../utils/my-date");
|
|
29
29
|
const tr_utils_1 = require("../../../utils/tr-utils");
|
|
30
30
|
class RepairOrdersXlsxFileService {
|
|
31
|
-
static GetRepairOrdersExcelData(MainData) {
|
|
31
|
+
static GetRepairOrdersExcelData(MainData, EntitySettings) {
|
|
32
32
|
this.wb = {};
|
|
33
33
|
this.ws = {};
|
|
34
34
|
this.Row = 0;
|
|
@@ -39,16 +39,16 @@ class RepairOrdersXlsxFileService {
|
|
|
39
39
|
this.wb.Props = {};
|
|
40
40
|
this.wb.SSF = {};
|
|
41
41
|
this.wb.SheetNames = [];
|
|
42
|
-
MainData = this.GetTotals(MainData);
|
|
42
|
+
MainData = this.GetTotals(MainData, EntitySettings.DecimalsNumber);
|
|
43
43
|
this.setHeadingInCell();
|
|
44
|
-
this.setWorkOrderDetailsInCell(MainData);
|
|
44
|
+
this.setWorkOrderDetailsInCell(MainData, EntitySettings.DecimalsNumber);
|
|
45
45
|
this.ws['!ref'] = XLSX.utils.encode_range(this.range);
|
|
46
46
|
this.ws['!merges'] = this.MergeArray;
|
|
47
47
|
this.wb.SheetNames.push(ws_name);
|
|
48
48
|
this.wb.Sheets[ws_name] = this.ws;
|
|
49
49
|
return this.wb;
|
|
50
50
|
}
|
|
51
|
-
static GetTotals(MainData) {
|
|
51
|
+
static GetTotals(MainData, DecimalsNumber) {
|
|
52
52
|
MainData.forEach((WorkOrder) => {
|
|
53
53
|
var _a;
|
|
54
54
|
if (tr_utils_1.TrUtils.IsNull((_a = WorkOrder.Prod) === null || _a === void 0 ? void 0 : _a.VIN)) {
|
|
@@ -67,7 +67,7 @@ class RepairOrdersXlsxFileService {
|
|
|
67
67
|
WorkOrder.TypeName = WorkOrder.WOType.Name;
|
|
68
68
|
}
|
|
69
69
|
if (!tr_utils_1.TrUtils.IsNull(WorkOrder.Total)) {
|
|
70
|
-
WorkOrder.Total = tr_utils_1.TrUtils.FixPriceValue(WorkOrder.Total);
|
|
70
|
+
WorkOrder.Total = tr_utils_1.TrUtils.FixPriceValue(WorkOrder.Total, DecimalsNumber);
|
|
71
71
|
}
|
|
72
72
|
else {
|
|
73
73
|
WorkOrder.Total = '0.00';
|
|
@@ -164,12 +164,12 @@ class RepairOrdersXlsxFileService {
|
|
|
164
164
|
});
|
|
165
165
|
this.Row += 2;
|
|
166
166
|
}
|
|
167
|
-
static setWorkOrderDetailsInCell(MainData) {
|
|
167
|
+
static setWorkOrderDetailsInCell(MainData, DecimalsNumber) {
|
|
168
168
|
MainData.forEach((InvoiceList, index) => {
|
|
169
|
-
this.SetWorkOrderDataInExcel(InvoiceList, index);
|
|
169
|
+
this.SetWorkOrderDataInExcel(InvoiceList, index, DecimalsNumber);
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
|
-
static SetWorkOrderDataInExcel(WorkOrder, index) {
|
|
172
|
+
static SetWorkOrderDataInExcel(WorkOrder, index, DecimalsNumber) {
|
|
173
173
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
174
174
|
WorkOrder.CrDate = my_date_1.MyDate.ConvertUTCDateToReadable(WorkOrder.CrDate);
|
|
175
175
|
if (!tr_utils_1.TrUtils.IsNull(WorkOrder.Prod) && !tr_utils_1.TrUtils.IsNull(WorkOrder.Prod.DDate)) {
|
|
@@ -197,7 +197,7 @@ class RepairOrdersXlsxFileService {
|
|
|
197
197
|
];
|
|
198
198
|
let ColStart = 0;
|
|
199
199
|
InvoiceData.forEach((InvData) => {
|
|
200
|
-
InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
|
|
200
|
+
InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
|
|
201
201
|
this.SetDataInCell(InvData.text, ColStart, this.Row);
|
|
202
202
|
this.MergeArray.push({
|
|
203
203
|
s: { r: this.Row, c: ColStart },
|
|
@@ -207,7 +207,7 @@ class RepairOrdersXlsxFileService {
|
|
|
207
207
|
});
|
|
208
208
|
this.Row += 1;
|
|
209
209
|
}
|
|
210
|
-
static ConvertToString(Text, IsString) {
|
|
210
|
+
static ConvertToString(Text, IsString, DecimalsNumber) {
|
|
211
211
|
if (IsString) {
|
|
212
212
|
if (Text == null) {
|
|
213
213
|
Text = '';
|
|
@@ -219,7 +219,7 @@ class RepairOrdersXlsxFileService {
|
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
if (typeof Text === 'number') {
|
|
222
|
-
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
222
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
|
|
223
223
|
}
|
|
224
224
|
else {
|
|
225
225
|
return Text;
|
|
@@ -28,15 +28,15 @@ export declare class ROPrintService {
|
|
|
28
28
|
static GetPartDataById(PartId: any, AddedParts: any[]): any;
|
|
29
29
|
static GetLaborDataById(LaborId: any, AddedOperations: any[]): any;
|
|
30
30
|
static EmptyInvalidCollisionRepairItems(Colli: any): any;
|
|
31
|
-
static GetLineTotals(ROPrintData: any, IncludeGST: boolean, ConsolidateGST: boolean, AsCustomerOnly: boolean, AsInsuranceOnly: boolean): any;
|
|
31
|
+
static GetLineTotals(ROPrintData: any, IncludeGST: boolean, ConsolidateGST: boolean, AsCustomerOnly: boolean, AsInsuranceOnly: boolean, DecimalsNumber: number): any;
|
|
32
32
|
static GetCollisionPartLineTotal(PartData: any, ConsolidateGST: boolean, AsCustomerOnly: boolean, AsInsuranceOnly: boolean): number;
|
|
33
33
|
static GetCollisionLaborLineTotal(LaborData: any, ConsolidateGST: boolean, AsCustomerOnly: boolean, AsInsuranceOnly: boolean): number;
|
|
34
|
-
static GetLaborLineTotal(LaborData: any, IncludeGST: boolean, AsCustomerOnly: boolean, AsInsuranceOnly: boolean): string;
|
|
35
|
-
static GetPartLineTotal(PartData: any, IncludeGST: boolean, AsCustomerOnly: boolean, AsInsuranceOnly: boolean): string;
|
|
34
|
+
static GetLaborLineTotal(LaborData: any, IncludeGST: boolean, AsCustomerOnly: boolean, AsInsuranceOnly: boolean, DecimalsNumber: number): string;
|
|
35
|
+
static GetPartLineTotal(PartData: any, IncludeGST: boolean, AsCustomerOnly: boolean, AsInsuranceOnly: boolean, DecimalsNumber: number): string;
|
|
36
36
|
static ReverseItemsForROPrint(argROData: any, isReverse: boolean): any;
|
|
37
|
-
static GetDetailedInfoForItems(ROTotalsData: any, IncludeGST: boolean, ConsolidateGST: boolean, AsCustomerOnly: boolean, AsInsuranceOnly: boolean, TaxCodes: any[]): any;
|
|
38
|
-
static GetLaborPrintInfo(LaborList: any, ConsolidateGST: boolean, IncludeGST: boolean, AsCustomerOnly: boolean, AsInsuranceOnly: boolean, TaxCodes: any[]): any;
|
|
39
|
-
static GetItemsPrintInfo(Items: any, ConsolidateGST: boolean, IncludeGST: boolean, AsCustomerOnly: boolean, AsInsuranceOnly: boolean, TaxCodes: any[]): any;
|
|
37
|
+
static GetDetailedInfoForItems(ROTotalsData: any, IncludeGST: boolean, ConsolidateGST: boolean, AsCustomerOnly: boolean, AsInsuranceOnly: boolean, TaxCodes: any[], DecimalsNumber: number): any;
|
|
38
|
+
static GetLaborPrintInfo(LaborList: any, ConsolidateGST: boolean, IncludeGST: boolean, AsCustomerOnly: boolean, AsInsuranceOnly: boolean, TaxCodes: any[], DecimalsNumber: number): any;
|
|
39
|
+
static GetItemsPrintInfo(Items: any, ConsolidateGST: boolean, IncludeGST: boolean, AsCustomerOnly: boolean, AsInsuranceOnly: boolean, TaxCodes: any[], DecimalsNumber: number): any;
|
|
40
40
|
static CheckLaborTaxItemIndex(LaborList: any[]): any;
|
|
41
41
|
static CheckPartTaxItemIndex(PartsList: any[]): any;
|
|
42
42
|
static PrepareFormatForROPrint(ROPrintData: any, For: string, argROType: any): any[];
|
|
@@ -44,9 +44,9 @@ class ROPrintService {
|
|
|
44
44
|
ROPrintData.ShowAccParts = this.CheckAndShowItemsAsAR(argROData);
|
|
45
45
|
}
|
|
46
46
|
argROData = this.ReverseItemsForROPrint(argROData, isReverse);
|
|
47
|
-
let finalTotalsData = ro_totals_service_1.ROTotalsService.GetTotalsValue(argROData, TaxCodes, true, true, true, ROPrintData.Entity.Round);
|
|
47
|
+
let finalTotalsData = ro_totals_service_1.ROTotalsService.GetTotalsValue(argROData, TaxCodes, true, true, true, ROPrintData.Entity.Round, ROPrintData.Entity);
|
|
48
48
|
finalTotalsData.Settings = tr_utils_1.TrUtils.Stringify(argROData.Settings);
|
|
49
|
-
finalTotalsData = this.GetDetailedInfoForItems(finalTotalsData, IncludeGST, ConsolidateGST, AsCustomerOnly, AsInsuranceOnly, TaxCodes);
|
|
49
|
+
finalTotalsData = this.GetDetailedInfoForItems(finalTotalsData, IncludeGST, ConsolidateGST, AsCustomerOnly, AsInsuranceOnly, TaxCodes, ROPrintData.Entity.DecimalsNumber);
|
|
50
50
|
if (ConsolidateGST) {
|
|
51
51
|
finalTotalsData.CustLaborTotalBeforeDisc = finalTotalsData.CustLaborAfterTax;
|
|
52
52
|
finalTotalsData.CustPartsTotalBeforeDisc = finalTotalsData.CustPartAfterTax;
|
|
@@ -62,7 +62,7 @@ class ROPrintService {
|
|
|
62
62
|
ROPrintData.VehMore = tr_utils_1.TrUtils.Stringify(argROData.VehMore);
|
|
63
63
|
ROPrintData.SANotes = tr_utils_1.TrUtils.Stringify(argROData.SANotes);
|
|
64
64
|
ROPrintData.OrdType = tr_utils_1.TrUtils.Stringify(argROData.OrdType);
|
|
65
|
-
ROPrintData = this.GetLineTotals(ROPrintData, IncludeGST, ConsolidateGST, AsCustomerOnly, AsInsuranceOnly);
|
|
65
|
+
ROPrintData = this.GetLineTotals(ROPrintData, IncludeGST, ConsolidateGST, AsCustomerOnly, AsInsuranceOnly, ROPrintData.Entity.DecimalsNumber);
|
|
66
66
|
ROPrintData.PrintInfo = this.PrepareFormatForROPrint(ROPrintData, Payee, code_enums_1.ROTypeEnum.RepairOrder);
|
|
67
67
|
ROPrintData = this.CheckAndCombineDescMPNForAR(ROPrintData.Entity.MPN, ROPrintData);
|
|
68
68
|
ROPrintData.Vehicle = shared_print_service_1.PrintSharedService.GetVehicleFromServiceAndFormatData(OriginalVehicleData);
|
|
@@ -387,12 +387,12 @@ class ROPrintService {
|
|
|
387
387
|
});
|
|
388
388
|
return Colli;
|
|
389
389
|
}
|
|
390
|
-
static GetLineTotals(ROPrintData, IncludeGST, ConsolidateGST, AsCustomerOnly, AsInsuranceOnly) {
|
|
390
|
+
static GetLineTotals(ROPrintData, IncludeGST, ConsolidateGST, AsCustomerOnly, AsInsuranceOnly, DecimalsNumber) {
|
|
391
391
|
ROPrintData.Ops.forEach((Labor) => {
|
|
392
|
-
Labor.LineTotal = this.GetLaborLineTotal(Labor, IncludeGST, AsCustomerOnly, AsInsuranceOnly);
|
|
392
|
+
Labor.LineTotal = this.GetLaborLineTotal(Labor, IncludeGST, AsCustomerOnly, AsInsuranceOnly, DecimalsNumber);
|
|
393
393
|
});
|
|
394
394
|
ROPrintData.Parts.forEach((Part) => {
|
|
395
|
-
Part.LineTotal = this.GetPartLineTotal(Part, IncludeGST, AsCustomerOnly, AsInsuranceOnly);
|
|
395
|
+
Part.LineTotal = this.GetPartLineTotal(Part, IncludeGST, AsCustomerOnly, AsInsuranceOnly, DecimalsNumber);
|
|
396
396
|
});
|
|
397
397
|
ROPrintData.Colli.forEach((Collision) => {
|
|
398
398
|
let LineTotal = 0;
|
|
@@ -408,7 +408,7 @@ class ROPrintService {
|
|
|
408
408
|
if (!tr_utils_1.TrUtils.IsNull(Collision.DtngData)) {
|
|
409
409
|
LineTotal = (0, aggregation_1.addition)(LineTotal, this.GetCollisionLaborLineTotal(Collision.DtngData, ConsolidateGST, AsCustomerOnly, AsInsuranceOnly));
|
|
410
410
|
}
|
|
411
|
-
Collision.LineTotal = tr_utils_1.TrUtils.FixPriceValue(LineTotal);
|
|
411
|
+
Collision.LineTotal = tr_utils_1.TrUtils.FixPriceValue(LineTotal, DecimalsNumber);
|
|
412
412
|
});
|
|
413
413
|
return ROPrintData;
|
|
414
414
|
}
|
|
@@ -468,7 +468,7 @@ class ROPrintService {
|
|
|
468
468
|
}
|
|
469
469
|
return Number(LineTotal);
|
|
470
470
|
}
|
|
471
|
-
static GetLaborLineTotal(LaborData, IncludeGST, AsCustomerOnly, AsInsuranceOnly) {
|
|
471
|
+
static GetLaborLineTotal(LaborData, IncludeGST, AsCustomerOnly, AsInsuranceOnly, DecimalsNumber) {
|
|
472
472
|
let LineTotal = 0;
|
|
473
473
|
if (AsCustomerOnly) {
|
|
474
474
|
if (IncludeGST) {
|
|
@@ -494,9 +494,9 @@ class ROPrintService {
|
|
|
494
494
|
LineTotal = (0, aggregation_1.addition)(LaborData.InsAfterLaborDisc, LaborData.CustAfterLaborDisc);
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
return tr_utils_1.TrUtils.FixPriceValue(LineTotal);
|
|
497
|
+
return tr_utils_1.TrUtils.FixPriceValue(LineTotal, DecimalsNumber);
|
|
498
498
|
}
|
|
499
|
-
static GetPartLineTotal(PartData, IncludeGST, AsCustomerOnly, AsInsuranceOnly) {
|
|
499
|
+
static GetPartLineTotal(PartData, IncludeGST, AsCustomerOnly, AsInsuranceOnly, DecimalsNumber) {
|
|
500
500
|
let LineTotal = 0;
|
|
501
501
|
if (AsCustomerOnly) {
|
|
502
502
|
if (IncludeGST) {
|
|
@@ -522,7 +522,7 @@ class ROPrintService {
|
|
|
522
522
|
LineTotal = (0, aggregation_1.addition)(PartData.InsAfterPartDisc, PartData.CustAfterPartDisc);
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
|
-
return tr_utils_1.TrUtils.FixPriceValue(LineTotal);
|
|
525
|
+
return tr_utils_1.TrUtils.FixPriceValue(LineTotal, DecimalsNumber);
|
|
526
526
|
}
|
|
527
527
|
static ReverseItemsForROPrint(argROData, isReverse) {
|
|
528
528
|
if (isReverse) {
|
|
@@ -567,9 +567,9 @@ class ROPrintService {
|
|
|
567
567
|
argROData.Parts = ReversedParts;
|
|
568
568
|
return argROData;
|
|
569
569
|
}
|
|
570
|
-
static GetDetailedInfoForItems(ROTotalsData, IncludeGST, ConsolidateGST, AsCustomerOnly, AsInsuranceOnly, TaxCodes) {
|
|
571
|
-
ROTotalsData.Ops = this.GetLaborPrintInfo(ROTotalsData.Ops, ConsolidateGST, IncludeGST, AsCustomerOnly, AsInsuranceOnly, TaxCodes);
|
|
572
|
-
ROTotalsData.Parts = this.GetItemsPrintInfo(tr_utils_1.TrUtils.Stringify(ROTotalsData.Parts), ConsolidateGST, IncludeGST, AsCustomerOnly, AsInsuranceOnly, TaxCodes);
|
|
570
|
+
static GetDetailedInfoForItems(ROTotalsData, IncludeGST, ConsolidateGST, AsCustomerOnly, AsInsuranceOnly, TaxCodes, DecimalsNumber) {
|
|
571
|
+
ROTotalsData.Ops = this.GetLaborPrintInfo(ROTotalsData.Ops, ConsolidateGST, IncludeGST, AsCustomerOnly, AsInsuranceOnly, TaxCodes, DecimalsNumber);
|
|
572
|
+
ROTotalsData.Parts = this.GetItemsPrintInfo(tr_utils_1.TrUtils.Stringify(ROTotalsData.Parts), ConsolidateGST, IncludeGST, AsCustomerOnly, AsInsuranceOnly, TaxCodes, DecimalsNumber);
|
|
573
573
|
if (IncludeGST && !ConsolidateGST) {
|
|
574
574
|
ROTotalsData.ShowDetailedLaborTaxInfo = this.CheckLaborTaxItemIndex(ROTotalsData.Ops) !== -1;
|
|
575
575
|
ROTotalsData.ShowDetailedPartTaxInfo = this.CheckPartTaxItemIndex(ROTotalsData.Parts) !== -1;
|
|
@@ -580,23 +580,23 @@ class ROPrintService {
|
|
|
580
580
|
}
|
|
581
581
|
return ROTotalsData;
|
|
582
582
|
}
|
|
583
|
-
static GetLaborPrintInfo(LaborList, ConsolidateGST, IncludeGST, AsCustomerOnly, AsInsuranceOnly, TaxCodes) {
|
|
583
|
+
static GetLaborPrintInfo(LaborList, ConsolidateGST, IncludeGST, AsCustomerOnly, AsInsuranceOnly, TaxCodes, DecimalsNumber) {
|
|
584
584
|
LaborList.forEach((Labor) => {
|
|
585
585
|
Labor.HSN = Labor.SAC;
|
|
586
586
|
if (AsCustomerOnly) {
|
|
587
587
|
if (IncludeGST) {
|
|
588
588
|
if (ConsolidateGST) {
|
|
589
|
-
Labor.UnPr = tr_utils_1.TrUtils.FixedTo(Labor.CustAfterTax);
|
|
589
|
+
Labor.UnPr = tr_utils_1.TrUtils.FixedTo(Labor.CustAfterTax, DecimalsNumber);
|
|
590
590
|
}
|
|
591
591
|
else {
|
|
592
|
-
Labor.UnPr = tr_utils_1.TrUtils.FixedTo(Labor.Pr);
|
|
592
|
+
Labor.UnPr = tr_utils_1.TrUtils.FixedTo(Labor.Pr, DecimalsNumber);
|
|
593
593
|
}
|
|
594
|
-
Labor.CGSTAmt = tr_utils_1.TrUtils.FixedTo(Labor.CCGST);
|
|
595
|
-
Labor.SGSTAmt = tr_utils_1.TrUtils.FixedTo(Labor.CSGST);
|
|
596
|
-
Labor.IGSTAmt = tr_utils_1.TrUtils.FixedTo(Labor.CIGST);
|
|
594
|
+
Labor.CGSTAmt = tr_utils_1.TrUtils.FixedTo(Labor.CCGST, DecimalsNumber);
|
|
595
|
+
Labor.SGSTAmt = tr_utils_1.TrUtils.FixedTo(Labor.CSGST, DecimalsNumber);
|
|
596
|
+
Labor.IGSTAmt = tr_utils_1.TrUtils.FixedTo(Labor.CIGST, DecimalsNumber);
|
|
597
597
|
}
|
|
598
598
|
else {
|
|
599
|
-
Labor.UnPr = tr_utils_1.TrUtils.FixedTo(Labor.Pr);
|
|
599
|
+
Labor.UnPr = tr_utils_1.TrUtils.FixedTo(Labor.Pr, DecimalsNumber);
|
|
600
600
|
Labor.CGSTAmt = 0;
|
|
601
601
|
Labor.SGSTAmt = 0;
|
|
602
602
|
Labor.IGSTAmt = 0;
|
|
@@ -605,17 +605,17 @@ class ROPrintService {
|
|
|
605
605
|
else if (AsInsuranceOnly) {
|
|
606
606
|
if (IncludeGST) {
|
|
607
607
|
if (ConsolidateGST) {
|
|
608
|
-
Labor.UnPr = tr_utils_1.TrUtils.FixedTo(Labor.InsAfterTax);
|
|
608
|
+
Labor.UnPr = tr_utils_1.TrUtils.FixedTo(Labor.InsAfterTax, DecimalsNumber);
|
|
609
609
|
}
|
|
610
610
|
else {
|
|
611
|
-
Labor.UnPr = tr_utils_1.TrUtils.FixedTo(Labor.AssPr);
|
|
611
|
+
Labor.UnPr = tr_utils_1.TrUtils.FixedTo(Labor.AssPr, DecimalsNumber);
|
|
612
612
|
}
|
|
613
|
-
Labor.CGSTAmt = tr_utils_1.TrUtils.FixedTo(Labor.ACGST);
|
|
614
|
-
Labor.SGSTAmt = tr_utils_1.TrUtils.FixedTo(Labor.ASGST);
|
|
615
|
-
Labor.IGSTAmt = tr_utils_1.TrUtils.FixedTo(Labor.AIGST);
|
|
613
|
+
Labor.CGSTAmt = tr_utils_1.TrUtils.FixedTo(Labor.ACGST, DecimalsNumber);
|
|
614
|
+
Labor.SGSTAmt = tr_utils_1.TrUtils.FixedTo(Labor.ASGST, DecimalsNumber);
|
|
615
|
+
Labor.IGSTAmt = tr_utils_1.TrUtils.FixedTo(Labor.AIGST, DecimalsNumber);
|
|
616
616
|
}
|
|
617
617
|
else {
|
|
618
|
-
Labor.UnPr = tr_utils_1.TrUtils.FixedTo(Labor.AssPr);
|
|
618
|
+
Labor.UnPr = tr_utils_1.TrUtils.FixedTo(Labor.AssPr, DecimalsNumber);
|
|
619
619
|
Labor.CGSTAmt = 0;
|
|
620
620
|
Labor.SGSTAmt = 0;
|
|
621
621
|
Labor.IGSTAmt = 0;
|
|
@@ -627,22 +627,22 @@ class ROPrintService {
|
|
|
627
627
|
});
|
|
628
628
|
return LaborList;
|
|
629
629
|
}
|
|
630
|
-
static GetItemsPrintInfo(Items, ConsolidateGST, IncludeGST, AsCustomerOnly, AsInsuranceOnly, TaxCodes) {
|
|
630
|
+
static GetItemsPrintInfo(Items, ConsolidateGST, IncludeGST, AsCustomerOnly, AsInsuranceOnly, TaxCodes, DecimalsNumber) {
|
|
631
631
|
Items.forEach((Item) => {
|
|
632
632
|
if (AsCustomerOnly) {
|
|
633
633
|
if (IncludeGST) {
|
|
634
634
|
if (ConsolidateGST) {
|
|
635
|
-
Item.UnPr = tr_utils_1.TrUtils.FixedTo(Item.CustAfterTaxPerItem);
|
|
635
|
+
Item.UnPr = tr_utils_1.TrUtils.FixedTo(Item.CustAfterTaxPerItem, DecimalsNumber);
|
|
636
636
|
}
|
|
637
637
|
else {
|
|
638
|
-
Item.UnPr = tr_utils_1.TrUtils.FixedTo(Item.UnPr);
|
|
638
|
+
Item.UnPr = tr_utils_1.TrUtils.FixedTo(Item.UnPr, DecimalsNumber);
|
|
639
639
|
}
|
|
640
|
-
Item.CGSTAmt = tr_utils_1.TrUtils.FixedTo(Item.CCGST);
|
|
641
|
-
Item.SGSTAmt = tr_utils_1.TrUtils.FixedTo(Item.CSGST);
|
|
642
|
-
Item.IGSTAmt = tr_utils_1.TrUtils.FixedTo(Item.CIGST);
|
|
640
|
+
Item.CGSTAmt = tr_utils_1.TrUtils.FixedTo(Item.CCGST, DecimalsNumber);
|
|
641
|
+
Item.SGSTAmt = tr_utils_1.TrUtils.FixedTo(Item.CSGST, DecimalsNumber);
|
|
642
|
+
Item.IGSTAmt = tr_utils_1.TrUtils.FixedTo(Item.CIGST, DecimalsNumber);
|
|
643
643
|
}
|
|
644
644
|
else {
|
|
645
|
-
Item.UnPr = tr_utils_1.TrUtils.FixedTo(Item.UnPr);
|
|
645
|
+
Item.UnPr = tr_utils_1.TrUtils.FixedTo(Item.UnPr, DecimalsNumber);
|
|
646
646
|
Item.CGSTAmt = 0;
|
|
647
647
|
Item.SGSTAmt = 0;
|
|
648
648
|
Item.IGSTAmt = 0;
|
|
@@ -651,17 +651,17 @@ class ROPrintService {
|
|
|
651
651
|
else if (AsInsuranceOnly) {
|
|
652
652
|
if (IncludeGST) {
|
|
653
653
|
if (ConsolidateGST) {
|
|
654
|
-
Item.UnPr = tr_utils_1.TrUtils.FixedTo(Item.InsAfterTaxPerItem);
|
|
654
|
+
Item.UnPr = tr_utils_1.TrUtils.FixedTo(Item.InsAfterTaxPerItem, DecimalsNumber);
|
|
655
655
|
}
|
|
656
656
|
else {
|
|
657
|
-
Item.UnPr = tr_utils_1.TrUtils.FixedTo(Item.AssPr);
|
|
657
|
+
Item.UnPr = tr_utils_1.TrUtils.FixedTo(Item.AssPr, DecimalsNumber);
|
|
658
658
|
}
|
|
659
|
-
Item.CGSTAmt = tr_utils_1.TrUtils.FixedTo(Item.ACGST);
|
|
660
|
-
Item.SGSTAmt = tr_utils_1.TrUtils.FixedTo(Item.ASGST);
|
|
661
|
-
Item.IGSTAmt = tr_utils_1.TrUtils.FixedTo(Item.AIGST);
|
|
659
|
+
Item.CGSTAmt = tr_utils_1.TrUtils.FixedTo(Item.ACGST, DecimalsNumber);
|
|
660
|
+
Item.SGSTAmt = tr_utils_1.TrUtils.FixedTo(Item.ASGST, DecimalsNumber);
|
|
661
|
+
Item.IGSTAmt = tr_utils_1.TrUtils.FixedTo(Item.AIGST, DecimalsNumber);
|
|
662
662
|
}
|
|
663
663
|
else {
|
|
664
|
-
Item.UnPr = tr_utils_1.TrUtils.FixedTo(Item.AssPr);
|
|
664
|
+
Item.UnPr = tr_utils_1.TrUtils.FixedTo(Item.AssPr, DecimalsNumber);
|
|
665
665
|
Item.CGSTAmt = 0;
|
|
666
666
|
Item.SGSTAmt = 0;
|
|
667
667
|
Item.IGSTAmt = 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare class ROTotalsService {
|
|
2
|
-
static GetTotalsValue(OriRecordData: any, TaxCodes: any[], isWorkOrder: boolean, detailedInfo: boolean, withItems: boolean, isRoundable: boolean): any;
|
|
2
|
+
static GetTotalsValue(OriRecordData: any, TaxCodes: any[], isWorkOrder: boolean, detailedInfo: boolean, withItems: boolean, isRoundable: boolean, EntitySettings: any): any;
|
|
3
3
|
static CalculateLaborValues(opCodesList: any, isWorkOrder: boolean, isTaxable: boolean): any;
|
|
4
4
|
static FilterValidLaborItems(opCodesList: any[]): any[];
|
|
5
5
|
static ResetLaborValuesIfInvalid(opCodesList: any, isWorkOrder: boolean): any;
|
|
@@ -16,24 +16,24 @@ export declare class ROTotalsService {
|
|
|
16
16
|
static GetPartsAfterDiscount(PartsList: any, LaborList: any, isWorkOrder: boolean): any;
|
|
17
17
|
static GetPartsAfterTax(PartsList: any, LaborList: any, isWorkOrder: boolean, isTaxable: boolean): any;
|
|
18
18
|
static GetPartsPerItemAfterTax(PartsList: any): any;
|
|
19
|
-
static GetROTotalsData(argRecordData: any, dupRecordData: any, TaxCodes: any, withItems: boolean, detailedInfo: any, isWorkOrder: boolean, isRoundable: boolean): any;
|
|
19
|
+
static GetROTotalsData(argRecordData: any, dupRecordData: any, TaxCodes: any, withItems: boolean, detailedInfo: any, isWorkOrder: boolean, isRoundable: boolean, DecimalsNumber: number): any;
|
|
20
20
|
static ResetDiscountValuesIfInvalid(dupRecordData: any): any;
|
|
21
21
|
static SetMainDiscountValues(argRecordData: any, dupRecordData: any, detailedInfo: boolean): any;
|
|
22
|
-
static GetFinalCustomerTotalsData(argRecordData: any, dupRecordData: any, isWorkOrder: boolean, detailedInfo: boolean, isRoundable: boolean): any;
|
|
22
|
+
static GetFinalCustomerTotalsData(argRecordData: any, dupRecordData: any, isWorkOrder: boolean, detailedInfo: boolean, isRoundable: boolean, DecimalsNumber: number): any;
|
|
23
23
|
static GetCustSubTotal(LaborList: any, PartsList: any): any;
|
|
24
24
|
static GetCustLaborTotalAfterDiscount(LaborList: any): any;
|
|
25
25
|
static GetCustPartsTotalAfterDiscount(PartsList: any): any;
|
|
26
26
|
static GetCustLaborTaxTotal(opCodesList: any, IsTaxable: boolean, isWorkOrder: boolean): any;
|
|
27
27
|
static GetCustPartsTaxTotal(OpsList: any, PartsList: any, IsTaxable: boolean, isWorkOrder: boolean): any;
|
|
28
28
|
static GetCustomerTotalBasedOnTaxType(dupRecordData: any, LaborTaxAmount: number, PartsTaxAmount: number, LaborList: any, PartsList: any, IsTaxable: boolean): any;
|
|
29
|
-
static GetFinalInsuranceTotalsData(argRecordData: any, dupRecordData: any, detailedInfo: boolean, isWorkOrder: boolean): any;
|
|
29
|
+
static GetFinalInsuranceTotalsData(argRecordData: any, dupRecordData: any, detailedInfo: boolean, isWorkOrder: boolean, DecimalsNumber: number): any;
|
|
30
30
|
static GetInsSubTotal(LaborList: any, PartsList: any): any;
|
|
31
31
|
static GetInsLaborTotalAfterDiscount(LaborList: any): any;
|
|
32
32
|
static GetInsPartsTotalAfterDiscount(PartsList: any): any;
|
|
33
33
|
static GetInsLaborTaxTotal(opCodesList: any, IsTaxable: boolean, isWorkOrder: boolean): any;
|
|
34
34
|
static GetInsPartsTaxTotal(PartsList: any, IsTaxable: boolean, isWorkOrder: boolean): any;
|
|
35
35
|
static GetInsuranceTotalBasedOnTaxType(SubTotal: number, LaborTaxAmount: number, PartsTaxAmount: number, IsTaxable: boolean): any;
|
|
36
|
-
static GetDetailedTotalsData(argRecordData: any, dupRecordData: any, TaxCodes: any, isWorkOrder: boolean): any;
|
|
36
|
+
static GetDetailedTotalsData(argRecordData: any, dupRecordData: any, TaxCodes: any, isWorkOrder: boolean, DecimalsNumber: number): any;
|
|
37
37
|
static GetCustLaborDiscountedTotal(LaborList: any, isTaxable: boolean, finalTotalsData: any): any;
|
|
38
38
|
static GetCustPartDiscountedTotal(PartsList: any, isTaxable: boolean, finalTotalsData: any): any;
|
|
39
39
|
static GetCustLaborCGSTTaxTotal(opCodesList: any, IsTaxable: boolean, isWorkOrder: boolean): any;
|
|
@@ -50,14 +50,14 @@ export declare class ROTotalsService {
|
|
|
50
50
|
static GetInsPartSGSTTaxTotal(PartsList: any, IsTaxable: boolean, isWorkOrder: boolean): any;
|
|
51
51
|
static GetLaborLDiscAmount(LaborTotalAfterDisc: any, LDisc: any): any;
|
|
52
52
|
static GetPartsPDiscAmount(PartsTotalAfterDisc: any, PDisc: any): any;
|
|
53
|
-
static GetCustPartsTaxGrouping(PartsList: any, TaxCodes: any, isWorkOrder: boolean): any[];
|
|
53
|
+
static GetCustPartsTaxGrouping(PartsList: any, TaxCodes: any, isWorkOrder: boolean, DecimalsNumber: number): any[];
|
|
54
54
|
static GetCustParts(PartsList: any): any[];
|
|
55
|
-
static GetCustTaxGroupingForPartsByHSN(Parts: any, TaxCodes: any, isWorkOrder: boolean): any[];
|
|
56
|
-
static GetCustTaxGroupingInfoByHSN(FinalMatchedParts: any, TaxCodes: any, isWorkOrder: boolean): any[];
|
|
57
|
-
static GetInsPartsTaxGrouping(PartsList: any, TaxCodes: any): any[];
|
|
55
|
+
static GetCustTaxGroupingForPartsByHSN(Parts: any, TaxCodes: any, isWorkOrder: boolean, DecimalsNumber: number): any[];
|
|
56
|
+
static GetCustTaxGroupingInfoByHSN(FinalMatchedParts: any, TaxCodes: any, isWorkOrder: boolean, DecimalsNumber: number): any[];
|
|
57
|
+
static GetInsPartsTaxGrouping(PartsList: any, TaxCodes: any, DecimalsNumber: number): any[];
|
|
58
58
|
static GetInsParts(PartsList: any): any[];
|
|
59
|
-
static GetInsTaxGroupingForPartsByHSN(Parts: any, TaxCodes: any): any[];
|
|
60
|
-
static GetInsTaxGroupingInfoByHSN(FinalMatchedParts: any, TaxCodes: any): any[];
|
|
59
|
+
static GetInsTaxGroupingForPartsByHSN(Parts: any, TaxCodes: any, DecimalsNumber: number): any[];
|
|
60
|
+
static GetInsTaxGroupingInfoByHSN(FinalMatchedParts: any, TaxCodes: any, DecimalsNumber: number): any[];
|
|
61
61
|
static GetGSTValueBasedOnTaxCode(TCode: any, TaxCodes: any): any[];
|
|
62
62
|
static GetCombinedTaxPercentage(Parts: any, TaxCodes: any): any;
|
|
63
63
|
static ResetPartsHSNIfInvalid(Parts: any): any;
|
|
@@ -5,12 +5,12 @@ const aggregation_1 = require("../aggregation/aggregation");
|
|
|
5
5
|
const enums_1 = require("../enums/enums");
|
|
6
6
|
const tr_utils_1 = require("../utils/tr-utils");
|
|
7
7
|
class ROTotalsService {
|
|
8
|
-
static GetTotalsValue(OriRecordData, TaxCodes, isWorkOrder, detailedInfo, withItems, isRoundable) {
|
|
8
|
+
static GetTotalsValue(OriRecordData, TaxCodes, isWorkOrder, detailedInfo, withItems, isRoundable, EntitySettings) {
|
|
9
9
|
let dupRecordData = tr_utils_1.TrUtils.Stringify(OriRecordData);
|
|
10
10
|
let argRecordData = {};
|
|
11
11
|
dupRecordData.Ops = this.CalculateLaborValues(dupRecordData.Ops, isWorkOrder, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax));
|
|
12
12
|
dupRecordData.Parts = this.CalculatePartValues(dupRecordData.Parts, dupRecordData.Ops, isWorkOrder, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax));
|
|
13
|
-
argRecordData = this.GetROTotalsData(argRecordData, dupRecordData, TaxCodes, withItems, detailedInfo, isWorkOrder, isRoundable);
|
|
13
|
+
argRecordData = this.GetROTotalsData(argRecordData, dupRecordData, TaxCodes, withItems, detailedInfo, isWorkOrder, isRoundable, EntitySettings.DecimalsNumber);
|
|
14
14
|
return argRecordData;
|
|
15
15
|
}
|
|
16
16
|
static CalculateLaborValues(opCodesList, isWorkOrder, isTaxable) {
|
|
@@ -375,13 +375,13 @@ class ROTotalsService {
|
|
|
375
375
|
});
|
|
376
376
|
return PartsList;
|
|
377
377
|
}
|
|
378
|
-
static GetROTotalsData(argRecordData, dupRecordData, TaxCodes, withItems, detailedInfo, isWorkOrder, isRoundable) {
|
|
378
|
+
static GetROTotalsData(argRecordData, dupRecordData, TaxCodes, withItems, detailedInfo, isWorkOrder, isRoundable, DecimalsNumber) {
|
|
379
379
|
dupRecordData = this.ResetDiscountValuesIfInvalid(dupRecordData);
|
|
380
380
|
argRecordData = this.SetMainDiscountValues(argRecordData, dupRecordData, detailedInfo);
|
|
381
|
-
argRecordData = this.GetFinalCustomerTotalsData(argRecordData, dupRecordData, isWorkOrder, detailedInfo, isRoundable);
|
|
382
|
-
argRecordData = this.GetFinalInsuranceTotalsData(argRecordData, dupRecordData, detailedInfo, isWorkOrder);
|
|
381
|
+
argRecordData = this.GetFinalCustomerTotalsData(argRecordData, dupRecordData, isWorkOrder, detailedInfo, isRoundable, DecimalsNumber);
|
|
382
|
+
argRecordData = this.GetFinalInsuranceTotalsData(argRecordData, dupRecordData, detailedInfo, isWorkOrder, DecimalsNumber);
|
|
383
383
|
if (detailedInfo) {
|
|
384
|
-
argRecordData = this.GetDetailedTotalsData(argRecordData, dupRecordData, TaxCodes, isWorkOrder);
|
|
384
|
+
argRecordData = this.GetDetailedTotalsData(argRecordData, dupRecordData, TaxCodes, isWorkOrder, DecimalsNumber);
|
|
385
385
|
}
|
|
386
386
|
if (withItems) {
|
|
387
387
|
argRecordData.Ops = dupRecordData.Ops;
|
|
@@ -413,7 +413,7 @@ class ROTotalsService {
|
|
|
413
413
|
}
|
|
414
414
|
return argRecordData;
|
|
415
415
|
}
|
|
416
|
-
static GetFinalCustomerTotalsData(argRecordData, dupRecordData, isWorkOrder, detailedInfo, isRoundable) {
|
|
416
|
+
static GetFinalCustomerTotalsData(argRecordData, dupRecordData, isWorkOrder, detailedInfo, isRoundable, DecimalsNumber) {
|
|
417
417
|
let CustomerAfterDiscTotals = this.GetCustSubTotal(dupRecordData.Ops, dupRecordData.Parts);
|
|
418
418
|
let CustLaborTaxTotal = this.GetCustLaborTaxTotal(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
|
|
419
419
|
let CustPartTaxTotal = this.GetCustPartsTaxTotal(dupRecordData.Ops, dupRecordData.Parts, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
|
|
@@ -424,18 +424,18 @@ class ROTotalsService {
|
|
|
424
424
|
argRecordData.STotal = (0, aggregation_1.addition)(CustLaborDiscTotal, CustPartsDiscTotal, CustLaborTotalAfterDisc, CustPartsTotalAfterDisc);
|
|
425
425
|
argRecordData.CustLaborTotalBeforeDisc = (0, aggregation_1.addition)(argRecordData.CustLaborTotalAfterDisc, argRecordData.CustLaborDiscTotal);
|
|
426
426
|
argRecordData.CustPartsTotalBeforeDisc = (0, aggregation_1.addition)(argRecordData.CustPartsTotalAfterDisc, argRecordData.CustPartsDiscTotal);
|
|
427
|
-
argRecordData.SubTotal = tr_utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals);
|
|
427
|
+
argRecordData.SubTotal = tr_utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals, DecimalsNumber);
|
|
428
428
|
let CustTotal = this.GetCustomerTotalBasedOnTaxType(dupRecordData, CustLaborTaxTotal, CustPartTaxTotal, dupRecordData.Ops, dupRecordData.Parts, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax));
|
|
429
429
|
if (detailedInfo) {
|
|
430
|
-
argRecordData.FixedSubTotal = tr_utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals);
|
|
431
|
-
argRecordData.FixedTotal = tr_utils_1.TrUtils.FixedTo(CustTotal);
|
|
430
|
+
argRecordData.FixedSubTotal = tr_utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals, DecimalsNumber);
|
|
431
|
+
argRecordData.FixedTotal = tr_utils_1.TrUtils.FixedTo(CustTotal, DecimalsNumber);
|
|
432
432
|
}
|
|
433
433
|
if (isRoundable) {
|
|
434
434
|
argRecordData.Round = (0, aggregation_1.subtraction)(Math.round(CustTotal), CustTotal);
|
|
435
435
|
argRecordData.Total = Math.round(CustTotal);
|
|
436
436
|
}
|
|
437
437
|
else {
|
|
438
|
-
argRecordData.Total = tr_utils_1.TrUtils.FixedTo(CustTotal);
|
|
438
|
+
argRecordData.Total = tr_utils_1.TrUtils.FixedTo(CustTotal, DecimalsNumber);
|
|
439
439
|
}
|
|
440
440
|
return argRecordData;
|
|
441
441
|
}
|
|
@@ -549,14 +549,14 @@ class ROTotalsService {
|
|
|
549
549
|
}
|
|
550
550
|
return SubTotalWithTax;
|
|
551
551
|
}
|
|
552
|
-
static GetFinalInsuranceTotalsData(argRecordData, dupRecordData, detailedInfo, isWorkOrder) {
|
|
552
|
+
static GetFinalInsuranceTotalsData(argRecordData, dupRecordData, detailedInfo, isWorkOrder, DecimalsNumber) {
|
|
553
553
|
let InsuranceAfterDiscTotals = this.GetInsSubTotal(dupRecordData.Ops, dupRecordData.Parts);
|
|
554
554
|
let InsLaborTaxTotal = this.GetInsLaborTaxTotal(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
|
|
555
555
|
let InsPartTaxTotal = this.GetInsPartsTaxTotal(dupRecordData.Parts, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
|
|
556
556
|
let InsTotal = this.GetInsuranceTotalBasedOnTaxType(InsuranceAfterDiscTotals, InsLaborTaxTotal, InsPartTaxTotal, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax));
|
|
557
|
-
argRecordData.InsTotal = tr_utils_1.TrUtils.FixedTo(InsTotal);
|
|
557
|
+
argRecordData.InsTotal = tr_utils_1.TrUtils.FixedTo(InsTotal, DecimalsNumber);
|
|
558
558
|
if (detailedInfo) {
|
|
559
|
-
argRecordData.FixedInsTotal = tr_utils_1.TrUtils.FixedTo(InsTotal);
|
|
559
|
+
argRecordData.FixedInsTotal = tr_utils_1.TrUtils.FixedTo(InsTotal, DecimalsNumber);
|
|
560
560
|
}
|
|
561
561
|
return argRecordData;
|
|
562
562
|
}
|
|
@@ -637,7 +637,7 @@ class ROTotalsService {
|
|
|
637
637
|
}
|
|
638
638
|
return InsTotal;
|
|
639
639
|
}
|
|
640
|
-
static GetDetailedTotalsData(argRecordData, dupRecordData, TaxCodes, isWorkOrder) {
|
|
640
|
+
static GetDetailedTotalsData(argRecordData, dupRecordData, TaxCodes, isWorkOrder, DecimalsNumber) {
|
|
641
641
|
argRecordData.InsLaborDiscTotal = 0;
|
|
642
642
|
argRecordData.InsPartsDiscTotal = 0;
|
|
643
643
|
argRecordData.InsLaborTotalAfterDisc = this.GetInsLaborTotalAfterDiscount(dupRecordData.Ops);
|
|
@@ -674,10 +674,10 @@ class ROTotalsService {
|
|
|
674
674
|
argRecordData.CustPartsAfterPDisc = argRecordData.CustPartsTotalAfterDisc;
|
|
675
675
|
argRecordData.CustLaborAfterTax = (0, aggregation_1.addition)(argRecordData.CustLaborITax, argRecordData.CustLaborAfterLDisc);
|
|
676
676
|
argRecordData.CustPartAfterTax = (0, aggregation_1.addition)(argRecordData.CustPartITax, argRecordData.CustPartsAfterPDisc);
|
|
677
|
-
argRecordData.CustTaxGroupData = this.GetCustPartsTaxGrouping(dupRecordData.Parts, TaxCodes, isWorkOrder);
|
|
678
|
-
argRecordData.InsTaxGroupData = this.GetInsPartsTaxGrouping(dupRecordData.Parts, TaxCodes);
|
|
677
|
+
argRecordData.CustTaxGroupData = this.GetCustPartsTaxGrouping(dupRecordData.Parts, TaxCodes, isWorkOrder, DecimalsNumber);
|
|
678
|
+
argRecordData.InsTaxGroupData = this.GetInsPartsTaxGrouping(dupRecordData.Parts, TaxCodes, DecimalsNumber);
|
|
679
679
|
argRecordData.CustTotalRoundedBy = argRecordData.Round;
|
|
680
|
-
argRecordData.InsTotalRoundedBy = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.subtraction)(Math.round(argRecordData.InsTotal), argRecordData.InsTotal));
|
|
680
|
+
argRecordData.InsTotalRoundedBy = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.subtraction)(Math.round(argRecordData.InsTotal), argRecordData.InsTotal), DecimalsNumber);
|
|
681
681
|
argRecordData.CustRoundedTotal = argRecordData.Total;
|
|
682
682
|
argRecordData.InsRoundedTotal = Math.round(argRecordData.InsTotal);
|
|
683
683
|
for (var key in argRecordData) {
|
|
@@ -685,7 +685,7 @@ class ROTotalsService {
|
|
|
685
685
|
key !== 'LDisc' && key !== 'LPerc' && key !== 'PDisc' &&
|
|
686
686
|
key !== 'PPerc' && key !== 'Disc' && key !== 'Perc' && key !== 'Tax'
|
|
687
687
|
&& typeof argRecordData[key] === 'number') {
|
|
688
|
-
argRecordData[key] = tr_utils_1.TrUtils.FixPriceValue(argRecordData[key]);
|
|
688
|
+
argRecordData[key] = tr_utils_1.TrUtils.FixPriceValue(argRecordData[key], DecimalsNumber);
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
return argRecordData;
|
|
@@ -1053,9 +1053,9 @@ class ROTotalsService {
|
|
|
1053
1053
|
}
|
|
1054
1054
|
return PartsPDiscAmt;
|
|
1055
1055
|
}
|
|
1056
|
-
static GetCustPartsTaxGrouping(PartsList, TaxCodes, isWorkOrder) {
|
|
1056
|
+
static GetCustPartsTaxGrouping(PartsList, TaxCodes, isWorkOrder, DecimalsNumber) {
|
|
1057
1057
|
let FilteredPartsList = this.GetCustParts(PartsList);
|
|
1058
|
-
return this.GetCustTaxGroupingForPartsByHSN(FilteredPartsList, TaxCodes, isWorkOrder);
|
|
1058
|
+
return this.GetCustTaxGroupingForPartsByHSN(FilteredPartsList, TaxCodes, isWorkOrder, DecimalsNumber);
|
|
1059
1059
|
}
|
|
1060
1060
|
static GetCustParts(PartsList) {
|
|
1061
1061
|
let FilteredPartsList = PartsList.filter((Part) => {
|
|
@@ -1063,13 +1063,13 @@ class ROTotalsService {
|
|
|
1063
1063
|
});
|
|
1064
1064
|
return FilteredPartsList;
|
|
1065
1065
|
}
|
|
1066
|
-
static GetCustTaxGroupingForPartsByHSN(Parts, TaxCodes, isWorkOrder) {
|
|
1066
|
+
static GetCustTaxGroupingForPartsByHSN(Parts, TaxCodes, isWorkOrder, DecimalsNumber) {
|
|
1067
1067
|
Parts = this.GetCombinedTaxPercentage(Parts, TaxCodes);
|
|
1068
1068
|
Parts = this.ResetPartsHSNIfInvalid(Parts);
|
|
1069
1069
|
let FinalMatchedParts = this.ComparePartsByHSN(Parts, TaxCodes);
|
|
1070
|
-
return this.GetCustTaxGroupingInfoByHSN(FinalMatchedParts, TaxCodes, isWorkOrder);
|
|
1070
|
+
return this.GetCustTaxGroupingInfoByHSN(FinalMatchedParts, TaxCodes, isWorkOrder, DecimalsNumber);
|
|
1071
1071
|
}
|
|
1072
|
-
static GetCustTaxGroupingInfoByHSN(FinalMatchedParts, TaxCodes, isWorkOrder) {
|
|
1072
|
+
static GetCustTaxGroupingInfoByHSN(FinalMatchedParts, TaxCodes, isWorkOrder, DecimalsNumber) {
|
|
1073
1073
|
let HSNTaxInfo = [];
|
|
1074
1074
|
FinalMatchedParts.forEach((MatchedPart) => {
|
|
1075
1075
|
let TaxInfo = {};
|
|
@@ -1078,30 +1078,30 @@ class ROTotalsService {
|
|
|
1078
1078
|
let HSN = MatchedPart[0].HSN;
|
|
1079
1079
|
TaxInfo.CombinedTaxPercentage = MatchedPart[0].CombinedTaxPercentage;
|
|
1080
1080
|
MatchedPart.forEach((argMatchedGSTPart) => {
|
|
1081
|
-
TaxOnAmount = (0, aggregation_1.addition)(TaxOnAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CustAfterPartDisc));
|
|
1081
|
+
TaxOnAmount = (0, aggregation_1.addition)(TaxOnAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CustAfterPartDisc, DecimalsNumber));
|
|
1082
1082
|
if (isWorkOrder) {
|
|
1083
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CCGST));
|
|
1084
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CIGST));
|
|
1085
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CSGST));
|
|
1083
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CCGST, DecimalsNumber));
|
|
1084
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CIGST, DecimalsNumber));
|
|
1085
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CSGST, DecimalsNumber));
|
|
1086
1086
|
}
|
|
1087
1087
|
else {
|
|
1088
1088
|
if (argMatchedGSTPart.Sts !== enums_1.LaborStatusEnum.New && argMatchedGSTPart.Sts !== enums_1.LaborStatusEnum.WtngForAppr) {
|
|
1089
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CCGST));
|
|
1090
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CIGST));
|
|
1091
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CSGST));
|
|
1089
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CCGST, DecimalsNumber));
|
|
1090
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CIGST, DecimalsNumber));
|
|
1091
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CSGST, DecimalsNumber));
|
|
1092
1092
|
}
|
|
1093
1093
|
else {
|
|
1094
1094
|
if (argMatchedGSTPart.PBy === enums_1.PayTypeEnum.Customer) {
|
|
1095
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.ECGST));
|
|
1096
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.EIGST));
|
|
1097
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.ESGST));
|
|
1095
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.ECGST, DecimalsNumber));
|
|
1096
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.EIGST, DecimalsNumber));
|
|
1097
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.ESGST, DecimalsNumber));
|
|
1098
1098
|
}
|
|
1099
1099
|
}
|
|
1100
1100
|
}
|
|
1101
1101
|
});
|
|
1102
1102
|
TaxInfo.HSN = HSN;
|
|
1103
|
-
TaxInfo.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(TaxOnAmount);
|
|
1104
|
-
TaxInfo.TotalTaxAmount = tr_utils_1.TrUtils.FixPriceValue(TaxAmount);
|
|
1103
|
+
TaxInfo.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(TaxOnAmount, DecimalsNumber);
|
|
1104
|
+
TaxInfo.TotalTaxAmount = tr_utils_1.TrUtils.FixPriceValue(TaxAmount, DecimalsNumber);
|
|
1105
1105
|
TaxInfo.PartsCount = MatchedPart.length;
|
|
1106
1106
|
let GSTValues = this.GetGSTValueBasedOnTaxCode(MatchedPart[0].TCode, TaxCodes);
|
|
1107
1107
|
TaxInfo.CGST = GSTValues[0];
|
|
@@ -1113,9 +1113,9 @@ class ROTotalsService {
|
|
|
1113
1113
|
});
|
|
1114
1114
|
return HSNTaxInfo;
|
|
1115
1115
|
}
|
|
1116
|
-
static GetInsPartsTaxGrouping(PartsList, TaxCodes) {
|
|
1116
|
+
static GetInsPartsTaxGrouping(PartsList, TaxCodes, DecimalsNumber) {
|
|
1117
1117
|
let FilteredPartsList = this.GetInsParts(PartsList);
|
|
1118
|
-
return this.GetInsTaxGroupingForPartsByHSN(FilteredPartsList, TaxCodes);
|
|
1118
|
+
return this.GetInsTaxGroupingForPartsByHSN(FilteredPartsList, TaxCodes, DecimalsNumber);
|
|
1119
1119
|
}
|
|
1120
1120
|
static GetInsParts(PartsList) {
|
|
1121
1121
|
let FilteredPartsList = PartsList.filter((Part) => {
|
|
@@ -1123,13 +1123,13 @@ class ROTotalsService {
|
|
|
1123
1123
|
});
|
|
1124
1124
|
return FilteredPartsList;
|
|
1125
1125
|
}
|
|
1126
|
-
static GetInsTaxGroupingForPartsByHSN(Parts, TaxCodes) {
|
|
1126
|
+
static GetInsTaxGroupingForPartsByHSN(Parts, TaxCodes, DecimalsNumber) {
|
|
1127
1127
|
Parts = this.GetCombinedTaxPercentage(Parts, TaxCodes);
|
|
1128
1128
|
Parts = this.ResetPartsHSNIfInvalid(Parts);
|
|
1129
1129
|
let FinalMatchedParts = this.ComparePartsByHSN(Parts, TaxCodes);
|
|
1130
|
-
return this.GetInsTaxGroupingInfoByHSN(FinalMatchedParts, TaxCodes);
|
|
1130
|
+
return this.GetInsTaxGroupingInfoByHSN(FinalMatchedParts, TaxCodes, DecimalsNumber);
|
|
1131
1131
|
}
|
|
1132
|
-
static GetInsTaxGroupingInfoByHSN(FinalMatchedParts, TaxCodes) {
|
|
1132
|
+
static GetInsTaxGroupingInfoByHSN(FinalMatchedParts, TaxCodes, DecimalsNumber) {
|
|
1133
1133
|
let HSNTaxInfo = [];
|
|
1134
1134
|
FinalMatchedParts.forEach((MatchedPart) => {
|
|
1135
1135
|
let TaxInfo = {};
|
|
@@ -1138,23 +1138,23 @@ class ROTotalsService {
|
|
|
1138
1138
|
let HSN = MatchedPart[0].HSN;
|
|
1139
1139
|
TaxInfo.CombinedTaxPercentage = MatchedPart[0].CombinedTaxPercentage;
|
|
1140
1140
|
MatchedPart.forEach((argMatchedGSTPart) => {
|
|
1141
|
-
TaxOnAmount = (0, aggregation_1.addition)(TaxOnAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.InsAfterPartDisc));
|
|
1141
|
+
TaxOnAmount = (0, aggregation_1.addition)(TaxOnAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.InsAfterPartDisc, DecimalsNumber));
|
|
1142
1142
|
if (argMatchedGSTPart.PBy === enums_1.PayTypeEnum.Insurance || argMatchedGSTPart.PBy === enums_1.PayTypeEnum.Shared) {
|
|
1143
1143
|
if (argMatchedGSTPart.Sts !== enums_1.LaborStatusEnum.New && argMatchedGSTPart.Sts !== enums_1.LaborStatusEnum.WtngForAppr) {
|
|
1144
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.ACGST));
|
|
1145
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.AIGST));
|
|
1146
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.ASGST));
|
|
1144
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.ACGST, DecimalsNumber));
|
|
1145
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.AIGST, DecimalsNumber));
|
|
1146
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.ASGST, DecimalsNumber));
|
|
1147
1147
|
}
|
|
1148
1148
|
else {
|
|
1149
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.ECGST));
|
|
1150
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.EIGST));
|
|
1151
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.ESGST));
|
|
1149
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.ECGST, DecimalsNumber));
|
|
1150
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.EIGST, DecimalsNumber));
|
|
1151
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.ESGST, DecimalsNumber));
|
|
1152
1152
|
}
|
|
1153
1153
|
}
|
|
1154
1154
|
});
|
|
1155
1155
|
TaxInfo.HSN = HSN;
|
|
1156
|
-
TaxInfo.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(TaxOnAmount);
|
|
1157
|
-
TaxInfo.TotalTaxAmount = tr_utils_1.TrUtils.FixPriceValue(TaxAmount);
|
|
1156
|
+
TaxInfo.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(TaxOnAmount, DecimalsNumber);
|
|
1157
|
+
TaxInfo.TotalTaxAmount = tr_utils_1.TrUtils.FixPriceValue(TaxAmount, DecimalsNumber);
|
|
1158
1158
|
TaxInfo.PartsCount = MatchedPart.length;
|
|
1159
1159
|
let GSTValues = this.GetGSTValueBasedOnTaxCode(MatchedPart[0].TCode, TaxCodes);
|
|
1160
1160
|
TaxInfo.CGST = GSTValues[0];
|