Payroll Formula - Get Sick Balances from Sage HRMS onto Sage 300 Payroll Check Stub

Hi,

Looking for some help with a payroll formula and would greatly appreciate any input. We are trying to simplify our process for getting sick balances from Sage HRMS onto check stubs. We do not maintain accruals in Sage 300, only in Sage HRMS. Here's the general road map we are trying to follow:

1. Export sick balances from Sage HRMS into a custom field in each employees Sage 300 payroll master file. This gets us the beginning sick balance not including the current weeks payroll.

2. Use the below formula to take the sick balance from each employees custom field and subtract any sick hours that are being paid in the the current weeks new file. This will generate an up to date sick balance that will post on the employees pay stub. Note our Pay ID for sick time taken is 11.

LOOKUP(Sick Balance (PR Custom Fields), Employee (PR Check)) - SUM(LOOKUP(Units (PR Check Pay), Employee (PR Check), Period End Date (PR Check), Check Sequence (PR Check, "11"))

Issue: The formula works and we get the correct balance on the paystub if the employee has only one check but if there are multiple check sequences in a week the formula breaks down. In instances where there are multiple checks (up to 3 in a week max) we are looking for the same balance to appear on all stubs which would be the amount from the custom field less all sick time paid on each of the check sequences. We are trying to alter the formula to work when there are multiple check sequences in a week and appreciate any input!

Thank you!

Jeff