E9.2 Payroll - A day is not paid when, The date on which the employee was originally hired by the company coincides with the payroll payment cycle

sotocast_90

Member
If the employee entered on the payroll payment cycle date and is not being paid on the corresponding days, he or she is being paid one less day. Example My configuration:
F060116
Original Hire Date (DSI): 01/04/2024;
Date Pay Starts ( PSDT): 01/04/2024;
Start date (DST): 01/04/2024
F07210
EFTB: 01/04/2024
EFTE:04/15/2024
CKDT: 04/15/2024
ADT: 04/15/2024
PED: 04/15/2024

It happened after moving to EnterpriseOne Tools Release: 9.2.4.1
 
We ran into this issue early in 2022. I submitted a CR. This is what I had sent to them. In one of their updates that had mistakenly disabled a line of code screwing it all up see below. We found it was only an issue with salaried employees.

We have a salaried employee that started on 4/1/2022. Pay period dates are 4/1/2022 to 4/15/2022. During the auto pay generation process it incorrectly determines that this employee's salary needs to be prorated, showing he only worked 14 out of the 15 days in the pay period. It applies a factor of .933333 to the salary. This employee should have received his full salary.

Code snippet from B0700027, function IB0700027_F06116AutoPayGenerationFunction_AddUpdatePayPeriodSliceCache
if (lpDS->cProrateAutoPay == _J('1'))
{
/* Determine whether Date Pay Starts is within Pay Period. If so, prorate Salary Amount */
lDays1 = DateDifference(&lpDS->jdPayrollBeginningDate, &lpdsControl->dsMultipleJobsCache.jdJobStartDate);
/*31485364 - Made condition to be ">=" from just ">" to include the start date on PPED*/
if (lDays1 >= 0)
{
/* Date Pay Starts is > Payroll Beginning Date. Prorate Salary */
nDaysWorkedInPayPeriod = DateDifference(&lpdsControl->dsMultipleJobsCache.jdJobStartDate, &lpDS->jdPayrollEndingDate);
/*31485364 Due to code moved out of IF scope this is not needed -
nDaysWorkedInPayPeriod += 1; */ /* Add 1 Day */
IntToMathNumeric(nDaysWorkedInPayPeriod, &lpdsControl->jdDaysWorkedInPayPeriod);
/* Calculate Factor = Days Worked/Total Days in Pay Period */
MathDivide(&mnFactor, &mnRemainder, &lpdsControl->jdDaysWorkedInPayPeriod, &lpdsControl->jdSavedTotalDaysPayPeriod, &nDecimals, &nRoundFlag);


This line was improperly disabled.
nDaysWorkedInPayPeriod += 1;

The date difference always returns the difference in days between 2 dates. To calculate number of days in a date range you need to always add one to it to get total days in the range. Due to this issue every employee that has the salary prorated will be shorted one day of pay.


Look up bug 34077246. There is an ESU to fix it. Or you can fix it yourself. My client opted to wait for the fix because they hated modifying standard code.
 
Thanks for the help, we will make the changes to B0700027 in the indicated function IB0700027_F06116AutoPayGenerationFunction_AddUpdatePayPeriodSliceCache:

if (lpDS->cProrateAutoPay == _J('1')){
/* Determine whether Date Pay Starts is within Pay Period. If so, prorate Salary Amount */
lDays1 = DateDifference(&lpDS->jdPayrollBeginningDate, &lpdsControl->dsMultipleJobsCache.jdJobStartDate);
if (lDays1 >= 0){
/* Date Pay Starts is > Payroll Beginning Date. Prorate Salary */
nDaysWorkedInPayPeriod = DateDifference(&lpdsControl->dsMultipleJobsCache.jdJobStartDate, &lpDS->jdPayrollEndingDate);
nDaysWorkedInPayPeriod += 1; /* Add 1 Day */
IntToMathNumeric(nDaysWorkedInPayPeriod, &lpdsControl->jdDaysWorkedInPayPeriod);
/* Calculate Factor = Days Worked/Total Days in Pay Period */
MathDivide(&mnFactor, &mnRemainder, &lpdsControl->jdDaysWorkedInPayPeriod, &lpdsControl->jdSavedTotalDaysPayPeriod, &nDecimals, &nRoundFlag);
MathMultiply(&dsPayPeriodSliceCache.mnAutoPayTotalGross, &dsPayPeriodSliceCache.mnAutoPayTotalGross, &mnFactor);
MathRound(&dsPayPeriodSliceCache.mnAutoPayTotalGross, &dsPayPeriodSliceCache.mnAutoPayTotalGross, &nRoundDecimals);
/* SAR 8559511 - Since the payment start date is after the pay period start date, redefine the pay period
start date, so the correct date effective instructions are retrieved and the timecard from date is correct. */
lpDS->jdPayrollBeginningDate = lpdsControl->dsMultipleJobsCache.jdJobStartDate;
dsPayPeriodSliceCache.jdTimecardFromDate = lpDS->jdPayrollBeginningDate;
/* SAR 8559511 End */
}
...
 
Decided to look at the code change that we applied from Oracle's ESU. Looks like there is a couple of places where they reverted code back to how it was on the Add 1 Day Line and also the IF statement that occurs before it. Look at the comments and the code marked with 34077246.

if (lpDS->cProrateAutoPay == _J('1'))
{
/* Determine whether Date Pay Starts is within Pay Period. If so, prorate Salary Amount */
lDays1 = DateDifference(&lpDS->jdPayrollBeginningDate, &lpdsControl->dsMultipleJobsCache.jdJobStartDate);
/*31485364 - Made condition to be ">=" from just ">" to include the start date on PPED*/
/*34077246 Reverted 31485364 fix ,made condition from ">=" to ">"*/
if (lDays1 > 0)
{
/* Date Pay Starts is > Payroll Beginning Date. Prorate Salary */
nDaysWorkedInPayPeriod = DateDifference(&lpdsControl->dsMultipleJobsCache.jdJobStartDate, &lpDS->jdPayrollEndingDate);
/*31485364 Due to code moved out of IF scope this is not needed - */
/*34077246 Reverted 31485364 fix ,uncomment below line*/
nDaysWorkedInPayPeriod += 1; /* Add 1 Day */
IntToMathNumeric(nDaysWorkedInPayPeriod, &lpdsControl->jdDaysWorkedInPayPeriod);
/* Calculate Factor = Days Worked/Total Days in Pay Period */
MathDivide(&mnFactor, &mnRemainder, &lpdsControl->jdDaysWorkedInPayPeriod, &lpdsControl->jdSavedTotalDaysPayPeriod, &nDecimals, &nRoundFlag);
MathMultiply(&dsPayPeriodSliceCache.mnAutoPayTotalGross, &dsPayPeriodSliceCache.mnAutoPayTotalGross, &mnFactor);
MathRound(&dsPayPeriodSliceCache.mnAutoPayTotalGross, &dsPayPeriodSliceCache.mnAutoPayTotalGross, &nRoundDecimals);

/* SAR 8559511 - Since the payment start date is after the pay period start date, redefine the pay period
start date, so the correct date effective instructions are retrieved and the timecard from date is correct. */
lpDS->jdPayrollBeginningDate = lpdsControl->dsMultipleJobsCache.jdJobStartDate;
dsPayPeriodSliceCache.jdTimecardFromDate = lpDS->jdPayrollBeginningDate;
/* SAR 8559511 End */
}

/* SAR# 7888137 - Determine whether Date Pay Stops is within Pay Period. If so, prorate Salary Amount */
/*31485364 - For some reason the null date started working unexpectedly in date difference function in Aug 2020.
So additional check made*/
if (!(IsJDEDATENull(&lpdsControl->dsMultipleJobsCache.jdJobEndDate)))
{
lDays2 = DateDifference(&lpdsControl->dsMultipleJobsCache.jdJobEndDate, &lpDS->jdPayrollEndingDate);
/*34077246 Reverted 31485364 fix ,made condition from ">=" to ">"*/
if (lDays2 > 0) /*31485364 - made > to >= to include pay stop on the pay period start date*/
{
/* SAR 8559511 - Since the payment end date is before the pay period end date, redefine the pay period end
date, so the correct date effective instructions are retrieved and the timecard thru date is correct. */
lpDS->jdPayrollEndingDate = lpdsControl->dsMultipleJobsCache.jdJobEndDate;
dsPayPeriodSliceCache.jdTimecardThruDate = lpDS->jdPayrollEndingDate;
/* SAR 8559511 End */
/* Date Pay Stops is < Payroll Ending Date. Prorate Salary */
nDaysWorkedInPayPeriod = DateDifference(&lpDS->jdPayrollBeginningDate, &lpDS->jdPayrollEndingDate);
nDaysWorkedInPayPeriod += 1; /* Add 1 Day */
IntToMathNumeric(nDaysWorkedInPayPeriod, &lpdsControl->jdDaysWorkedInPayPeriod);
/* Calculate Factor = Days Worked/Total Days in Pay Period */
MathDivide(&mnFactor, &mnRemainder, &lpdsControl->jdDaysWorkedInPayPeriod, &lpdsControl->jdSavedTotalDaysPayPeriod, &nDecimals, &nRoundFlag);
MathMultiply(&dsPayPeriodSliceCache.mnAutoPayTotalGross, &dsPayPeriodSliceCache.mnAutoPayTotalGross, &mnFactor);
 
Thanks for your response, the decision was made to apply the patches related to bug #34077246. But now it gives another error to employees who enter within the range of payroll not paid correctly.
Example:
F060116
Original Hire Date (DSI): 05/04/2024;
Date Pay Starts ( PSDT): 05/04/2024;
Start date (DST): 05/04/2024
F07210
EFTB: 01/04/2024
EFTE:04/15/2024
CKDT: 04/15/2024
ADT: 04/15/2024
PED: 04/15/2024

Is it necessary to deploy the full package?
 
I suggest checking why the begin and end dates in the F07210 Pay Cycle Parameters table appear to be using different date formats. It looks like the EFTE is in an international date format, while the other dates are in the USA date format.
 
Sorry, it was my mistake in posting. Dates are in dd/mm/yyyy format in all tables
 
Back
Top