shareneus 1.4.50 → 1.4.51

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 (87) hide show
  1. package/dist/accounting/counter-sales/auto-sales-receipt-pdf.service.js +1 -1
  2. package/dist/accounting/counter-sales/sales-receipt-pdf.service.js +1 -1
  3. package/dist/accounting/counter-sales/sales-receipt-print.service.js +1 -1
  4. package/dist/accounting/credit-note/credit-note-pdf.service.js +1 -1
  5. package/dist/accounting/debit-note/debit-note-print.service.js +1 -1
  6. package/dist/accounting/invoice/inv-pdf.service.js +13 -12
  7. package/dist/accounting/invoice/inv-print.service.js +6 -6
  8. package/dist/accounting/invoice/invoice-landscape-pdf.service.d.ts +1 -1
  9. package/dist/accounting/invoice/invoice-landscape-pdf.service.js +7 -6
  10. package/dist/accounting/invoice/invoice-letterhead-pdf.service.js +13 -12
  11. package/dist/accounting/invoice/invoice-portrait-pdf.d.ts +5 -5
  12. package/dist/accounting/invoice/invoice-portrait-pdf.js +31 -30
  13. package/dist/accounting/invoice/invoice-total.service.js +1 -1
  14. package/dist/accounting/invoice/reports/excel/sa-wise-labor-sales-excel.service.d.ts +4 -4
  15. package/dist/accounting/invoice/reports/excel/sa-wise-labor-sales-excel.service.js +12 -11
  16. package/dist/accounting/invoice/reports/excel/sa-wise-part-sales-excel.service.d.ts +4 -4
  17. package/dist/accounting/invoice/reports/excel/sa-wise-part-sales-excel.service.js +12 -11
  18. package/dist/accounting/invoice/reports/excel/sale-summary-excel.service.d.ts +4 -4
  19. package/dist/accounting/invoice/reports/excel/sale-summary-excel.service.js +11 -10
  20. package/dist/accounting/invoice/reports/excel/sales-by-service-summary-excel.service.d.ts +4 -4
  21. package/dist/accounting/invoice/reports/excel/sales-by-service-summary-excel.service.js +19 -18
  22. package/dist/accounting/invoice/reports/excel/scheduled-drug-summary-excel.service.d.ts +4 -4
  23. package/dist/accounting/invoice/reports/excel/scheduled-drug-summary-excel.service.js +11 -11
  24. package/dist/accounting/invoice/reports/excel/scheduled-drugs-excel.service.d.ts +4 -4
  25. package/dist/accounting/invoice/reports/excel/scheduled-drugs-excel.service.js +11 -11
  26. package/dist/accounting/invoice/reports/pdf/analysis-pdf.service.d.ts +3 -3
  27. package/dist/accounting/invoice/reports/pdf/analysis-pdf.service.js +13 -12
  28. package/dist/accounting/invoice/reports/pdf/category-wise-item-pdf.service.d.ts +4 -4
  29. package/dist/accounting/invoice/reports/pdf/category-wise-item-pdf.service.js +14 -13
  30. package/dist/accounting/invoice/reports/pdf/cust-wise-sales-details-pdf.service.d.ts +4 -4
  31. package/dist/accounting/invoice/reports/pdf/cust-wise-sales-details-pdf.service.js +15 -14
  32. package/dist/accounting/invoice/reports/pdf/cust-wise-sales-summary-pdf.service.d.ts +4 -4
  33. package/dist/accounting/invoice/reports/pdf/cust-wise-sales-summary-pdf.service.js +15 -14
  34. package/dist/accounting/invoice/reports/pdf/item-wise-doctor-sale-pdf.service.d.ts +4 -4
  35. package/dist/accounting/invoice/reports/pdf/item-wise-doctor-sale-pdf.service.js +10 -10
  36. package/dist/accounting/invoice/reports/pdf/item-wise-sales-pdf.service.d.ts +4 -4
  37. package/dist/accounting/invoice/reports/pdf/item-wise-sales-pdf.service.js +15 -14
  38. package/dist/accounting/invoice/reports/pdf/manf-wise-sales-pdf.service.d.ts +4 -4
  39. package/dist/accounting/invoice/reports/pdf/manf-wise-sales-pdf.service.js +13 -12
  40. package/dist/accounting/invoice/reports/pdf/operator-wise-details-pdf.service.d.ts +4 -4
  41. package/dist/accounting/invoice/reports/pdf/operator-wise-details-pdf.service.js +14 -14
  42. package/dist/accounting/invoice/reports/pdf/operator-wise-summary-pdf.d.ts +4 -4
  43. package/dist/accounting/invoice/reports/pdf/operator-wise-summary-pdf.js +14 -14
  44. package/dist/accounting/invoice/reports/pdf/sales-by-service-pdf.service.d.ts +4 -4
  45. package/dist/accounting/invoice/reports/pdf/sales-by-service-pdf.service.js +14 -13
  46. package/dist/accounting/invoice/reports/pdf/scheduled-drug-pdf.service.d.ts +4 -4
  47. package/dist/accounting/invoice/reports/pdf/scheduled-drug-pdf.service.js +8 -8
  48. package/dist/accounting/invoice/reports/pdf/scheduled-drug-summary-pdf.service.d.ts +4 -4
  49. package/dist/accounting/invoice/reports/pdf/scheduled-drug-summary-pdf.service.js +12 -11
  50. package/dist/accounting/invoice/shared-inv-pdf.service.js +1 -1
  51. package/dist/accounting/payment-receive/reports/excel/cust-balance-excel.service.d.ts +4 -4
  52. package/dist/accounting/payment-receive/reports/excel/cust-balance-excel.service.js +9 -9
  53. package/dist/accounting/payment-receive/reports/excel/payment-receive-excel.service.d.ts +5 -5
  54. package/dist/accounting/payment-receive/reports/excel/payment-receive-excel.service.js +11 -11
  55. package/dist/accounting/payment-receive/reports/pdf/customer-balances-pdf.service.d.ts +3 -3
  56. package/dist/accounting/payment-receive/reports/pdf/customer-balances-pdf.service.js +10 -10
  57. package/dist/accounting/payment-receive/reports/pdf/payment-report-pdf.service.d.ts +3 -3
  58. package/dist/accounting/payment-receive/reports/pdf/payment-report-pdf.service.js +7 -7
  59. package/dist/appointments/consultations/consultation-fee-receipt.service.d.ts +1 -1
  60. package/dist/appointments/consultations/consultation-fee-receipt.service.js +4 -4
  61. package/dist/inventory/items/issue-parts-pdf.service.js +1 -1
  62. package/dist/inventory/items/reports/pdf/expiring-drugs-pdf.service.d.ts +2 -2
  63. package/dist/inventory/items/reports/pdf/expiring-drugs-pdf.service.js +8 -7
  64. package/dist/inventory/items/reports/pdf/item-wise-mout-details-pdf.d.ts +4 -4
  65. package/dist/inventory/items/reports/pdf/item-wise-mout-details-pdf.js +9 -9
  66. package/dist/inventory/items/reports/pdf/item-wise-mout-summary-pdf.d.ts +4 -4
  67. package/dist/inventory/items/reports/pdf/item-wise-mout-summary-pdf.js +9 -9
  68. package/dist/purchases/payment-made/reports/pdf/vendor-balances-pdf.service.d.ts +3 -3
  69. package/dist/purchases/payment-made/reports/pdf/vendor-balances-pdf.service.js +8 -8
  70. package/dist/purchases/purchase-order/purchase-order-pdf.service.js +5 -5
  71. package/dist/purchases/purchase-order/purchase-order-print.service.d.ts +2 -2
  72. package/dist/purchases/purchase-order/purchase-order-print.service.js +25 -25
  73. package/dist/purchases/vendor-credit-note/vendor-credit-note-pdf.service.js +1 -1
  74. package/dist/purchases/vendor-debit-note/vendor-debit-note-pdf.service.js +1 -1
  75. package/dist/sales/delivery-challan/dc-landscape-pdf.service.d.ts +1 -1
  76. package/dist/sales/delivery-challan/dc-landscape-pdf.service.js +7 -6
  77. package/dist/sales/sales/sales-pdf.service.js +1 -1
  78. package/dist/sales/sales/sales-print.service.js +6 -6
  79. package/dist/services/reports/pdf/repair-orders-pdf.service.d.ts +4 -4
  80. package/dist/services/reports/pdf/repair-orders-pdf.service.js +9 -9
  81. package/dist/services/ro-pdf.service.js +2 -2
  82. package/dist/services/separate-wo-print.service.js +1 -1
  83. package/dist/shared/shared-pdf.service.d.ts +3 -3
  84. package/dist/shared/shared-pdf.service.js +31 -30
  85. package/dist/utils/tr-utils.d.ts +1 -1
  86. package/dist/utils/tr-utils.js +2 -2
  87. package/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SharedPDFService = void 0;
4
+ const aggregation_1 = require("../aggregation/aggregation");
4
5
  const enums_1 = require("../enums/enums");
5
6
  const my_date_1 = require("../utils/my-date");
6
7
  const tr_utils_1 = require("../utils/tr-utils");
@@ -1576,12 +1577,12 @@ class SharedPDFService {
1576
1577
  let totalDisc;
1577
1578
  let totalTax;
1578
1579
  if (!Consolidate) {
1579
- totalTax = tr_utils_1.TrUtils.FixPriceValue(Number(LaborTotalTax) + Number(PartTotalTax));
1580
+ totalTax = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)(Number(LaborTotalTax), Number(PartTotalTax)), RecordData.Entity.DecimalsNumber);
1580
1581
  if (istaxable) {
1581
- totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(OverAllMainLaborDiscount) + Number(OverAllMainPartsDiscount));
1582
+ totalDisc = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)(Number(OverAllMainLaborDiscount), Number(OverAllMainPartsDiscount)), RecordData.Entity.DecimalsNumber);
1582
1583
  }
1583
1584
  else {
1584
- totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(OverAllMainLaborDiscount) + Number(OverAllMainPartsDiscount));
1585
+ totalDisc = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)(Number(OverAllMainLaborDiscount), Number(OverAllMainPartsDiscount)), RecordData.Entity.DecimalsNumber);
1585
1586
  }
1586
1587
  }
1587
1588
  let serviceName;
@@ -1626,27 +1627,27 @@ class SharedPDFService {
1626
1627
  ];
1627
1628
  if (moreDiscDetails) {
1628
1629
  if (!tr_utils_1.TrUtils.IsZero(RecordData.PDisc)) {
1629
- AccountFields.push({ name: 'Items Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.PDisc) });
1630
+ AccountFields.push({ name: 'Items Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.PDisc, RecordData.Entity.DecimalsNumber) });
1630
1631
  }
1631
1632
  if (!tr_utils_1.TrUtils.IsZero(RecordData.LDisc)) {
1632
- AccountFields.push({ name: 'Services Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.LDisc) });
1633
+ AccountFields.push({ name: 'Services Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.LDisc, RecordData.Entity.DecimalsNumber) });
1633
1634
  }
1634
1635
  if (!tr_utils_1.TrUtils.IsZero(RecordData.Disc)) {
1635
- AccountFields.push({ name: 'Overall Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.Disc) });
1636
+ AccountFields.push({ name: 'Overall Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.Disc, RecordData.Entity.DecimalsNumber) });
1636
1637
  }
1637
1638
  }
1638
1639
  else {
1639
1640
  AccountFields.push({ name: 'Discount', value: OverAllRecordDiscount });
1640
1641
  }
1641
1642
  if (!Consolidate) {
1642
- AccountFields.unshift({ name: 'SubTotal', value: tr_utils_1.TrUtils.FixPriceValue(STotal) });
1643
+ AccountFields.unshift({ name: 'SubTotal', value: tr_utils_1.TrUtils.FixPriceValue(STotal, RecordData.Entity.DecimalsNumber) });
1643
1644
  }
1644
1645
  if (!tr_utils_1.TrUtils.IsEmpty(totalTax)) {
1645
1646
  AccountFields.push({ name: 'Total Tax', value: totalTax });
1646
1647
  }
1647
1648
  if (!tr_utils_1.TrUtils.IsEmpty(Adj)) {
1648
1649
  if (Adj > 0) {
1649
- Adj = '+' + tr_utils_1.TrUtils.FixPriceValue(Adj);
1650
+ Adj = '+' + tr_utils_1.TrUtils.FixPriceValue(Adj, RecordData.Entity.DecimalsNumber);
1650
1651
  }
1651
1652
  AccountFields.push({ name: 'Adjust', value: Adj });
1652
1653
  }
@@ -1705,12 +1706,12 @@ class SharedPDFService {
1705
1706
  let totalDisc;
1706
1707
  let totalTax;
1707
1708
  if (!Consolidate) {
1708
- totalTax = tr_utils_1.TrUtils.FixPriceValue(Number(LaborTotalTax) + Number(PartTotalTax));
1709
+ totalTax = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)(Number(LaborTotalTax), Number(PartTotalTax)), RecordData.Entity.DecimalsNumber);
1709
1710
  if (istaxable) {
1710
- totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(OverAllMainLaborDiscount) + Number(OverAllMainPartsDiscount));
1711
+ totalDisc = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)(Number(OverAllMainLaborDiscount), Number(OverAllMainPartsDiscount)), RecordData.Entity.DecimalsNumber);
1711
1712
  }
1712
1713
  else {
1713
- totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(OverAllMainLaborDiscount) + Number(OverAllMainPartsDiscount));
1714
+ totalDisc = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)(Number(OverAllMainLaborDiscount), Number(OverAllMainPartsDiscount)), RecordData.Entity.DecimalsNumber);
1714
1715
  }
1715
1716
  }
1716
1717
  return {
@@ -1725,7 +1726,7 @@ class SharedPDFService {
1725
1726
  },
1726
1727
  { text: '', width: moreDiscDetails ? 40 : 60 },
1727
1728
  // this.GrandTotal(LaborAfterGST, PartsAfterGST, totalDisc, For, OverAllRecordTotal, Rounded, GrandTotal)
1728
- this.GrandTotal(RecordData, BasicLaborTotal, BasicPartsTotal, totalDisc, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, Adj, Consolidate, STotal, moreDiscDetails)
1729
+ this.GrandTotal(RecordData, BasicLaborTotal, BasicPartsTotal, totalDisc, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, Adj, Consolidate, STotal, moreDiscDetails, RecordData)
1729
1730
  ]
1730
1731
  // columnGap: 40
1731
1732
  ,
@@ -1736,12 +1737,12 @@ class SharedPDFService {
1736
1737
  let totalDisc;
1737
1738
  let totalTax;
1738
1739
  if (!Consolidate) {
1739
- totalTax = tr_utils_1.TrUtils.FixPriceValue(Number(PartTotalTax));
1740
+ totalTax = tr_utils_1.TrUtils.FixPriceValue(Number(PartTotalTax), RecordData.Entity.DecimalsNumber);
1740
1741
  if (istaxable) {
1741
- totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(OverAllMainPartsDiscount));
1742
+ totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(OverAllMainPartsDiscount), RecordData.Entity.DecimalsNumber);
1742
1743
  }
1743
1744
  else {
1744
- totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(OverAllMainPartsDiscount));
1745
+ totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(OverAllMainPartsDiscount), RecordData.Entity.DecimalsNumber);
1745
1746
  }
1746
1747
  }
1747
1748
  return {
@@ -1757,21 +1758,21 @@ class SharedPDFService {
1757
1758
  },
1758
1759
  { text: '', width: 100 },
1759
1760
  { text: '', width: 80 },
1760
- this.DebitGrandTotal(RecordData, BasicLaborTotal, BasicPartsTotal, totalDisc, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, moreDiscDetails)
1761
+ this.DebitGrandTotal(RecordData, BasicLaborTotal, BasicPartsTotal, totalDisc, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, moreDiscDetails, RecordData.Entity.DecimalsNumber)
1761
1762
  ]
1762
1763
  // columnGap: 40
1763
1764
  ,
1764
1765
  marginLeft: 10
1765
1766
  };
1766
1767
  }
1767
- static DebitGrandTotal(RecordData, LaborAfterGST, PartsAfterGST, OverAllRecordDiscount, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, moreDiscDetails) {
1768
+ static DebitGrandTotal(RecordData, LaborAfterGST, PartsAfterGST, OverAllRecordDiscount, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, moreDiscDetails, DecimalsNumber) {
1768
1769
  let AccountFields = [
1769
1770
  // { name: 'Labor Total', value: LaborAfterGST },
1770
1771
  // { name: 'Part Total', value: PartsAfterGST },
1771
- { name: 'SubTotal', value: tr_utils_1.TrUtils.FixPriceValue(tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(PartsAfterGST))) },
1772
+ { name: 'SubTotal', value: tr_utils_1.TrUtils.FixPriceValue(tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(PartsAfterGST)), DecimalsNumber) },
1772
1773
  ];
1773
1774
  if (moreDiscDetails) {
1774
- AccountFields.push({ name: 'Overall Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.Disc) });
1775
+ AccountFields.push({ name: 'Overall Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.Disc, DecimalsNumber) });
1775
1776
  }
1776
1777
  else {
1777
1778
  AccountFields.push({ name: 'Discount', value: OverAllRecordDiscount });
@@ -1838,7 +1839,7 @@ class SharedPDFService {
1838
1839
  this.GetTaxOnParts(ROPrintData.BasicPartsTotal, ROPrintData.OverAllMainPartsDiscount, ROPrintData.PCGST, ROPrintData.PSGST, ROPrintData.PIGST, ROPrintData.ShowIGST, ROPrintData.ShowAccParts, ROPrintData.ShowTaxColumn, ROPrintData.ShowDetailedPartTaxInfo, ROPrintData.Type, ROPrintData.Consolidate),
1839
1840
  this.PartsTaxAmounts(ROPrintData.PartsTaxInfo, ROPrintData.ShowAccParts, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn)
1840
1841
  ]
1841
- }, { text: '', width: 200 }, this.GrandTotal(ROPrintData, ROPrintData.LaborAfterGST, ROPrintData.PartsAfterGST, ROPrintData.OverAllRecordDiscount, null, ROPrintData.For, ROPrintData.OverAllRecordTotal, ROPrintData.Rounded, ROPrintData.GrandTotal, ROPrintData.Adj, ROPrintData.Consolidate, null, moreDiscDetails)
1842
+ }, { text: '', width: 200 }, this.GrandTotal(ROPrintData, ROPrintData.LaborAfterGST, ROPrintData.PartsAfterGST, ROPrintData.OverAllRecordDiscount, null, ROPrintData.For, ROPrintData.OverAllRecordTotal, ROPrintData.Rounded, ROPrintData.GrandTotal, ROPrintData.Adj, ROPrintData.Consolidate, null, moreDiscDetails, ROPrintData.Entity.DecimalsNumber)
1842
1843
  ]
1843
1844
  // columnGap: 40
1844
1845
  ,
@@ -1930,31 +1931,31 @@ class SharedPDFService {
1930
1931
  return this.emptyObject();
1931
1932
  }
1932
1933
  }
1933
- static GrandTotal(RecordData, LaborAfterGST, PartsAfterGST, OverAllRecordDiscount, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, Adj, Consolidate, subTotal, moreDiscDetails) {
1934
+ static GrandTotal(RecordData, LaborAfterGST, PartsAfterGST, OverAllRecordDiscount, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, Adj, Consolidate, subTotal, moreDiscDetails, DecimalsNumber) {
1934
1935
  let AccountFields = [
1935
1936
  // { name: 'Labor Total', value: LaborAfterGST },
1936
1937
  // { name: 'Part Total', value: PartsAfterGST },
1937
1938
  ];
1938
1939
  if (moreDiscDetails) {
1939
1940
  if (!tr_utils_1.TrUtils.IsZero(RecordData.PDisc)) {
1940
- AccountFields.push({ name: 'Items Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.PDisc) });
1941
+ AccountFields.push({ name: 'Items Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.PDisc, DecimalsNumber) });
1941
1942
  }
1942
1943
  if (!tr_utils_1.TrUtils.IsZero(RecordData.LDisc)) {
1943
- AccountFields.push({ name: 'Services Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.LDisc) });
1944
+ AccountFields.push({ name: 'Services Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.LDisc, DecimalsNumber) });
1944
1945
  }
1945
1946
  if (!tr_utils_1.TrUtils.IsZero(RecordData.Disc)) {
1946
- AccountFields.push({ name: 'Overall Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.Disc) });
1947
+ AccountFields.push({ name: 'Overall Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.Disc, DecimalsNumber) });
1947
1948
  }
1948
1949
  }
1949
1950
  else {
1950
1951
  AccountFields.push({ name: 'Discount', value: OverAllRecordDiscount });
1951
1952
  }
1952
1953
  if (!Consolidate && !tr_utils_1.TrUtils.IsNull(subTotal)) {
1953
- AccountFields.unshift({ name: 'SubTotal', value: tr_utils_1.TrUtils.FixPriceValue(tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(subTotal))) });
1954
+ AccountFields.unshift({ name: 'SubTotal', value: tr_utils_1.TrUtils.FixPriceValue(tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(subTotal)), DecimalsNumber) });
1954
1955
  }
1955
1956
  else {
1956
1957
  if (!Consolidate) {
1957
- AccountFields.unshift({ name: 'SubTotal', value: tr_utils_1.TrUtils.FixPriceValue(tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(LaborAfterGST)) + tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(PartsAfterGST))) });
1958
+ AccountFields.unshift({ name: 'SubTotal', value: tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)(tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(LaborAfterGST)), tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(PartsAfterGST))), DecimalsNumber) });
1958
1959
  }
1959
1960
  }
1960
1961
  if (!tr_utils_1.TrUtils.IsEmpty(totalTax)) {
@@ -1962,7 +1963,7 @@ class SharedPDFService {
1962
1963
  }
1963
1964
  if (!tr_utils_1.TrUtils.IsEmpty(Adj)) {
1964
1965
  if (Adj > 0) {
1965
- Adj = '+' + tr_utils_1.TrUtils.FixPriceValue(Adj);
1966
+ Adj = '+' + tr_utils_1.TrUtils.FixPriceValue(Adj, DecimalsNumber);
1966
1967
  }
1967
1968
  AccountFields.push({ name: 'Adjust', value: Adj });
1968
1969
  }
@@ -2083,7 +2084,7 @@ class SharedPDFService {
2083
2084
  });
2084
2085
  return body;
2085
2086
  }
2086
- static InvoiceDueStatus(Type, Paid, Due, Status, isCounter) {
2087
+ static InvoiceDueStatus(Type, Paid, Due, Status, isCounter, DecimalsNumber) {
2087
2088
  if (Type === 'Invoice' && !isCounter) {
2088
2089
  return {
2089
2090
  // lineHeight: 0.7,
@@ -2092,8 +2093,8 @@ class SharedPDFService {
2092
2093
  marginBottom: 5,
2093
2094
  table: {
2094
2095
  widths: [200, 174, 174],
2095
- body: [[{ text: 'Paid : ' + tr_utils_1.TrUtils.FixPriceValue(Paid) },
2096
- { text: 'Due : ' + tr_utils_1.TrUtils.FixPriceValue(Due) },
2096
+ body: [[{ text: 'Paid : ' + tr_utils_1.TrUtils.FixPriceValue(Paid, DecimalsNumber) },
2097
+ { text: 'Due : ' + tr_utils_1.TrUtils.FixPriceValue(Due, DecimalsNumber) },
2097
2098
  { text: 'Status : ' + Status }]]
2098
2099
  },
2099
2100
  layout: this.LayOutStyle(),
@@ -5,7 +5,7 @@ export declare class TrUtils {
5
5
  static IsFixedZero(Value: any): boolean;
6
6
  static Stringify(RecordData: any): any;
7
7
  static ConcatObjects(obj1: any, obj2: any): any;
8
- static ConvertPercToVal(Discount: any, Total: any): number | null;
8
+ static ConvertPercToVal(Discount: any, Total: any, DecimalsNumber?: number): number | null;
9
9
  static FixedTo(value: any, DecimalsNumber?: number): number;
10
10
  static FixPriceValue(Value: any, DecimalsNumber?: number): string;
11
11
  static SetValueToZeroIfNull(Value: any): any;
@@ -30,7 +30,7 @@ class TrUtils {
30
30
  }
31
31
  return obj1;
32
32
  }
33
- static ConvertPercToVal(Discount, Total) {
33
+ static ConvertPercToVal(Discount, Total, DecimalsNumber = 2) {
34
34
  if (this.IsNull(Total)) {
35
35
  return null;
36
36
  }
@@ -41,7 +41,7 @@ class TrUtils {
41
41
  if (this.IsNull(Total)) {
42
42
  Total = 0;
43
43
  }
44
- let value = this.FixedTo((0, aggregation_1.division)((0, aggregation_1.multiply)(Total, Discount), 100));
44
+ let value = this.FixedTo((0, aggregation_1.division)((0, aggregation_1.multiply)(Total, Discount), 100), DecimalsNumber);
45
45
  if (isNaN(value)) {
46
46
  value = 0;
47
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.4.50",
3
+ "version": "1.4.51",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",