Leave Policies

Home Forums HRM Leave Policies

Viewing 5 reply threads
  • Author
    Posts
    • #4978
      oliveira
      Participant

      Hello,

      A need someone to explain me why this subject its happening here.

      I define the Leave Policies in the Leave Policies menu. Then i go to the Leave Entitlements and define to each user their leave policie. Everything goes ok.
      After a while i cannot tell the time if i go to the employee every policies are available to him.

      How this is possible. they appear in the Leave Entitlements all by them self.

      Regards

    • #5008
      Shawon Chowdhury
      Moderator

      @Oliveira,

      There might be something wrong on leave policy section. Let me make it clear to you πŸ™‚
      Did you check these options “All Departments” and “All Designations” while adding a leave policy?
      If you checked these options, then you can assign this policy to any employee or to any department you want.

      But, somehow all the employees/departments/designations are assigned to all the leave policies. You can have the check leave entitlements again.
      ** Can you make sure that you did not check “assign to multiple employees”?

      Hope this was helpful. Let me know update πŸ™‚

    • #6658
      ishubham
      Participant

      Hi,

      Sorry to add to this thread, but my problem is similar to him.
      I have created a Maternity Leave policy for only female employees.
      But it is seen under male employees’ job section too.
      Male employees can’t avail those, but still it’s visible in their leave tab.

    • #6660
      ishubham
      Participant

      Hi,

      I solved the problem by editing tab-leave.php in \modules\hrm\views\employee
      After definition of array of policies, I put this code: (on line 4)
      Code is very sloppy I think, but it will get the job done!
      Please let me know if there’s improved way of achieving this.

      if($employee->gender == 'male') {
      $policies = array_filter(
      $policies,
      function($pol) {
      return $pol->gender == 'male' || $pol->gender == -1;
      }
      );
      } else if($employee->gender == 'female') {
      $policies = array_filter(
      $policies,
      function($pol) {
      return $pol->gender == 'female' || $pol->gender == -1;
      }
      );
      } else {
      $policies = array_filter(
      $policies,
      function($pol) {
      return $pol->gender == 'other' || $pol->gender == -1;
      }
      );
      }
      </code

    • #6709
      Shawon Chowdhury
      Moderator

      @ishubham,
      The code is great and it will definitely solve your need.
      And we are also going to remove all the policies that are not valid for an employee in next release update. We’ll do that in some different way though. But your’s one is good enough too.

      Thanks to all πŸ™‚

    • #6711
      ishubham
      Participant

      @Shawon That’s great. Will look into your way of doing it once the update is released.:)

Viewing 5 reply threads
  • The forum ‘HRM’ is closed to new topics and replies.

Contact Us

Reach out to us for any inquiry

You must enter full name
You must enter email
You must enter message

We received your query

We will reply to you very soon :)