Hi, I want to generate the total business days within a given date range(payslip.date_from and payslip.date_to) and use it for calculation of basic salary on payslip. I want to compare total business days(no_of_days) with WORK100.number_of_days(which is manually entered on payslip) and calculate the basic salary(contract.wage)
Below is the logic:
if no_of_days = worked_days.WORK100.number_of_days
result = contract.wage
elif no_of_days> worked_days.WORK100.number_of_days
result = ((contract.wage / 22) * (22 - (no_of_days- actual_days)))
*WHERE "no_of_days" is the total business days within a given date range (payslip.date_from and payslip.date_to)
Thank you in advance