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.
Files changed (109) hide show
  1. package/dist/accounting/counter-sales/sales-receipt-print.service.d.ts +3 -3
  2. package/dist/accounting/counter-sales/sales-receipt-print.service.js +30 -29
  3. package/dist/accounting/credit-note/cn-print.service.d.ts +1 -2
  4. package/dist/accounting/credit-note/cn-print.service.js +10 -32
  5. package/dist/accounting/credit-note/credit-note-totals.service.d.ts +6 -6
  6. package/dist/accounting/credit-note/credit-note-totals.service.js +19 -19
  7. package/dist/accounting/debit-note/debit-note-print.service.d.ts +2 -2
  8. package/dist/accounting/debit-note/debit-note-print.service.js +15 -15
  9. package/dist/accounting/debit-note/debit-note-totals.service.d.ts +6 -6
  10. package/dist/accounting/debit-note/debit-note-totals.service.js +18 -18
  11. package/dist/accounting/invoice/hc-inv-pdf.service.d.ts +7 -7
  12. package/dist/accounting/invoice/hc-inv-pdf.service.js +36 -36
  13. package/dist/accounting/invoice/inv-pdf.service.d.ts +6 -6
  14. package/dist/accounting/invoice/inv-pdf.service.js +43 -43
  15. package/dist/accounting/invoice/inv-print.service.d.ts +3 -3
  16. package/dist/accounting/invoice/inv-print.service.js +24 -24
  17. package/dist/accounting/invoice/invoice-letterhead-pdf.service.d.ts +6 -6
  18. package/dist/accounting/invoice/invoice-letterhead-pdf.service.js +43 -43
  19. package/dist/accounting/invoice/invoice-total.service.d.ts +11 -11
  20. package/dist/accounting/invoice/invoice-total.service.js +54 -54
  21. package/dist/accounting/invoice/reports/excel/analysis-excel.service.d.ts +3 -3
  22. package/dist/accounting/invoice/reports/excel/analysis-excel.service.js +8 -7
  23. package/dist/accounting/invoice/reports/excel/category-wise-item-excel.service.d.ts +4 -4
  24. package/dist/accounting/invoice/reports/excel/category-wise-item-excel.service.js +14 -14
  25. package/dist/accounting/invoice/reports/excel/cust-wise-sales-details.d.ts +4 -4
  26. package/dist/accounting/invoice/reports/excel/cust-wise-sales-details.js +8 -8
  27. package/dist/accounting/invoice/reports/excel/cust-wise-sales-summary-excel.service.d.ts +4 -4
  28. package/dist/accounting/invoice/reports/excel/cust-wise-sales-summary-excel.service.js +8 -8
  29. package/dist/accounting/invoice/reports/excel/invoice-wise-excel.service.d.ts +4 -4
  30. package/dist/accounting/invoice/reports/excel/invoice-wise-excel.service.js +8 -8
  31. package/dist/accounting/invoice/reports/excel/item-wise-doctor-sale-excel.service.d.ts +4 -4
  32. package/dist/accounting/invoice/reports/excel/item-wise-doctor-sale-excel.service.js +10 -10
  33. package/dist/accounting/invoice/reports/excel/items-wise-sales-excel.service.d.ts +4 -4
  34. package/dist/accounting/invoice/reports/excel/items-wise-sales-excel.service.js +14 -13
  35. package/dist/accounting/invoice/reports/excel/manf-wise-sales-excel.service.d.ts +4 -4
  36. package/dist/accounting/invoice/reports/excel/manf-wise-sales-excel.service.js +8 -8
  37. package/dist/accounting/invoice/reports/excel/operator-wise-details.d.ts +4 -4
  38. package/dist/accounting/invoice/reports/excel/operator-wise-details.js +8 -8
  39. package/dist/accounting/invoice/reports/excel/operator-wise-summary.d.ts +4 -4
  40. package/dist/accounting/invoice/reports/excel/operator-wise-summary.js +8 -8
  41. package/dist/accounting/invoice/shared-inv-pdf.service.d.ts +6 -6
  42. package/dist/accounting/invoice/shared-inv-pdf.service.js +29 -29
  43. package/dist/appointments/appointments/appointment-total.service.d.ts +6 -6
  44. package/dist/appointments/appointments/appointment-total.service.js +28 -29
  45. package/dist/gst/excel/GSTR-RO-excel.service.d.ts +4 -4
  46. package/dist/gst/excel/GSTR-RO-excel.service.js +8 -8
  47. package/dist/gst/excel/GSTR1-excel.service.d.ts +4 -4
  48. package/dist/gst/excel/GSTR1-excel.service.js +10 -10
  49. package/dist/gst/excel/GSTR2-excel.service.d.ts +4 -4
  50. package/dist/gst/excel/GSTR2-excel.service.js +9 -9
  51. package/dist/gst/excel/tally-sales-import.service.d.ts +4 -4
  52. package/dist/gst/excel/tally-sales-import.service.js +8 -8
  53. package/dist/inventory/items/issue-parts-pdf.service.d.ts +6 -6
  54. package/dist/inventory/items/issue-parts-pdf.service.js +32 -32
  55. package/dist/inventory/items/reports/excel/expiring-drugs-excel.service.d.ts +4 -4
  56. package/dist/inventory/items/reports/excel/expiring-drugs-excel.service.js +11 -10
  57. package/dist/inventory/items/reports/excel/item-wise-mout-details.d.ts +4 -4
  58. package/dist/inventory/items/reports/excel/item-wise-mout-details.js +8 -8
  59. package/dist/inventory/items/reports/excel/item-wise-mout-summary.d.ts +4 -4
  60. package/dist/inventory/items/reports/excel/item-wise-mout-summary.js +8 -8
  61. package/dist/inventory/items/reports/excel/spares-issue-excel.service.d.ts +4 -4
  62. package/dist/inventory/items/reports/excel/spares-issue-excel.service.js +12 -12
  63. package/dist/inventory/items/reports/excel/stock-excel.service.d.ts +4 -4
  64. package/dist/inventory/items/reports/excel/stock-excel.service.js +8 -8
  65. package/dist/purchases/payment-made/reports/excel/payments-made-excel.service.d.ts +4 -4
  66. package/dist/purchases/payment-made/reports/excel/payments-made-excel.service.js +9 -9
  67. package/dist/purchases/payment-made/reports/excel/ven-balance-excel.service.d.ts +6 -6
  68. package/dist/purchases/payment-made/reports/excel/ven-balance-excel.service.js +14 -14
  69. package/dist/purchases/purchase-order/po-totals.service.d.ts +7 -7
  70. package/dist/purchases/purchase-order/po-totals.service.js +24 -25
  71. package/dist/purchases/purchase-order/purchase-order-print.service.js +3 -3
  72. package/dist/purchases/purchase-order/purchase-order-totals.service.d.ts +10 -10
  73. package/dist/purchases/purchase-order/purchase-order-totals.service.js +27 -27
  74. package/dist/purchases/vendor-credit-note/vendor-credit-note-print.service.d.ts +1 -1
  75. package/dist/purchases/vendor-credit-note/vendor-credit-note-print.service.js +20 -20
  76. package/dist/purchases/vendor-credit-note/vendor-credit-note-totals.service.d.ts +8 -8
  77. package/dist/purchases/vendor-credit-note/vendor-credit-note-totals.service.js +31 -32
  78. package/dist/purchases/vendor-debit-note/vendor-debit-note-print.service.d.ts +1 -2
  79. package/dist/purchases/vendor-debit-note/vendor-debit-note-print.service.js +10 -32
  80. package/dist/purchases/vendor-debit-note/vendor-debit-note-totals.service.d.ts +6 -6
  81. package/dist/purchases/vendor-debit-note/vendor-debit-note-totals.service.js +19 -19
  82. package/dist/sales/delivery-challan/delivery-challan-print.service.d.ts +1 -2
  83. package/dist/sales/delivery-challan/delivery-challan-print.service.js +10 -33
  84. package/dist/sales/delivery-challan/delivery-challan-totals.d.ts +6 -6
  85. package/dist/sales/delivery-challan/delivery-challan-totals.js +20 -20
  86. package/dist/sales/sales/sales-print.service.d.ts +2 -2
  87. package/dist/sales/sales/sales-print.service.js +18 -18
  88. package/dist/sales/sales/sales-totals.service.d.ts +6 -6
  89. package/dist/sales/sales/sales-totals.service.js +19 -19
  90. package/dist/services/est.print-service.d.ts +18 -18
  91. package/dist/services/est.print-service.js +133 -133
  92. package/dist/services/reports/excel/insurance-expire-excel.service.d.ts +4 -4
  93. package/dist/services/reports/excel/insurance-expire-excel.service.js +8 -8
  94. package/dist/services/reports/excel/next-service-date-excel.service.d.ts +4 -4
  95. package/dist/services/reports/excel/next-service-date-excel.service.js +8 -8
  96. package/dist/services/reports/excel/repair-orders-excel.service.d.ts +5 -5
  97. package/dist/services/reports/excel/repair-orders-excel.service.js +11 -11
  98. package/dist/services/ro-print-service.d.ts +6 -6
  99. package/dist/services/ro-print-service.js +40 -40
  100. package/dist/services/ro-totals.service.d.ts +11 -11
  101. package/dist/services/ro-totals.service.js +50 -50
  102. package/dist/shared/shared-pdf.service.d.ts +0 -16
  103. package/dist/shared/shared-pdf.service.js +36 -34
  104. package/dist/shared/shared-print.service.js +1 -0
  105. package/dist/utils/tr-utils.d.ts +2 -3
  106. package/dist/utils/tr-utils.js +7 -6
  107. package/package.json +1 -1
  108. package/dist/shared/shared-pdfs/shared-pdf.service.d.ts +0 -926
  109. package/dist/shared/shared-pdfs/shared-pdf.service.js +0 -2608
@@ -4,11 +4,11 @@ exports.POTotalsService = void 0;
4
4
  const aggregation_1 = require("../../aggregation/aggregation");
5
5
  const tr_utils_1 = require("../../utils/tr-utils");
6
6
  class POTotalsService {
7
- static GetTotalsValue(ItemsList, IsIndependentTax, DetailedInfo, Disc, Perc, TaxCodes, WithItems) {
7
+ static GetTotalsValue(ItemsList, IsIndependentTax, DetailedInfo, Disc, Perc, TaxCodes, WithItems, EntitySettings) {
8
8
  ItemsList = this.CalculateItemValues(ItemsList);
9
- let finalTotalsData = this.GetFinalPODataForSave(ItemsList, IsIndependentTax, Disc, Perc, DetailedInfo);
9
+ let finalTotalsData = this.GetFinalPODataForSave(ItemsList, IsIndependentTax, Disc, Perc, DetailedInfo, EntitySettings.DecimalsNumber);
10
10
  if (DetailedInfo) {
11
- finalTotalsData = this.GetDetailedTotalsData(finalTotalsData, IsIndependentTax, ItemsList, TaxCodes);
11
+ finalTotalsData = this.GetDetailedTotalsData(finalTotalsData, IsIndependentTax, ItemsList, TaxCodes, EntitySettings.DecimalsNumber);
12
12
  }
13
13
  if (WithItems) {
14
14
  finalTotalsData.Items = ItemsList;
@@ -48,10 +48,10 @@ class POTotalsService {
48
48
  static GetItemTotalAfterDiscount(Price, Qty, Disc, DiscInPerc) {
49
49
  return ((Price * Qty) - this.GetItemDiscountedPrice(Price, Qty, Disc, DiscInPerc));
50
50
  }
51
- static GetFinalPODataForSave(ItemsList, IsIndependentTax, Disc, Perc, DetailedInfo) {
51
+ static GetFinalPODataForSave(ItemsList, IsIndependentTax, Disc, Perc, DetailedInfo, DecimalsNumber) {
52
52
  let finalTotalsData = {};
53
53
  finalTotalsData = this.ResetRecordDiscountsIfInvalid(Disc, Perc, finalTotalsData, DetailedInfo);
54
- finalTotalsData = this.GetFinalTotalsData(finalTotalsData, ItemsList, IsIndependentTax, Disc, Perc, DetailedInfo);
54
+ finalTotalsData = this.GetFinalTotalsData(finalTotalsData, ItemsList, IsIndependentTax, Disc, Perc, DetailedInfo, DecimalsNumber);
55
55
  return finalTotalsData;
56
56
  }
57
57
  static ResetRecordDiscountsIfInvalid(Disc, Perc, finalTotalsData, DetailedInfo) {
@@ -64,16 +64,16 @@ class POTotalsService {
64
64
  }
65
65
  return finalTotalsData;
66
66
  }
67
- static GetFinalTotalsData(finalTotalsData, ItemsList, IsIndependentTax, Disc, Perc, DetailedInfo) {
67
+ static GetFinalTotalsData(finalTotalsData, ItemsList, IsIndependentTax, Disc, Perc, DetailedInfo, DecimalsNumber) {
68
68
  let AfterDiscTotals = this.GetSubTotal(ItemsList);
69
69
  let ItemTaxTotal = this.GetItemsTaxTotal(ItemsList, IsIndependentTax);
70
- finalTotalsData.SubTotal = tr_utils_1.TrUtils.FixedTo(AfterDiscTotals);
70
+ finalTotalsData.SubTotal = tr_utils_1.TrUtils.FixedTo(AfterDiscTotals, DecimalsNumber);
71
71
  let Total = this.GetTotalBasedOnTaxType(ItemTaxTotal, ItemsList, IsIndependentTax, Disc, Perc);
72
- finalTotalsData.Total = tr_utils_1.TrUtils.FixedTo(Total);
72
+ finalTotalsData.Total = tr_utils_1.TrUtils.FixedTo(Total, DecimalsNumber);
73
73
  finalTotalsData.ITax = IsIndependentTax;
74
74
  if (DetailedInfo) {
75
- finalTotalsData.FixedSubTotal = tr_utils_1.TrUtils.FixedTo(AfterDiscTotals);
76
- finalTotalsData.FixedTotal = tr_utils_1.TrUtils.FixedTo(Total);
75
+ finalTotalsData.FixedSubTotal = tr_utils_1.TrUtils.FixedTo(AfterDiscTotals, DecimalsNumber);
76
+ finalTotalsData.FixedTotal = tr_utils_1.TrUtils.FixedTo(Total, DecimalsNumber);
77
77
  }
78
78
  return finalTotalsData;
79
79
  }
@@ -81,11 +81,10 @@ class POTotalsService {
81
81
  let ItemsTotalAfterDisc = this.GetItemsTotalAfterDiscount(ItemsList);
82
82
  return ItemsTotalAfterDisc;
83
83
  }
84
- static GetDetailedTotalsData(finalTotalsData, IsIndependentTax, ItemsList, TaxCodes) {
84
+ static GetDetailedTotalsData(finalTotalsData, IsIndependentTax, ItemsList, TaxCodes, DecimalsNumber) {
85
85
  finalTotalsData.ItemsDiscTotal = this.GetItemDiscountedTotal(ItemsList);
86
86
  finalTotalsData.ItemsTotalAfterDisc = this.GetItemsTotalAfterDiscount(ItemsList);
87
- finalTotalsData.ItemsTotalBeforeDisc = tr_utils_1.TrUtils.FixedTo(finalTotalsData.ItemsTotalAfterDisc
88
- + finalTotalsData.ItemsDiscTotal);
87
+ finalTotalsData.ItemsTotalBeforeDisc = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.addition)(finalTotalsData.ItemsTotalAfterDisc, finalTotalsData.ItemsDiscTotal), DecimalsNumber);
89
88
  finalTotalsData.ItemITax = this.GetItemsTaxTotal(ItemsList, IsIndependentTax);
90
89
  // finalTotalsData.ItemCGST = this.GetItemCGSTTaxTotal(ItemsList, IsIndependentTax);
91
90
  // finalTotalsData.ItemIGST = this.GetItemIGSTTaxTotal(ItemsList, IsIndependentTax);
@@ -94,16 +93,16 @@ class POTotalsService {
94
93
  finalTotalsData.ItemCGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxAmt[0]);
95
94
  finalTotalsData.ItemSGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxAmt[1]);
96
95
  finalTotalsData.ItemIGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxAmt[2]);
97
- finalTotalsData.ItemAfterTax = tr_utils_1.TrUtils.FixedTo(finalTotalsData.ItemITax + finalTotalsData.ItemsTotalAfterDisc);
98
- finalTotalsData.OverAllRecordDiscount = (finalTotalsData.Perc) ? ((finalTotalsData.SubTotal * finalTotalsData.Disc) / 100) : finalTotalsData.Disc;
99
- finalTotalsData.TaxGroupData = this.GetItemsTaxGrouping(ItemsList, TaxCodes);
100
- finalTotalsData.TotalRoundedBy = tr_utils_1.TrUtils.FixedTo(Math.round(finalTotalsData.Total) - finalTotalsData.Total);
96
+ finalTotalsData.ItemAfterTax = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.addition)(finalTotalsData.ItemITax, finalTotalsData.ItemsTotalAfterDisc), DecimalsNumber);
97
+ finalTotalsData.OverAllRecordDiscount = (finalTotalsData.Perc) ? (0, aggregation_1.division)((0, aggregation_1.multiply)(finalTotalsData.SubTotal, finalTotalsData.Disc), 100) : finalTotalsData.Disc;
98
+ finalTotalsData.TaxGroupData = this.GetItemsTaxGrouping(ItemsList, TaxCodes, DecimalsNumber);
99
+ finalTotalsData.TotalRoundedBy = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.subtraction)(Math.round(finalTotalsData.Total), finalTotalsData.Total), DecimalsNumber);
101
100
  finalTotalsData.RoundedTotal = Math.round(finalTotalsData.Total);
102
101
  for (var key in finalTotalsData) {
103
102
  if (key !== 'Total' && key !== 'SubTotal' &&
104
103
  key !== 'Disc' && key !== 'Perc' && key !== 'ITax'
105
104
  && typeof finalTotalsData[key] === 'number') {
106
- finalTotalsData[key] = tr_utils_1.TrUtils.FixPriceValue(finalTotalsData[key]);
105
+ finalTotalsData[key] = tr_utils_1.TrUtils.FixPriceValue(finalTotalsData[key], DecimalsNumber);
107
106
  }
108
107
  }
109
108
  return finalTotalsData;
@@ -162,14 +161,14 @@ class POTotalsService {
162
161
  }
163
162
  return Total;
164
163
  }
165
- static GetItemsTaxGrouping(ItemsList, TaxCodes) {
166
- return this.GetTaxGroupingItemsByHSN(ItemsList, TaxCodes);
164
+ static GetItemsTaxGrouping(ItemsList, TaxCodes, DecimalsNumber) {
165
+ return this.GetTaxGroupingItemsByHSN(ItemsList, TaxCodes, DecimalsNumber);
167
166
  }
168
- static GetTaxGroupingItemsByHSN(Items, TaxCodes) {
167
+ static GetTaxGroupingItemsByHSN(Items, TaxCodes, DecimalsNumber) {
169
168
  Items = this.GetCombinedTaxPercentage(Items, TaxCodes);
170
169
  // Items = this.ResetItemsHSNIfInvalid(Items);
171
170
  let FinalMatchedItems = this.CompareItemsByHSN(Items, TaxCodes);
172
- return this.GetTaxGroupingInfoByHSN(FinalMatchedItems, TaxCodes);
171
+ return this.GetTaxGroupingInfoByHSN(FinalMatchedItems, TaxCodes, DecimalsNumber);
173
172
  }
174
173
  static GetCombinedTaxPercentage(Items, TaxCodes) {
175
174
  Items.forEach((Item) => {
@@ -213,7 +212,7 @@ class POTotalsService {
213
212
  });
214
213
  return FinalMatchedItems;
215
214
  }
216
- static GetTaxGroupingInfoByHSN(FinalMatchedItems, TaxCodes) {
215
+ static GetTaxGroupingInfoByHSN(FinalMatchedItems, TaxCodes, DecimalsNumber) {
217
216
  let HSNTaxInfo = [];
218
217
  FinalMatchedItems.forEach((MatchedItem) => {
219
218
  let TaxInfo = {};
@@ -232,8 +231,8 @@ class POTotalsService {
232
231
  TaxAmount = (0, aggregation_1.addition)(TaxAmount, argMatchedGSTItem.SGST);
233
232
  });
234
233
  TaxInfo.HSN = HSN;
235
- TaxInfo.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(TaxOnAmount);
236
- TaxInfo.TotalTaxAmount = tr_utils_1.TrUtils.FixPriceValue(TaxAmount);
234
+ TaxInfo.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(TaxOnAmount, DecimalsNumber);
235
+ TaxInfo.TotalTaxAmount = tr_utils_1.TrUtils.FixPriceValue(TaxAmount, DecimalsNumber);
237
236
  TaxInfo.ItemsCount = MatchedItem.length;
238
237
  // let CGST = this.GetCGSTValueBasedOnTaxCode(MatchedItem[0].TCode, TaxCodes);
239
238
  // let SGST = this.GetSGSTValueBasedOnTaxCode(MatchedItem[0].TCode, TaxCodes);
@@ -46,16 +46,16 @@ class PurchaseOrderPrintService {
46
46
  PurchaseOrderPDFData.Ops = this.GetLaborPrintInfo(PurchaseOrderPDFData.Ops, TaxCodes, 'AT');
47
47
  }
48
48
  // PurchaseOrderPDFData.Items = this.GetPartsDescription(PurchaseOrderPDFData.Items);
49
+ PurchaseOrderPDFData.Entity = shared_print_service_1.PrintSharedService.GetFormattedEntityDataForPrint(EntityData, code_enums_1.PrintTypesEnum.PurOrder, PurchaseOrderData);
49
50
  PurchaseOrderPDFData.Items = this.GetQtyWithUoM(PurchaseOrderPDFData.Items);
50
51
  let DetailedTotalsInfo;
51
52
  if (IsFormPO) {
52
- DetailedTotalsInfo = purchase_order_totals_service_1.PurchaseOrderTotalsService.GetTotalsValue(PurchaseOrderPDFData.Ops, PurchaseOrderPDFData.Items, IsTaxable, true, TaxCodes, PurchaseOrderPDFData.Tax, true, PurchaseOrderPDFData.HasNoTax, false, 0, false, PurchaseOrderPDFData.Adjust);
53
+ DetailedTotalsInfo = purchase_order_totals_service_1.PurchaseOrderTotalsService.GetTotalsValue(PurchaseOrderPDFData.Ops, PurchaseOrderPDFData.Items, IsTaxable, true, TaxCodes, PurchaseOrderPDFData.Tax, true, PurchaseOrderPDFData.HasNoTax, false, 0, false, PurchaseOrderPDFData.Adjust, PurchaseOrderPDFData.Entity);
53
54
  }
54
55
  else {
55
- DetailedTotalsInfo = purchase_order_totals_service_1.PurchaseOrderTotalsService.GetTotalsValue(PurchaseOrderPDFData.Ops, PurchaseOrderPDFData.Items, IsTaxable, true, TaxCodes, PurchaseOrderPDFData.Tax, true, PurchaseOrderPDFData.HasNoTax, true, PurchaseOrderData.Disc, PurchaseOrderData.Perc, PurchaseOrderPDFData.Adjust);
56
+ DetailedTotalsInfo = purchase_order_totals_service_1.PurchaseOrderTotalsService.GetTotalsValue(PurchaseOrderPDFData.Ops, PurchaseOrderPDFData.Items, IsTaxable, true, TaxCodes, PurchaseOrderPDFData.Tax, true, PurchaseOrderPDFData.HasNoTax, true, PurchaseOrderData.Disc, PurchaseOrderData.Perc, PurchaseOrderPDFData.Adjust, PurchaseOrderPDFData.Entity);
56
57
  }
57
58
  PurchaseOrderPDFData = this.ConcatTotalsInfo(PurchaseOrderPDFData, DetailedTotalsInfo);
58
- PurchaseOrderPDFData.Entity = shared_print_service_1.PrintSharedService.GetFormattedEntityDataForPrint(EntityData, code_enums_1.PrintTypesEnum.PurOrder, PurchaseOrderData);
59
59
  PurchaseOrderPDFData = shared_print_service_1.PrintSharedService.GetEntityHeaderStyles(PurchaseOrderPDFData, EntityData, image);
60
60
  if (IsFormPO) {
61
61
  PurchaseOrderPDFData.HeaderName = 'Purchase Order';
@@ -1,23 +1,23 @@
1
1
  export declare class PurchaseOrderTotalsService {
2
- static GetTotalsValue(opCodesList: any, argPartsList: any, IsTaxable: boolean, DetailedTotalsInfo: boolean, TaxCodes: any, Tax: any, ReturnPartsAlso: boolean, HasNoTax: boolean, GetSubTotal: boolean, Discount: number, DiscInPerc: boolean, Adjust: number): any;
3
- static CalculateLaborValues(opCodesList: any, IsIndependentTax: boolean): any;
4
- static ResetLaborValues(opCodesList: any, IsIndependentTax: boolean): any;
2
+ static GetTotalsValue(opCodesList: any, argPartsList: any, IsTaxable: boolean, DetailedTotalsInfo: boolean, TaxCodes: any, Tax: any, ReturnPartsAlso: boolean, HasNoTax: boolean, GetSubTotal: boolean, Discount: number, DiscInPerc: boolean, Adjust: number, EntitySettings: any): any;
3
+ static CalculateLaborValues(opCodesList: any, IsIndependentTax: boolean, DecimalsNumber: number): any;
4
+ static ResetLaborValues(opCodesList: any, IsIndependentTax: boolean, DecimalsNumber: number): any;
5
5
  static ResetLaborValueIfInvalid(Operation: any): any;
6
6
  static CheckPartStatusAndReturn(PartsList: any): any;
7
7
  static ResetPartValueIfInvalid(Part: any): any;
8
8
  static GetPartDiscountedPrice(Disc: any, RecDisc: any): any;
9
- static GetPartsTaxAmount(Items: any, IsTaxable: boolean, TaxCodes: any): any;
9
+ static GetPartsTaxAmount(Items: any, IsTaxable: boolean, TaxCodes: any, DecimalsNumber: number): any;
10
10
  static GetGSTValueBasedOnTaxCode(TCode: any, argTaxCodes: any): any[];
11
- static GetTotalsInfo(PartsList: any, LaborList: any, IsTaxable: boolean, TaxCodes: any, HasNoTax: boolean, GetSubTotal: boolean, Discount: number, DiscInPerc: boolean, Adjust: number): any;
11
+ static GetTotalsInfo(PartsList: any, LaborList: any, IsTaxable: boolean, TaxCodes: any, HasNoTax: boolean, GetSubTotal: boolean, Discount: number, DiscInPerc: boolean, Adjust: number, DecimalsNumber: number): any;
12
12
  static GetServiceTotalTaxAndAfterDiscount(LaborList: any): any[];
13
13
  static GetPartsTotalTaxAndAfterDiscount(PartsList: any): any[];
14
- static GetTotalBasedOnTaxType(PartsTotalAfterDisc: number, PartsTaxAmount: number, ServicesTotalAfterDisc: number, ServicesTaxTotal: number, IsTaxable: boolean, Adjust: number): number;
15
- static GetDetailedTotalsData(finalTotalsData: any, IsTaxable: boolean, PartsList: any, LaborList: any, TaxCodes: any, Tax: any, HasNoTax: boolean): any;
14
+ static GetTotalBasedOnTaxType(PartsTotalAfterDisc: number, PartsTaxAmount: number, ServicesTotalAfterDisc: number, ServicesTaxTotal: number, IsTaxable: boolean, Adjust: number, DecimalsNumber: number): number;
15
+ static GetDetailedTotalsData(finalTotalsData: any, IsTaxable: boolean, PartsList: any, LaborList: any, TaxCodes: any, Tax: any, HasNoTax: boolean, DecimalsNumber: number): any;
16
16
  static GetPartGSTTaxTotal(PartsList: Array<any>): number[];
17
17
  static GetServicesGSTTaxTotal(ServicesList: Array<any>): number[];
18
- static GetPartsTaxGroupingFor(PartsList: any, TaxCodes: any): any[];
19
- static GetTaxGroupingForPartsByHSN(Items: any, TaxCodes: any): any[];
18
+ static GetPartsTaxGroupingFor(PartsList: any, TaxCodes: any, DecimalsNumber: number): any[];
19
+ static GetTaxGroupingForPartsByHSN(Items: any, TaxCodes: any, DecimalsNumber: number): any[];
20
20
  static GetCombinedTaxPercentage(Items: any, TaxCodes: any): any;
21
21
  static ComparePartsByHSN(Items: any, TaxCodes: any): any[];
22
- static GetTaxGroupingInfoByHSN(FinalMatchedParts: any, TaxCodes: any): any[];
22
+ static GetTaxGroupingInfoByHSN(FinalMatchedParts: any, TaxCodes: any, DecimalsNumber: number): any[];
23
23
  }
@@ -5,7 +5,7 @@ const aggregation_1 = require("../../aggregation/aggregation");
5
5
  const code_enums_1 = require("../../enums/code-enums");
6
6
  const tr_utils_1 = require("../../utils/tr-utils");
7
7
  class PurchaseOrderTotalsService {
8
- static GetTotalsValue(opCodesList, argPartsList, IsTaxable, DetailedTotalsInfo, TaxCodes, Tax, ReturnPartsAlso, HasNoTax, GetSubTotal, Discount, DiscInPerc, Adjust) {
8
+ static GetTotalsValue(opCodesList, argPartsList, IsTaxable, DetailedTotalsInfo, TaxCodes, Tax, ReturnPartsAlso, HasNoTax, GetSubTotal, Discount, DiscInPerc, Adjust, EntitySettings) {
9
9
  let PartsList = tr_utils_1.TrUtils.IsNull(argPartsList) ? [] : tr_utils_1.TrUtils.Stringify(argPartsList);
10
10
  // PartsList = this.ResetPartValuesIfInvalid(PartsList);
11
11
  // PartsList = this.GetPartsDiscountPrice(PartsList);
@@ -13,27 +13,27 @@ class PurchaseOrderTotalsService {
13
13
  if (tr_utils_1.TrUtils.IsNull(opCodesList)) {
14
14
  opCodesList = [];
15
15
  }
16
- opCodesList = this.CalculateLaborValues(opCodesList, IsTaxable);
17
- PartsList = this.GetPartsTaxAmount(PartsList, IsTaxable, TaxCodes);
16
+ opCodesList = this.CalculateLaborValues(opCodesList, IsTaxable, EntitySettings.DecimalsNumber);
17
+ PartsList = this.GetPartsTaxAmount(PartsList, IsTaxable, TaxCodes, EntitySettings.DecimalsNumber);
18
18
  // PartsList = this.GetPartsAfterTax(PartsList);
19
- let finalTotalsData = this.GetTotalsInfo(PartsList, opCodesList, IsTaxable, TaxCodes, HasNoTax, GetSubTotal, Discount, DiscInPerc, Adjust);
19
+ let finalTotalsData = this.GetTotalsInfo(PartsList, opCodesList, IsTaxable, TaxCodes, HasNoTax, GetSubTotal, Discount, DiscInPerc, Adjust, EntitySettings.DecimalsNumber);
20
20
  if (ReturnPartsAlso) {
21
21
  finalTotalsData.Ops = opCodesList;
22
22
  finalTotalsData.Items = PartsList;
23
23
  }
24
24
  if (DetailedTotalsInfo === true) {
25
- finalTotalsData = this.GetDetailedTotalsData(finalTotalsData, IsTaxable, PartsList, opCodesList, TaxCodes, Tax, HasNoTax);
25
+ finalTotalsData = this.GetDetailedTotalsData(finalTotalsData, IsTaxable, PartsList, opCodesList, TaxCodes, Tax, HasNoTax, EntitySettings.DecimalsNumber);
26
26
  }
27
27
  return finalTotalsData;
28
28
  }
29
- static CalculateLaborValues(opCodesList, IsIndependentTax) {
30
- opCodesList = this.ResetLaborValues(opCodesList, IsIndependentTax);
29
+ static CalculateLaborValues(opCodesList, IsIndependentTax, DecimalsNumber) {
30
+ opCodesList = this.ResetLaborValues(opCodesList, IsIndependentTax, DecimalsNumber);
31
31
  // opCodesList = this.GetOperationsDiscountPrice(opCodesList);
32
32
  // opCodesList = this.GetOperationsAfterDiscount(opCodesList,IsIndependentTax);
33
33
  // opCodesList = this.GetOperationsAfterTax(opCodesList, IsIndependentTax);
34
34
  return opCodesList;
35
35
  }
36
- static ResetLaborValues(opCodesList, IsIndependentTax) {
36
+ static ResetLaborValues(opCodesList, IsIndependentTax, DecimalsNumber) {
37
37
  opCodesList.forEach((Operation) => {
38
38
  Operation = this.ResetLaborValueIfInvalid(Operation);
39
39
  Operation.DiscountedPrice = (0, aggregation_1.addition)(Operation.Disc, Operation.RecDisc);
@@ -53,10 +53,10 @@ class PurchaseOrderTotalsService {
53
53
  let Price = 0;
54
54
  Price = (0, aggregation_1.multiply)(Operation.UnCo, Operation.Qty);
55
55
  if (IsIndependentTax) {
56
- Operation.LineTotal = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.addition)((0, aggregation_1.subtraction)(Price, Operation.Disc), Operation.GSTAmt));
56
+ Operation.LineTotal = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.addition)((0, aggregation_1.subtraction)(Price, Operation.Disc), Operation.GSTAmt), DecimalsNumber);
57
57
  }
58
58
  else {
59
- Operation.LineTotal = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.subtraction)(Price, Operation.Disc));
59
+ Operation.LineTotal = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.subtraction)(Price, Operation.Disc), DecimalsNumber);
60
60
  }
61
61
  });
62
62
  return opCodesList;
@@ -96,7 +96,7 @@ class PurchaseOrderTotalsService {
96
96
  return (0, aggregation_1.addition)(Disc, tr_utils_1.TrUtils.SetValueToZeroIfNull(RecDisc));
97
97
  // }
98
98
  }
99
- static GetPartsTaxAmount(Items, IsTaxable, TaxCodes) {
99
+ static GetPartsTaxAmount(Items, IsTaxable, TaxCodes, DecimalsNumber) {
100
100
  Items.forEach((Part) => {
101
101
  Part = this.ResetPartValueIfInvalid(Part);
102
102
  // Part.CGSTAmt = this.GetCGSTTaxAmount(Part.AfterDiscountPrice, IsTaxable, Part.TCode, TaxCodes);
@@ -113,7 +113,7 @@ class PurchaseOrderTotalsService {
113
113
  if (IsTaxable) {
114
114
  // if (!TrUtils(Part.Perc)) {
115
115
  Price = (0, aggregation_1.multiply)(Part.UnCo, Part.Qty);
116
- Part.LineTotal = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.addition)((0, aggregation_1.subtraction)(Price, Part.Disc), Part.GSTAmt));
116
+ Part.LineTotal = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.addition)((0, aggregation_1.subtraction)(Price, Part.Disc), Part.GSTAmt), DecimalsNumber);
117
117
  // } else {
118
118
  // Part.LineTotal = TrUtils.FixedTo((Part.UnPr - Part.Disc) + Part.GSTAmt);
119
119
  // }
@@ -122,7 +122,7 @@ class PurchaseOrderTotalsService {
122
122
  // let DiscPrice: any = 0;
123
123
  // if (Part.Perc) {
124
124
  Price = (0, aggregation_1.multiply)(Part.UnCo, Part.Qty);
125
- Part.LineTotal = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.subtraction)(Price, Part.Disc));
125
+ Part.LineTotal = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.subtraction)(Price, Part.Disc), DecimalsNumber);
126
126
  // } else {
127
127
  // Part.LineTotal = TrUtils.FixedTo((Part.UnPr - Part.Disc));
128
128
  // }
@@ -156,7 +156,7 @@ class PurchaseOrderTotalsService {
156
156
  return [0, 0, 0];
157
157
  }
158
158
  }
159
- static GetTotalsInfo(PartsList, LaborList, IsTaxable, TaxCodes, HasNoTax, GetSubTotal, Discount, DiscInPerc, Adjust) {
159
+ static GetTotalsInfo(PartsList, LaborList, IsTaxable, TaxCodes, HasNoTax, GetSubTotal, Discount, DiscInPerc, Adjust, DecimalsNumber) {
160
160
  let finalTotalsData = {};
161
161
  let PartsInfo = this.GetPartsTotalTaxAndAfterDiscount(PartsList);
162
162
  let PartsTotalAfterDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(PartsInfo[0]);
@@ -167,7 +167,7 @@ class PurchaseOrderTotalsService {
167
167
  let ServicesDiscTotal = tr_utils_1.TrUtils.SetValueToZeroIfNull(ServicesInfo[1]);
168
168
  let ServicesTaxTotal = tr_utils_1.TrUtils.SetValueToZeroIfNull(ServicesInfo[2]);
169
169
  finalTotalsData.SubTotal = (0, aggregation_1.addition)(PartsTotalAfterDisc, PartsDiscTotal, ServicesTotalAfterDisc, ServicesDiscTotal);
170
- finalTotalsData.Adj = tr_utils_1.TrUtils.FixPriceValue(Adjust);
170
+ finalTotalsData.Adj = tr_utils_1.TrUtils.FixPriceValue(Adjust, DecimalsNumber);
171
171
  // if (GetSubTotal) {
172
172
  // finalTotalsData.SubTotal = this.GetTotalBasedOnTaxType(PartsTotalAfterDisc, PartsTaxTotal,
173
173
  // IsTaxable);
@@ -182,7 +182,7 @@ class PurchaseOrderTotalsService {
182
182
  // }
183
183
  // finalTotalsData.Total = Total;
184
184
  // } else {
185
- finalTotalsData.Total = this.GetTotalBasedOnTaxType(PartsTotalAfterDisc, PartsTaxTotal, ServicesTotalAfterDisc, ServicesTaxTotal, IsTaxable, Adjust);
185
+ finalTotalsData.Total = this.GetTotalBasedOnTaxType(PartsTotalAfterDisc, PartsTaxTotal, ServicesTotalAfterDisc, ServicesTaxTotal, IsTaxable, Adjust, DecimalsNumber);
186
186
  // }
187
187
  // finalTotalsData.Round = TrUtils.FixedTo(Math.round(finalTotalsData.Total) - finalTotalsData.Total);
188
188
  // finalTotalsData.Total = Math.round(finalTotalsData.Total);
@@ -210,7 +210,7 @@ class PurchaseOrderTotalsService {
210
210
  });
211
211
  return [PartsTotalAfterDisc, PartsDiscountedTotal, TotalTaxAmt];
212
212
  }
213
- static GetTotalBasedOnTaxType(PartsTotalAfterDisc, PartsTaxAmount, ServicesTotalAfterDisc, ServicesTaxTotal, IsTaxable, Adjust) {
213
+ static GetTotalBasedOnTaxType(PartsTotalAfterDisc, PartsTaxAmount, ServicesTotalAfterDisc, ServicesTaxTotal, IsTaxable, Adjust, DecimalsNumber) {
214
214
  let Total = 0;
215
215
  if (IsTaxable) {
216
216
  Total = (0, aggregation_1.addition)(PartsTotalAfterDisc, PartsTaxAmount, ServicesTotalAfterDisc, ServicesTaxTotal);
@@ -219,9 +219,9 @@ class PurchaseOrderTotalsService {
219
219
  Total = (0, aggregation_1.addition)(PartsTotalAfterDisc, ServicesTotalAfterDisc);
220
220
  }
221
221
  let finalTotal = (0, aggregation_1.addition)(Total, tr_utils_1.TrUtils.SetValueToZeroIfNull(Adjust));
222
- return tr_utils_1.TrUtils.FixedTo(finalTotal);
222
+ return tr_utils_1.TrUtils.FixedTo(finalTotal, DecimalsNumber);
223
223
  }
224
- static GetDetailedTotalsData(finalTotalsData, IsTaxable, PartsList, LaborList, TaxCodes, Tax, HasNoTax) {
224
+ static GetDetailedTotalsData(finalTotalsData, IsTaxable, PartsList, LaborList, TaxCodes, Tax, HasNoTax, DecimalsNumber) {
225
225
  let PartsInfo = this.GetPartsTotalTaxAndAfterDiscount(PartsList);
226
226
  let ServicesInfo = this.GetServiceTotalTaxAndAfterDiscount(LaborList);
227
227
  finalTotalsData.PartsDiscTotal = tr_utils_1.TrUtils.SetValueToZeroIfNull(PartsInfo[1]);
@@ -249,7 +249,7 @@ class PurchaseOrderTotalsService {
249
249
  finalTotalsData.IsTaxable = IsTaxable;
250
250
  finalTotalsData.Tax = Tax;
251
251
  finalTotalsData.HasNoTax = HasNoTax;
252
- finalTotalsData.TaxGroupData = this.GetPartsTaxGroupingFor(PartsList, TaxCodes);
252
+ finalTotalsData.TaxGroupData = this.GetPartsTaxGroupingFor(PartsList, TaxCodes, DecimalsNumber);
253
253
  // finalTotalsData.TotalRoundedBy = TrUtils.FixedTo(Math.round(finalTotalsData.Total) - finalTotalsData.Total);
254
254
  finalTotalsData.RoundedTotal = Math.round(finalTotalsData.Total);
255
255
  // finalTotalsData.Round = TrUtils.FixedTo(Math.round(finalTotalsData.Total) - finalTotalsData.Total);
@@ -278,14 +278,14 @@ class PurchaseOrderTotalsService {
278
278
  });
279
279
  return [CGSTAmt, SGSTAmt, IGSTAmt];
280
280
  }
281
- static GetPartsTaxGroupingFor(PartsList, TaxCodes) {
282
- return this.GetTaxGroupingForPartsByHSN(tr_utils_1.TrUtils.Stringify(PartsList), TaxCodes);
281
+ static GetPartsTaxGroupingFor(PartsList, TaxCodes, DecimalsNumber) {
282
+ return this.GetTaxGroupingForPartsByHSN(tr_utils_1.TrUtils.Stringify(PartsList), TaxCodes, DecimalsNumber);
283
283
  }
284
- static GetTaxGroupingForPartsByHSN(Items, TaxCodes) {
284
+ static GetTaxGroupingForPartsByHSN(Items, TaxCodes, DecimalsNumber) {
285
285
  Items = this.GetCombinedTaxPercentage(Items, TaxCodes);
286
286
  // Items = this.ResetPartsHSNIfInvalid(Items);
287
287
  let FinalMatchedParts = this.ComparePartsByHSN(Items, TaxCodes);
288
- return this.GetTaxGroupingInfoByHSN(FinalMatchedParts, TaxCodes);
288
+ return this.GetTaxGroupingInfoByHSN(FinalMatchedParts, TaxCodes, DecimalsNumber);
289
289
  }
290
290
  static GetCombinedTaxPercentage(Items, TaxCodes) {
291
291
  Items.forEach((Part) => {
@@ -332,7 +332,7 @@ class PurchaseOrderTotalsService {
332
332
  });
333
333
  return FinalMatchedParts;
334
334
  }
335
- static GetTaxGroupingInfoByHSN(FinalMatchedParts, TaxCodes) {
335
+ static GetTaxGroupingInfoByHSN(FinalMatchedParts, TaxCodes, DecimalsNumber) {
336
336
  let HSNTaxInfo = [];
337
337
  FinalMatchedParts.forEach((MatchedPart) => {
338
338
  let TaxInfo = {};
@@ -347,8 +347,8 @@ class PurchaseOrderTotalsService {
347
347
  TaxAmount = (0, aggregation_1.addition)(TaxAmount, argMatchedGSTPart.SGST);
348
348
  });
349
349
  TaxInfo.HSN = HSN;
350
- TaxInfo.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(TaxOnAmount);
351
- TaxInfo.TotalTaxAmount = tr_utils_1.TrUtils.FixPriceValue(TaxAmount);
350
+ TaxInfo.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(TaxOnAmount, DecimalsNumber);
351
+ TaxInfo.TotalTaxAmount = tr_utils_1.TrUtils.FixPriceValue(TaxAmount, DecimalsNumber);
352
352
  TaxInfo.PartsCount = MatchedPart.length;
353
353
  // let CGST = this.GetCGSTValueBasedOnTaxCode(MatchedPart[0].TCode, TaxCodes);
354
354
  // let SGST = this.GetSGSTValueBasedOnTaxCode(MatchedPart[0].TCode, TaxCodes);
@@ -2,5 +2,5 @@ export declare class VendorCreditNotePrintService {
2
2
  static GetDataForVendorCreditNotesPrint(argCNData: any, EntityData: any, image: any, IncludeGST: any, ConsolidateGST: any, TaxCodes: any): any;
3
3
  static GetVendorDataForPrint(argVendorData: any): any;
4
4
  static ConcatTotalsInfo(creditNotePDFData: any, DetailedTotalsInfo: any): any;
5
- static FixPriceValuesForPrint(PrintData: any, TaxCodes: any): any;
5
+ static FixPriceValuesForPrint(PrintData: any, TaxCodes: any, DecimalsNumber: number): any;
6
6
  }
@@ -35,13 +35,13 @@ class VendorCreditNotePrintService {
35
35
  creditNotePDFData.Items = tr_utils_1.TrUtils.Stringify(CNData.Items);
36
36
  // creditNotePDFData.Items = this.GetPartsDescription(creditNotePDFData.Items);
37
37
  let DetailedTotalsInfo;
38
- DetailedTotalsInfo = vendor_credit_note_totals_service_1.VendorCreditNoteTotalsService.GetTotalsValue([], creditNotePDFData.Items, IsTaxable, true, creditNotePDFData.Disc, creditNotePDFData.Perc, TaxCodes, true, creditNotePDFData.Settings);
39
- creditNotePDFData = this.ConcatTotalsInfo(creditNotePDFData, DetailedTotalsInfo);
40
38
  creditNotePDFData.Entity = shared_print_service_1.PrintSharedService.GetFormattedEntityDataForPrint(EntityData, code_enums_1.PrintTypesEnum.PurOrder, CNData);
39
+ DetailedTotalsInfo = vendor_credit_note_totals_service_1.VendorCreditNoteTotalsService.GetTotalsValue([], creditNotePDFData.Items, IsTaxable, true, creditNotePDFData.Disc, creditNotePDFData.Perc, TaxCodes, true, creditNotePDFData.Settings, creditNotePDFData.Entity);
40
+ creditNotePDFData = this.ConcatTotalsInfo(creditNotePDFData, DetailedTotalsInfo);
41
41
  creditNotePDFData = shared_print_service_1.PrintSharedService.GetEntityHeaderStyles(creditNotePDFData, EntityData, image);
42
42
  creditNotePDFData.HeaderName = 'Vendor Credit Note';
43
43
  creditNotePDFData.Vendor = this.GetVendorDataForPrint(tr_utils_1.TrUtils.Stringify(CNData.BFrom));
44
- creditNotePDFData = this.FixPriceValuesForPrint(creditNotePDFData, TaxCodes);
44
+ creditNotePDFData = this.FixPriceValuesForPrint(creditNotePDFData, TaxCodes, creditNotePDFData.Entity);
45
45
  return creditNotePDFData;
46
46
  }
47
47
  static GetVendorDataForPrint(argVendorData) {
@@ -73,15 +73,15 @@ class VendorCreditNotePrintService {
73
73
  creditNotePDFData = tr_utils_1.TrUtils.ConcatObjects(creditNotePDFData, DetailedTotalsInfo);
74
74
  return creditNotePDFData;
75
75
  }
76
- static FixPriceValuesForPrint(PrintData, TaxCodes) {
76
+ static FixPriceValuesForPrint(PrintData, TaxCodes, DecimalsNumber) {
77
77
  PrintData.ShowDetailedPartTaxInfo = false;
78
78
  PrintData.Items.forEach((Part) => {
79
- Part.UnPr = tr_utils_1.TrUtils.FixPriceValue(Part.Pr);
80
- Part.DiscountedPrice = tr_utils_1.TrUtils.FixPriceValue(Part.DiscountedPrice);
81
- Part.AfterTax = tr_utils_1.TrUtils.FixPriceValue(Part.AfterTax);
82
- Part.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Part.CGST);
83
- Part.IGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Part.IGST);
84
- Part.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Part.SGST);
79
+ Part.UnPr = tr_utils_1.TrUtils.FixPriceValue(Part.Pr, DecimalsNumber);
80
+ Part.DiscountedPrice = tr_utils_1.TrUtils.FixPriceValue(Part.DiscountedPrice, DecimalsNumber);
81
+ Part.AfterTax = tr_utils_1.TrUtils.FixPriceValue(Part.AfterTax, DecimalsNumber);
82
+ Part.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Part.CGST, DecimalsNumber);
83
+ Part.IGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Part.IGST, DecimalsNumber);
84
+ Part.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Part.SGST, DecimalsNumber);
85
85
  if (!tr_utils_1.TrUtils.CheckInvalidSelect(Part.TCode)) {
86
86
  PrintData.ShowDetailedPartTaxInfo = true;
87
87
  }
@@ -89,16 +89,16 @@ class VendorCreditNotePrintService {
89
89
  Part.SGSTPerc = shared_print_service_1.PrintSharedService.GetSGSTValueBasedOnTaxCode(Part.TCode, TaxCodes);
90
90
  Part.IGSTPerc = shared_print_service_1.PrintSharedService.GetIGSTValueBasedOnTaxCode(Part.TCode, TaxCodes);
91
91
  });
92
- PrintData.PartsDiscTotal = tr_utils_1.TrUtils.FixPriceValue(PrintData.CustItemsDiscTotal);
93
- PrintData.PartsTotalAfterDisc = tr_utils_1.TrUtils.FixPriceValue(PrintData.CustItemsTotalAfterDisc);
94
- PrintData.PartsTotalBeforeDisc = tr_utils_1.TrUtils.FixPriceValue(PrintData.CustItemsTotalBeforeDisc);
95
- PrintData.TaxTotal = tr_utils_1.TrUtils.FixPriceValue(PrintData.TaxTotal);
96
- PrintData.PartCGST = tr_utils_1.TrUtils.FixPriceValue(PrintData.CustItemCGST);
97
- PrintData.PartIGST = tr_utils_1.TrUtils.FixPriceValue(PrintData.CustItemIGST);
98
- PrintData.PartSGST = tr_utils_1.TrUtils.FixPriceValue(PrintData.CustItemSGST);
99
- PrintData.PartAfterTax = tr_utils_1.TrUtils.FixPriceValue(PrintData.CustItemAfterTax);
100
- PrintData.TotalRoundedBy = tr_utils_1.TrUtils.FixPriceValue(PrintData.CustTotalRoundedBy);
101
- PrintData.RoundedTotal = tr_utils_1.TrUtils.FixPriceValue(PrintData.CustRoundedTotal);
92
+ PrintData.PartsDiscTotal = tr_utils_1.TrUtils.FixPriceValue(PrintData.CustItemsDiscTotal, DecimalsNumber);
93
+ PrintData.PartsTotalAfterDisc = tr_utils_1.TrUtils.FixPriceValue(PrintData.CustItemsTotalAfterDisc, DecimalsNumber);
94
+ PrintData.PartsTotalBeforeDisc = tr_utils_1.TrUtils.FixPriceValue(PrintData.CustItemsTotalBeforeDisc, DecimalsNumber);
95
+ PrintData.TaxTotal = tr_utils_1.TrUtils.FixPriceValue(PrintData.TaxTotal, DecimalsNumber);
96
+ PrintData.PartCGST = tr_utils_1.TrUtils.FixPriceValue(PrintData.CustItemCGST, DecimalsNumber);
97
+ PrintData.PartIGST = tr_utils_1.TrUtils.FixPriceValue(PrintData.CustItemIGST, DecimalsNumber);
98
+ PrintData.PartSGST = tr_utils_1.TrUtils.FixPriceValue(PrintData.CustItemSGST, DecimalsNumber);
99
+ PrintData.PartAfterTax = tr_utils_1.TrUtils.FixPriceValue(PrintData.CustItemAfterTax, DecimalsNumber);
100
+ PrintData.TotalRoundedBy = tr_utils_1.TrUtils.FixPriceValue(PrintData.CustTotalRoundedBy, DecimalsNumber);
101
+ PrintData.RoundedTotal = tr_utils_1.TrUtils.FixPriceValue(PrintData.CustRoundedTotal, DecimalsNumber);
102
102
  return PrintData;
103
103
  }
104
104
  }
@@ -1,24 +1,24 @@
1
1
  export declare class VendorCreditNoteTotalsService {
2
- static GetTotalsValue(opCodesList: any, ItemsList: any, IsIndependentTax: boolean, DetailedInfo: boolean, Disc: any, Perc: string, TaxCodes: any, WithItems: boolean, Settings: any): any;
2
+ static GetTotalsValue(opCodesList: any, ItemsList: any, IsIndependentTax: boolean, DetailedInfo: boolean, Disc: any, Perc: string, TaxCodes: any, WithItems: boolean, Settings: any, EntitySettings: any): any;
3
3
  static CalculateLaborItemValues(ItemsList: any, IsIndependentTax: boolean): any;
4
4
  static ResetLaborItemValues(ItemsList: any, IsIndependentTax: boolean): any;
5
5
  static ResetLaborItemValueIfInvalid(Item: any): any;
6
- static GetFinalCNDataForSave(LaborList: any, ItemsList: any, IsIndependentTax: boolean, Disc: any, Perc: string, DetailedInfo: boolean, Settings: any): any;
6
+ static GetFinalCNDataForSave(LaborList: any, ItemsList: any, IsIndependentTax: boolean, Disc: any, Perc: string, DetailedInfo: boolean, Settings: any, DecimalsNumber: number): any;
7
7
  static SetMainDiscountValues(Disc: string, Perc: string, finalTotalsData: any, DetailedInfo: boolean): any;
8
- static GetFinalCustomerTotalsData(finalTotalsData: any, LaborList: any, ItemsList: any, IsIndependentTax: boolean, DetailedInfo: boolean): any;
8
+ static GetFinalCustomerTotalsData(finalTotalsData: any, LaborList: any, ItemsList: any, IsIndependentTax: boolean, DetailedInfo: boolean, DecimalsNumber: number): any;
9
9
  static GetSubTotalFor(LaborList: any, ItemsList: any): any;
10
10
  static GetItemsTotalAfterDiscount(ItemsList: any): any;
11
- static GetDetailedTotalsData(finalTotalsData: any, IsIndependentTax: boolean, opCodesList: any, ItemsList: any, TaxCodes: any): any;
12
- static GetItemDiscountedTotal(ItemsList: any, isTaxable: boolean, finalTotalsData: any): number;
11
+ static GetDetailedTotalsData(finalTotalsData: any, IsIndependentTax: boolean, opCodesList: any, ItemsList: any, TaxCodes: any, DecimalsNumber: number): any;
12
+ static GetItemDiscountedTotal(ItemsList: any, isTaxable: boolean, finalTotalsData: any, DecimalsNumber: number): number;
13
13
  static GetLaborTaxTotalFor(opCodesList: any, IsIndependentTax: boolean): any;
14
14
  static GetItemsTaxTotalFor(ItemsList: any, IsIndependentTax: boolean): any;
15
- static GetCustomerTotalBasedOnTaxType(finalTotalsData: any, LaborTaxAmount: number, ItemsTaxAmount: number, LaborList: any, ItemsList: any, IsIndependentTax: boolean): any;
15
+ static GetCustomerTotalBasedOnTaxType(finalTotalsData: any, LaborTaxAmount: number, ItemsTaxAmount: number, LaborList: any, ItemsList: any, IsIndependentTax: boolean, DecimalsNumber: number): any;
16
16
  static LaborTotalAfterDiscount(LaborTotalAfterDisc: number, LaborTaxAmount: number, MainLDisc: number, LDiscInPerc: string): number;
17
17
  static ItemsTotalAfterDiscount(ItemsTotalAfterDisc: number, ItemsTaxAmount: number, MainPDisc: number, PDiscInPerc: string): number;
18
18
  static GetItemGSTTaxTotal(ItemsList: any, IsIndependentTax: boolean): number[];
19
- static GetTaxGroupingForItemsByHSN(Items: any, TaxCodes: any): any[];
19
+ static GetTaxGroupingForItemsByHSN(Items: any, TaxCodes: any, DecimalsNumber: number): any[];
20
20
  static GetCombinedTaxPercentage(Items: any, TaxCodes: any): any;
21
21
  static CompareItemsByHSN(Items: any, TaxCodes: any): any[];
22
- static GetTaxGroupingInfoByHSN(FinalMatchedItems: any, TaxCodes: any): any[];
22
+ static GetTaxGroupingInfoByHSN(FinalMatchedItems: any, TaxCodes: any, DecimalsNumber: number): any[];
23
23
  static GetGSTValueBasedOnTaxCode(TCode: any, TaxCodes: any): any[];
24
24
  }