public virtual int?GetDefaultLaborItem(PXGraph graph, EPEmployee employee, string earningType, int?projectID) { if (employee == null) { return(null); } int?result = null; if (ProjectDefaultAttribute.IsProject(graph, projectID)) { result = EPContractRate.GetProjectLaborClassID(graph, projectID.Value, employee.BAccountID.Value, earningType); } if (result == null) { result = EPEmployeeClassLaborMatrix.GetLaborClassID(graph, employee.BAccountID, earningType); } if (result == null) { result = employee.LabourItemID; } return(result); }
protected virtual void EPEmployeeContract_RowUpdated(PXCache sender, PXRowUpdatedEventArgs e) { EPEmployeeContract oldRow = (EPEmployeeContract)e.OldRow; EPEmployeeContract newRow = (EPEmployeeContract)e.Row; if (oldRow == null) { return; } EPContractRate.UpdateKeyFields(this, oldRow.ContractID, oldRow.EmployeeID, newRow.ContractID, newRow.EmployeeID); }