Greeting everyone
I want to know the total monthly salary of the employee who receives it during a specific period, regardless of the positions in which he worked
so i faced problem when i used this code if employee has been already expired
it's give me 0 even if he was have position between that date (SelectedDate)
select sum (PayRate) from hRMCompFixedEmpl where hRMCompFixedEmpl.Worker==hcmWorker.RecId && (hRMCompFixedEmpl.ValidFrom <= SelectedDate && hRMCompFixedEmpl.ValidTo >= SelectedDate )
and alsoe i try this code
it's give me total (PayRate) even if date out of range of my (SelectedDate)
but i need only total (PayRate) when (SelectedDate) still in range of (hRMCompFixedEmpl.ValidFrom & hRMCompFixedEmpl.ValidTo)
dateStart=SelectedDate;
dateEND=SelectedDate;
select validTimeState(dateStart, dateEND) sum(PayRate) from hRMCompFixedEmpl
where hRMCompFixedEmpl.Worker==hcmWorker.RecId;