An active Legal Number Sequence is not available for the Transaction date

I have no idea why epicor can’t generate legal number when i call a api Erp.Services.BO.InvTransferSvc.CommitTransfer. Below is the the call stack for my code. I have already created 2023/4/1 - 2024/3/31 fiscal calendar.

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
Business Logic Error
Business Layer Exception
BLException
Description: An active Legal Number Sequence is not available for the Transaction date.
Program: Erp.Internal.Lib.LegalNumberLib.dll
Method: GenerateLegalNumber
Line Number: 578
Column Number: 29
Table: LegalNumSeq
Server Trace Stack: at Erp.Internal.Lib.LegalNumberGenerate.GenerateLegalNumber(IceRow ttLegalNumGenOptsRow, String inRelatedToFile, String inForeignKey, String& ocLegalNumber, String& ocOCRNumber, String& ocLegalNumberMsg, Boolean bGenerateOCRNumber, Boolean LegalNumbershouldBeGenerated, String CompanyID, Boolean isSEOrFILocalization, Boolean isNorwayLocalization, Func3 GeneratePaymentReference, Boolean isMexicoLocalization, Func4 genSSCC, Boolean isArgentinaLocalization, Func3 ExistsLegalNumSeq, String fileList, Func2 FindFirstLegalNumPrefix, String UserID, XbSyst XbSyst, Func2 FindFirstLegalNumCnfgFullRow, Func2 ExistLegalNumHistory, Func3 ExistLegalNumHistory_LegalNumberID, Func2 FindFirstInvcHeadWithUpdLock, ErpContext Db, Boolean IsShipHead, Func4 GetPacking, SysGeneratedNumberAction28 systemGeneratedNumberAction, GetValidSequenceAction11 GetValidSequence, BuildSystemLegalNumberAction19 BuildSystemLegalNumberFunc, Boolean IsRelatedToFileOnList, Func3 FindFirstLegalNumSeqWithUpdLock, Func2 ExistsInactiveSeq, Int32& LegalNumSequence, Int32& Length, String PlantID, Func2 FindFirstInvcHead_Plant, Func4 FindFirstFiscalYr_StartDate, Func3 getFiscalQuarter) in c:\_Releases\ERP\RL10.2.200.0\Source\Server\Internal\Lib\LegalNumberLib\LegalNumberGenerate\LegalNumberGenerate.cs:line 578 at Erp.Internal.Lib.LegalNumberGenerate.GenerateLegalNumber(IceRow ttLegalNumGenOptsRow, String inRelatedToFile, String inForeignKey, String& ocLegalNumber, String& ocOCRNumber, String& ocLegalNumberMsg, Boolean bGenerateOCRNumber) in c:\_Releases\ERP\RL10.2.200.0\Source\Server\Internal\Lib\LegalNumberLib\LegalNumberGenerate\LegalNumberGenerate.cs:line 359 at Erp.Services.BO.InvTransferSvc.CommitTransfer(InvTransferTableset& ds, String& LegalNumberMessage, String& partTranPKs) in c:\_Releases\ERP\RL10.2.200.0\Source\Server\Services\BO\InvTransfer\InvTransfer.cs:line 1178 at Erp.Services.BO.InvTransferSvcFacade.CommitTransfer(InvTransferTableset& ds, String& LegalNumberMessage, String& partTranPKs) in c:\_Releases\ERP\RL10.2.200.0\Source\Server\Services\BO\InvTransfer\InvTransferSvcFacade.cs:line 281 at Epicor.Customization.Bpm.BO8A3950C15DE44291AF8DBB80BDA8A81A.UpdatePreProcessingDirective_Pre_7_Dotransfer_C031568B631146D0A89797083C74C1AF.A001_CustomCodeAction() at Epicor.Customization.Bpm.BO8A3950C15DE44291AF8DBB80BDA8A81A.UpdatePreProcessingDirective_Pre_7_Dotransfer_C031568B631146D0A89797083C74C1AF.ExecuteCore() at Epicor.Customization.Bpm.DirectiveBase3.Execute(TParam parameters) in C:_Releases\ICE\RL3.2.200.0\Source\Server\Internal\Lib\Epicor.Customization.Bpm\DirectiveBase.Generic.cs:line 147
at Epicor.Customization.Bpm.MethodCustomizationBase23.<>c__DisplayClass20_0.<RunDirectives>b__3(MethodDirectiveBase3 dir) in C:_Releases\ICE\RL3.2.200.0\Source\Server\Internal\Lib\Epicor.Customization.Bpm\MethodCustomizationBase2.cs:line 139
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source, Func2 predicate)
at Epicor.Customization.Bpm.MethodCustomizationBase23.RunDirectives(TParam parameters) in C:\_Releases\ICE\RL3.2.200.0\Source\Server\Internal\Lib\Epicor.Customization.Bpm\MethodCustomizationBase2.cs:line 141 at Epicor.Customization.Bpm.CustomizationBase23.Execute(TParam parameters) in C:_Releases\ICE\RL3.2.200.0\Source\Server\Internal\Lib\Epicor.Customization.Bpm\CustomizationBase2.cs:line 73
at Epicor.Customization.Bpm.BO8A3950C15DE44291AF8DBB80BDA8A81A.UD05SvcCustomization.Update(UD05Tableset& ds)
at Ice.Services.BO.UD05SvcFacade.Update(UD05Tableset& ds) in C:_Releases\ICE\RL3.2.200.0\Source\Server\Services\BO\UD05\UD05SvcFacade.cs:line 439
at SyncInvokeUpdate(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at Epicor.Hosting.OperationBoundInvoker.InnerInvoke(Object instance, Func2 func) in C:\_Releases\ICE\ICE3.2.200.5\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 59 at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func2 func) in C:_Releases\ICE\ICE3.2.200.5\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.200.5\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.SecurityChannelListener1.ReceiveItemAndVerifySecurityAsyncResult2.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)