shareneus 1.4.49 → 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/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/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/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-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.js +2 -2
- package/dist/sales/delivery-challan/delivery-challan-totals.d.ts +6 -6
- package/dist/sales/delivery-challan/delivery-challan-totals.js +20 -20
- package/dist/sales/sales/sales-print.service.js +1 -1
- package/dist/sales/sales/sales-totals.service.d.ts +6 -6
- package/dist/sales/sales/sales-totals.service.js +19 -19
- package/dist/services/est.print-service.js +1 -1
- package/dist/services/reports/excel/insurance-expire-excel.service.d.ts +4 -4
- package/dist/services/reports/excel/insurance-expire-excel.service.js +8 -8
- package/dist/services/reports/excel/next-service-date-excel.service.d.ts +4 -4
- package/dist/services/reports/excel/next-service-date-excel.service.js +8 -8
- package/dist/services/reports/excel/repair-orders-excel.service.d.ts +5 -5
- package/dist/services/reports/excel/repair-orders-excel.service.js +11 -11
- package/dist/services/ro-print-service.js +1 -1
- package/dist/services/ro-totals.service.d.ts +11 -11
- package/dist/services/ro-totals.service.js +50 -50
- package/dist/utils/tr-utils.js +2 -1
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -44,7 +44,7 @@ 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
49
|
finalTotalsData = this.GetDetailedInfoForItems(finalTotalsData, IncludeGST, ConsolidateGST, AsCustomerOnly, AsInsuranceOnly, TaxCodes, ROPrintData.Entity.DecimalsNumber);
|
|
50
50
|
if (ConsolidateGST) {
|
|
@@ -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];
|
package/dist/utils/tr-utils.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TrUtils = void 0;
|
|
4
|
+
const aggregation_1 = require("../aggregation/aggregation");
|
|
4
5
|
class TrUtils {
|
|
5
6
|
// static DecimalsNumber:number=2;
|
|
6
7
|
static IsNull(Value) {
|
|
@@ -40,7 +41,7 @@ class TrUtils {
|
|
|
40
41
|
if (this.IsNull(Total)) {
|
|
41
42
|
Total = 0;
|
|
42
43
|
}
|
|
43
|
-
let value = this.FixedTo(((Total
|
|
44
|
+
let value = this.FixedTo((0, aggregation_1.division)((0, aggregation_1.multiply)(Total, Discount), 100));
|
|
44
45
|
if (isNaN(value)) {
|
|
45
46
|
value = 0;
|
|
46
47
|
}
|