submitEmployeeEarnings Method

Table of Contents

  1. Function
  2. Syntax
  3. Parameters
  4. Return Value
  5. Sample Code
  6. Remarks
  7. Possible Errors
  8. Related Methods

Function

  • Accepts an array

Syntax

  • String = AeXMLBridge.submitEmployeeEarnings(IDNum, PayPeriodStartDate, PayPeriodEndDate, AePayrollEarningsAry);

Parameters

  • String - employee ID
  • String - pay period start date (yyyy-mm-dd format)
  • String - pay period end date (yyyy-mm-dd format)
  • Structure array - TAePayrollEarning structures

Return Value

  • Returns a string

Sample Code C

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
TAePayrollEarning[] earnings = new TAePayrollEarning[1];
TAePayrollEarning earning = new TAePayrollEarning();

string empID = "1234"; // working with employee with ID 1234
string payPeriodStartDate = ws.dateRangeEnumStartDate(TDateRangeEnum.drPrevPeriod); // set begin and end dates for previous period
string payPeriodEndDate = ws.dateRangeEnumEndDate(TDateRangeEnum.drPrevPeriod);

earning.EarningsCode = "1";
earning.Dollars = 1000.00d;
earning.EmpID = empID;
earning.Hours = 40.0d;
earning.Rate = earning.Dollars / earning.Hours;
earning.PayPeriodStartDate = payPeriodStartDate;
earning.PayPeriodEndDate = payPeriodEndDate;
earnings[0] = earning;

try
{
string rslt = ws.submitEmployeeEarnings(empID, payPeriodStartDate, payPeriodEndDate, earnings);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

Sample Code VB.Net

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Dim earnings As TAePayrollEarning() = New TAePayrollEarning(0)
Dim earning As New TAePayrollEarning()

Dim empID As String = "1234"
' working with employee with ID 1234

Dim payPeriodStartDate As String = ws.dateRangeEnumStartDate(TDateRangeEnum.drPrevPeriod)
' set begin and end dates for previous period
Dim payPeriodEndDate As String = ws.dateRangeEnumEndDate(TDateRangeEnum.drPrevPeriod)

earning.EarningsCode = "1"
earning.Dollars = 1000.0
earning.EmpID = empID
earning.Hours = 40.0
earning.Rate = earning.Dollars / earning.Hours
earning.PayPeriodStartDate = payPeriodStartDate
earning.PayPeriodEndDate = payPeriodEndDate
earnings(0) = earning

Try
Dim rslt As String = ws.submitEmployeeEarnings(empID, payPeriodStartDate, payPeriodEndDate, earnings)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Remarks

  • Latest permitted historical hours editing date (PPACA Properties within Service Module) needs to be later than the pay period end date parameter

Possible Errors

  • List errors

changeEmployeeACAFullTimeStatus
closeEmployeeMeasurementPeriod
restartEmployeeACAPeriods
reverseClosedEmployeeMeasurementPeriod
revertEmployeeACAAssignments
setEmployeeACA
submitPayrollEmployees

Back to Top