I want to calculate payslip batch where I take the end date of the contract and if the contract is finished then I calculate the payslip based on the final date of the contract, at this time if I calculate a payslip bacth for example from 1/11/18 to 11/30/18 and the employee's contract ended on 11/15/18 the payslip calculates it all month instead of calculating it until the end date of hes contract
same thing happens when I just hired someone instead of taking the start date of the contract it takes the payslip bacth dates. so if I hire someone on 15/11/18 but the payslip batch date is from 1/11/18 to 30/11/18 it will make as if the employee started working on the 1/11/18 and will pay the entire salary
Help please.