Hi all,
I am really at a loss here, and I was hoping maybe someone here might be able to provide some insight.
Anyways, we use a custom in-house application that was written by a fellow employee. This application will loop through all ‘lower level jobs’ (Make to Job- Jobs) in a project, and if the JobHead.JobComplete =False, it will create a new labor dtl transaction and complete the operation. The next step it will perform is if the JobProd.ReceivedQty = 0, it will issue a job to job receipt using ReceiveMfgPartToJob, and lastly, the application will set the JobClosingDataSet.JobClosing.JobComplete = True, set the date, and the CompleteQty = ProdQty, and then close the job.
The problem we are having, is once in a blue moon, technically 5 out of 1024 so far this year, of the MFG-WIP Job To Job Receipts, will actually be missing its corresponding WIP-MFG Issue transaction on the recipient Job Material.
Basically the system thinks it has fulfilled its demand, and transferred the job costs, etc… but the recipient job never got the material issued to it…
Here is a snippet of the Job Receipt Sub-Routine:
Private Sub Testthis(ByVal Job As String) '' Move Parts to Inventory
'
Dim mp As Boolean
Dim RMsg As String
Dim PrtTrnsPKs As String
Dim Vx As Integer = 0
Dim MsgInt As Integer
'
Try
Using V_EpicorSession As New Epicor.Mfg.Core.Session(V_Username, V_Password, V_ServerName)
RFMConnection = New Epicor.Mfg.BO.ReceiptsFromMfg(V_EpicorSession.ConnectionPool)
RFMDataSet.Clear()
RFMConnection.GetNewReceiptsFromMfgJobAsm(Job, 0, "MFG-WIP", RFMDataSet)
With RFMDataSet.PartTran(0)
.TranDate = Mydate
.ActTranQty = .QtyCompleted
.IssuedComplete = True
End With
'
RFMConnection.OnChangeActTranQty(RFMDataSet, RMsg)
RFMConnection.PreUpdate(RFMDataSet, mp)
RFMConnection.VerifySerialMatch(RFMDataSet, RMsg, MsgInt)
RFMConnection.ReceiveMfgPartToJob(RFMDataSet, 0.0, False, True, RMsg, PrtTrnsPKs, "RcptToJobEntry")
'
End Using
'
Catch ex As Epicor.Mfg.Common.BusinessObjectException
MessageBox.Show("Epicor Error:" & vbCrLf &
"Field: " & ex.BusinessObjectMessages(0).Field & vbCrLf &
"Type: " & ex.BusinessObjectMessages(0).Type & vbCrLf &
"Message: " & ex.BusinessObjectMessages(0).Message & vbCrLf &
"Method: " & ex.BusinessObjectMessages(0).Method & vbCrLf &
"Program: " & ex.BusinessObjectMessages(0).Program & vbCrLf &
"Rowid: " & ex.BusinessObjectMessages(0).Rowid & vbCrLf &
"Table: " & ex.BusinessObjectMessages(0).Table & vbCrLf & vbCrLf &
"Error Detail: " & vbCrLf & ex.StackTrace)
End Try
'
RFMDataSet.Clear()
RFMDataSet.Dispose()
'
End Sub
The weird thing is, one of the anomalies occurred on 09/30/2019. Our Epicor Test was updated from Live on 09/27/2019. Now I checked Epicor Live to ensure that there were no other PartTrans or Labor Trans on all the jobs within that particular project between 09/27 and 09/30… and there weren’t. Thus the copy of Epicor Test’s jobs for that particular Project should be the same as they were when we originally ran the ‘Job Issue and Closing’ program. So I tried running the program again on that Project within Epicor Test, but this time, the anomaly didn’t happen.
Does anyone have any thoughts on why these anomaly/discrepancies occur?