Odoo 14 Human Resource Management | All About Odoo Human Resource Module

Поділитися
Вставка
  • Опубліковано 18 вер 2024

КОМЕНТАРІ • 2

  • @fahmidayeasmin4067
    @fahmidayeasmin4067 2 роки тому

    Hello, I want to calculate payslip based on the contract starting date. An employee has joined from the 8th day (8 April 2022) of the month. Another employee has resigned on the (21st day 21 April 2022) of the month. I needed to calculate from the starting days and ending days.
    I am using Odoo 14 community edition. Please suggest a salary rule for this problem.

    • @cybrosys-technologies
      @cybrosys-technologies  2 роки тому

      For those employee who joined/resigned in mid of any month, their payroll has to be calculated separately.
      If the employee who joined by April 8th, payroll period has to be set, for start date as 8th April and end date for April 30th.
      So while calculating payroll it will count those days between the start date and end date. Rule for basic can set as follows:
      delta = payslip.date_to - payslip.date_from
      result = (contract.wage/30) * (delta.days + 1)
      Also for employee who resign by April 21st the start date and end date should given as April 1st and April 21st respectively. So using the above rule itself, basic of the employee cab be calculated by counting days. The first rule will count difference between to and from date we provided the salary slip and (delta.days + 1) will provide the number of days between those dates. Thus the result will be daily wage multiplied by the number of days.