Understood the requirement configure it and written a formula to calculate Total Salary (Help Me)

its a great headache since the start of this month please help me to implement this requirement . a Bakery manufacturer pays his employee with optional Holidays let say he pay Some employees basic Salary= 26000 ,Holidays Allowed 2 .if he comes on Holidays the he will pay him a per day extra(26000/30=866.66) . So if he come All 30 Days he will pay him Total salary =26000+(866.66*2) =27733
so if he not come he will deduct days according to absent .
in setting i include holiday in working day check with mark attendance on holiday dependent check.
then i made a Salary component with uncheck depends on payment days empty other fields then i attach it with a salary structure and write this formula in it
(base *1) * ( 30 - absent days ) and the i did Assignment and give per Day
27733/30 =924 in Assignment Base Filed
But it sometimes give different results
can i achive this with some other way??? i am really feeling pain please help me

Can you please explain the case in which it is giving different results, and what results is it giving?

Thank you @ejaaz first of all now its working perfectly just removed uncheck Mark attendance on holiday .again thanks for your reply and to have your your attention and time .