Job Adjustment - Invalid Labor Type Error

An employee has been charging time to the wrong job so we are trying to move the labor and burden costs to the correct job using Job Adjustments. However, we’re getting an “Invalid Labor Type” error. Does anyone know why it won’t let us adjust the setup hours and how to fix it?

Yes, likely your job has no operation for setup time. Try to set is a Prod time and also select the time type in your list selection.

Thanks Juan, unfortunately that didn’t work, still got the same error…

Could you provide the detail under that error window you are getting?

Business Layer Exception

Invalid Labor Type.

Exception caught in: Epicor.ServiceModel

Error Detail 
============
Description:  Invalid Labor Type.
Program:  Erp.Services.BO.JobAdjustment.dll
Method:  validateProject
Line Number:  3670
Column Number:  17
Table:  LaborDtl
Field:  LaborType
Server Trace Stack:     at Erp.Services.BO.JobAdjustmentSvc.validateProject(JobHeadProjectFields jobHeadWithProjectFields) in c:\_Releases\ERP\RL10.2.100.0\Source\Server\Services\BO\JobAdjustment\JobAdjustment.cs:line 3670
   at Erp.Services.BO.JobAdjustmentSvc.CommitLaborAdj(JobAdjustmentTableset& ds) in c:\_Releases\ERP\RL10.2.100.0\Source\Server\Services\BO\JobAdjustment\JobAdjustment.cs:line 1155
   at Erp.Services.BO.JobAdjustmentSvcFacade.CommitLaborAdj(JobAdjustmentTableset& ds) in c:\_Releases\ERP\RL10.2.100.0\Source\Server\Services\BO\JobAdjustment\JobAdjustmentSvcFacade.cs:line 736
   at SyncInvokeCommitLaborAdj(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at Epicor.Hosting.OperationBoundInvoker.InnerInvoke(Object instance, Func`2 func) in C:\_Releases\ICE\ICE3.2.100.32\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 59
   at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func`2 func) in C:\_Releases\ICE\ICE3.2.100.32\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 28
   at Epicor.Hosting.Wcf.EpiOperationInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) in C:\_Releases\ICE\ICE3.2.100.32\Source\Framework\Epicor.System\Hosting\Wcf\EpiOperationInvoker.cs:line 23
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
   at System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)
   at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)
   at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result)
   at System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(IAsyncResult result)
   at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
   at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
   at System.ServiceModel.Channels.SecurityChannelListener`1.ReceiveItemAndVerifySecurityAsyncResult`2.InnerTryReceiveCompletedCallback(IAsyncResult result)
   at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
   at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
   at System.ServiceModel.Channels.TransportDuplexSessionChannel.TryReceiveAsyncResult.OnReceive(IAsyncResult result)
   at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
   at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
   at System.ServiceModel.Channels.SynchronizedMessageSource.ReceiveAsyncResult.OnReceiveComplete(Object state)
   at System.ServiceModel.Channels.SessionConnectionReader.OnAsyncReadComplete(Object state)
   at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
   at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
   at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
   at System.Net.Security.NegotiateStream.ProcessFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.NegotiateStream.ReadCallback(AsyncProtocolRequest asyncRequest)
   at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result)
   at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes)
   at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult)
   at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
   at System.ServiceModel.Channels.ConnectionStream.IOAsyncResult.OnAsyncIOComplete(Object state)
   at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e)
   at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(SocketError socketError, Int32 bytesTransferred, SocketFlags flags)
   at System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
Client Stack Trace 
==================
   at Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets)
   at Erp.Proxy.BO.JobAdjustmentImpl.CommitLaborAdj(JobAdjustmentDataSet ds)
   at Erp.Adapters.JobAdjustmentAdapter.CommitLaborAdj(JobAdjustmentDataSet ds)
   at Erp.UI.App.JobAdjustmentEntry.Transaction.Update(String which)

It looks like if the LaborDtl Labor Type is not “P” (Production) AND the JobHead Job Type is “PRJ” (Project) or “SRV” (Service) then it throws this error

Hi Gage, thanks for your response. The JobHed.JobType is “MFG” so it shouldn’t throw the error based on what you said.

image

Huh. I hoped it would be more open and shut. The decompilation shows:

		if (!ttJALaborDtl.LaborType.Equals("P", StringComparison.OrdinalIgnoreCase) && (jobHeadWithProjectFields.JobType.Equals("PRJ", StringComparison.OrdinalIgnoreCase) || jobHeadWithProjectFields.JobType.Equals("SRV", StringComparison.OrdinalIgnoreCase)))
		{
			throw new BLException(Strings.InvalidLaborType, "LaborDtl", "LaborType");
		}

where that exception is sending the message “Invalid Labor Type.”. Perhaps they have changed logic on it between our versions, I don’t know.

1 Like

Submitted a case to Epicor and they provided me with two fixes

1 Like

could you state what is the fix ?

1 Like