|
![]() |
#1 |
Administrator
|
AX2012 R3 CU12 (6.3.5000.133)
(встречается начиная с AX2012 R3 RTM) \Data Dictionary\Tables\WHSWorkTable\Methods\lockUnlockWork X++: public static void lockUnlockWork(WHSWorkId _workId, WHSUserId _userId) { WHSWorkLine workLine; WHSDimTracking dimTracking; ... #localmacro.WorkLineFieldsToResetStatus WorkStatus = WHSWorkStatus::Open, UserId = '', WorkInProcessUTCDateTime = utcDateTimeNull(), AskForNewLicensePlate = NoYes::No #endmacro #localmacro.WorkLineStatusInProcessButNotStarted workLine.WorkId == _workId && workLine.WorkStatus == WHSWorkStatus::InProcess && workLine.QtyWork == workLine.QtyRemain #endmacro ... // If we already have some work finished, we only reset the InProcess work lines, // where no actual work has been performed so far update_recordset workLine setting #WorkLineFieldsToResetStatus where #WorkLineStatusInProcessButNotStarted; if (workTable.isWorkTransTypeOutbound()) { delete_from dimTracking exists join workLine where #WorkLineStatusInProcessButNotStarted && dimTracking.WorkId == workLine.WorkId && dimTracking.LineNum == workLine.LineNum && dimTracking.Processed == NoYes::No; } ... } Программиста явно подвело чрезмерное увлечение макросами. Если макросы развернуть, ошибка становится очевидной: X++: update_recordset workLine setting WorkStatus = WHSWorkStatus::Open, // <-- (1) UserId = '', WorkInProcessUTCDateTime = utcDateTimeNull(), AskForNewLicensePlate = NoYes::No where workLine.WorkId == _workId && workLine.WorkStatus == WHSWorkStatus::InProcess // <-- (2) && workLine.QtyWork == workLine.QtyRemain; if (workTable.isWorkTransTypeOutbound()) { delete_from dimTracking exists join workLine where workLine.WorkId == _workId && workLine.WorkStatus == WHSWorkStatus::InProcess // <-- (3) && workLine.QtyWork == workLine.QtyRemain && dimTracking.WorkId == workLine.WorkId && dimTracking.LineNum == workLine.LineNum && dimTracking.Processed == NoYes::No; }
__________________
Not registered yet? Register here! Have comments, questions, suggestions or anything else regarding our web site? Don't hesitate, send them to me |
|
|
За это сообщение автора поблагодарили: mazzy (2), kashperuk (5), gl00mie (3). |