Additional salary incorrect value

I have a small issue with process payroll entry

If I have a two salary component one as a statistical component and other for calculates the value by time the other component by 4

It is working well but if I have a More than one additional salary for statistical component, all it appears on salary slip but the value component only consider one additional salary for that component and ignore the other and results in an incorrect value

The reason that it’s more than one additional salary because I run a custom app to calculate the penalties on late entry for employees every day they late

Any one fase an issue like that and can I solve it by adding function in formula section in salary component