Built files from Bizgaze WebServer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

employeenewregime.component.js 9.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. var Bizgaze;
  2. (function (Bizgaze) {
  3. let Apps;
  4. (function (Apps) {
  5. let Hrms;
  6. (function (Hrms) {
  7. let Payroll;
  8. (function (Payroll) {
  9. let Controls;
  10. (function (Controls) {
  11. let EmployeeRegime;
  12. (function (EmployeeRegime) {
  13. class EmployeeNewRegimeDetails extends Unibase.Platform.Core.BaseComponent {
  14. init(formpropertyid, prop, callback) { }
  15. loadControlSettings(controlsettingjson, formpropertyid) { }
  16. loadPropertySettings(propertysettings, formpropertyid, DocPropertyName) { }
  17. bindEditFormDetails(formpropertyid, propval, DocPropertyName) { }
  18. loadControl(containerid, prop) {
  19. var instance = this;
  20. instance.transactionId = prop.FormPropertyId;
  21. var html = `<table class="table zp-table salary-table declaration-details-table">
  22. <thead>
  23. <tr>
  24. <th width="70%">Particulars</th>
  25. <th width="30%" class="text-right">Declared amount</th>
  26. </tr>
  27. </thead>
  28. <tbody id="tblgetemployeenewregimedetailsBody">
  29. </tbody>
  30. </table>`;
  31. $("#" + containerid).html(html);
  32. Bizgaze.Apps.Hrms.Payroll.Controls.EmployeeRegime.EmployeeNewRegimeDetails.Instance().bindNewRegimeDetails();
  33. }
  34. bindNewRegimeDetails() {
  35. let instance = Bizgaze.Apps.Hrms.Payroll.Controls.EmployeeRegime.EmployeeNewRegimeDetails.Instance();
  36. let VisibleContainerId = Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds.length - 1];
  37. var installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
  38. var employeeId = Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_employeeid").Value);
  39. instance.fileCacheHelper.loadJsFile("apps/hrms/payroll/managers/payrollmanager.js", function () {
  40. Bizgaze.Apps.Hrms.Payroll.Managers.PayRollManager.Instance().employeeNewRegimeDetails(employeeId).then(function (response) {
  41. let html = '';
  42. for (const type in response.result) {
  43. if (type === 'RentalIncomeDtls') {
  44. html += `<tr>
  45. <td colspan="2" class="row-group font-weight-700 font-16">
  46. ${'Net Income / Loss from House Property'}
  47. </td>
  48. </tr>`;
  49. const rentalIncome = response.result[type];
  50. if (rentalIncome.length) {
  51. html += rentalIncome.map((obj) => {
  52. return `<tr>
  53. <tr>
  54. <td class="text-field-label">Total Income / Loss from House Property</td>
  55. <td class="text-right"> ₹ ${obj.AnnualRent}</td>
  56. </tr>
  57. <tr>
  58. <td class="text-field-label">Interest Paid on Home Loan</td>
  59. <td class="text-right"> ₹ ${obj.InterestPaid}</td>
  60. </tr>
  61. <tr>
  62. <td class="text-field-label">Lender Name</td>
  63. <td class="text-right"> ${obj.LenderName}</td>
  64. </tr>
  65. <tr>
  66. <td class="text-field-label">Lender Pan</td>
  67. <td class="text-right"> ${obj.LenderPan}</td>
  68. </tr>
  69. <tr>
  70. <td class="text-field-label">Annual Rent Received</td>
  71. <td class="text-right">₹ ${obj.AnnualRent}</td>
  72. </tr>
  73. <tr>
  74. <td class="text-field-label">Net Annual Value</td>
  75. <td class="text-right">₹ ${obj.NetAnnual}</td>
  76. </tr>
  77. <tr>
  78. <td class="text-field-label">Standard Deduction (@ 30% of Net Annual Value)</td>
  79. <td class="text-right">₹ ${obj.StandardDeduction}</td>
  80. </tr>
  81. <tr>
  82. <td class="text-field-label">Interest Paid on Home Loan</td>
  83. <td class="text-right">₹ ${obj.InterestPaid}</td>
  84. </tr>
  85. </tr>`;
  86. }).join('');
  87. }
  88. }
  89. if (type === 'OtherIncome') {
  90. html += `<tr>
  91. <td colspan="2" class="row-group font-weight-700 font-16">
  92. ${'Other Income'}
  93. </td>
  94. </tr>`;
  95. const otherIncome = response.result[type];
  96. if (otherIncome.length) {
  97. html += otherIncome.map((obj) => {
  98. return `<tr>
  99. <tr>
  100. <td class="text-field-label">Interest Earned from Savings Deposit</td>
  101. <td class="text-right"> ₹ ${obj.SavingsDeposit}</td>
  102. </tr>
  103. </tr>`;
  104. }).join('');
  105. }
  106. }
  107. }
  108. $("#tblgetemployeenewregimedetailsBody").html(html);
  109. });
  110. });
  111. }
  112. static Instance() {
  113. if (this.instance === undefined) {
  114. this.instance = new EmployeeNewRegimeDetails();
  115. }
  116. return this.instance;
  117. }
  118. }
  119. EmployeeRegime.EmployeeNewRegimeDetails = EmployeeNewRegimeDetails;
  120. })(EmployeeRegime = Controls.EmployeeRegime || (Controls.EmployeeRegime = {}));
  121. })(Controls = Payroll.Controls || (Payroll.Controls = {}));
  122. })(Payroll = Hrms.Payroll || (Hrms.Payroll = {}));
  123. })(Hrms = Apps.Hrms || (Apps.Hrms = {}));
  124. })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
  125. })(Bizgaze || (Bizgaze = {}));