DaySalaryFixedPayment
Back to ListDescription: Calculate day-salary for an emplyee with fixed salary.
FileMaker Prototype:
Set Variable [$res; ACF_Run("DaySalaryFixedPayment"; date_fromDate; date_toDate; float_PeriodSalary; bool_saturdays)]
Category: FINANCE
Dependencies
- BusinessDays: Calculate the number of business days between two dates.
Function source:
function DaySalaryFixedPayment ( date fromDate, date toDate, float PeriodSalary, bool saturdays )
int days = BusinessDays ( fromDate, toDate, saturdays);
float daySalary = round(PeriodSalary/days, 2);
return daySalary;
end
The DaySalaryFixedPayment function calculates the daily salary rate for an employee with a fixed monthly salary. This can be used to calculate salary adjustments when an employee has taken unpaid days off during a pay period. Taking unpaid leave (such as bridging days) in a month with many holidays means that the daily rate deducted from the salary will be higher than if the same number of unpaid days were taken in a period with a higher count of regular working days.
Debendencies
- BusinessDays (and its dependencies, all found in the library)
Example
Set Variable [$daySalary; ACF_Run("DaySalaryFixedPayment"; "01/03/2024"; "31/03/2024"; 4000; false)]
Gives day-salary of 210,53 (The easter counts many days)
Set Variable [$daySalary; ACF_Run("DaySalaryFixedPayment"; "01/01/2024"; "31/01/2024"; 4000; false)]
Gives day-salary of 181,81 (Regular month)
