AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 19.09.2013, 18:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
emeadaxsupport: Manufacturing Execution in AX 2012: Issue with the "Lock employee"-parameter
Источник: http://blogs.msdn.com/b/axsupport/ar...parameter.aspx
==============

Issue:

When registering time via manufacturing execution/time registration for a job, different time entries (start and end time sum up to 0.01) are calculated on the route card journal when the “Lock employee”-parameter is enabled.



How does the “Lock employee”-parameter work?

The cause behind this issue can be found when looking into how the “Lock employee”-parameter works. Development provided the following full investigation information and concluded that a correction to this is not feasible, as any correction to the current code would make this parameter function in the same way for both options enabled’ and “Disabled”.



It was found that if the parameter “Lock employee” is enabled, then we get the stated issue, whereas if it is disabled, we will get the expected results.



Technical description:



“Lock employee” is disabled

Path: Human Resources

Time and Attendance > Set up > Terminals > Configure registration forms





If “Lock employee” is disabled when we start the jobs/stops, the code will fall into \Classes\JmgRegistrationForm\approveMarked which is called from \Classes\JmgRegistrationForm\beginMarkedJobs i.e

boolean approveMarked(boolean_skipPreApprove = false)

{



-------------------------------------------------------------------

jmgRegistrationSetup = form.getRegistrationSetup();

if
(jmgRegistrationSetup.LockEmployee == NoYes::Yes)

{

commitOk
= localCurrentBundle.makeRegistrations(JmgProfileSeconds::getSysDate(),
JmgProfileSeconds::getSysTime());

}

else

{

commitOk = localCurrentBundle.makeRegistrations();

}

return false;

}



Here, “Lock employee” is disabled so the code will fall into the else part and in here, there is no parameter passed for time. In this case, time and date will be taken from the user start job time/end job time i.e \Classes\JmgJobBundle\makeRegistrations i.e public boolean makeRegistrations(JmgDate _registrationDate = registrationDate, JmgTime _registrationTime = registrationTime)

{


---------------------------------------------------------------------------



registrationDate = _registrationDate;

registrationTime = _registrationTime;



this.checkRegistrationTime();

this.checkPilot();



ret = this.requestStartupInfo();

if (ret)

{

ret = this.requestFeedback(NoYes::Yes);

}



if (ret)

{

try

{


ttsbegin;


showMessage = false;



switch
(bundleType)

{


case JmgJobBundleType::IPC:


this.makeRegistrationsIPC();


break;


case JmgJobBundleType::Prod:


this.makeRegistrationsProd();


break;


case JmgJobBundleType::Proj:


this.makeRegistrationsProj();


break;


--------------------------------------------------------


break;


default:


break;

}


this.postProductionJournals();




this.postTime();


ttscommit;



}

------------------------------------------------------

}



After the code calculates the start/end job time, it will fall into this.makeRegistrationsProd() before it falls into \Classes\JmgJobBundle\postTime which is called from \Classes\JmgJobBundle\makeRegistrations. Subsequently, the code will fall into \Classes\JmgPostStandardSystem\postTime which is called from \Classes\JmgJobBundle\postTime

Finally the start times/end times are correctly updated.



public void postTime()

{


---------------------------------------------------------------------

for (i = 1; i Set up -> Terminals > Configure registration forms





If “Lock employee” is enabled when the jobs/stops are started, the code will fall into \Classes\JmgRegistrationForm\approveMarked which is called from \Classes\JmgRegistrationForm\beginMarkedJobs i.e



boolean approveMarked(boolean _skipPreApprove = false)

{



-------------------------------------------------------------------

jmgRegistrationSetup = form.getRegistrationSetup();

if
(jmgRegistrationSetup.LockEmployee == NoYes::Yes)

{

commitOk = localCurrentBundle.makeRegistrations(JmgProfileSeconds::getSysDate(),
JmgProfileSeconds::getSysTime());

}

else

{

commitOk = localCurrentBundle.makeRegistrations();

}



return false;

}



Here, “Lock employee” is enabled and as per the logic above, the code will fall into the “if” part and there, the parameter JmgProfileSeconds::getSysTime()) is passed so that even when we have a stop job after a time lapse, the system will default to getSysTime() for both the start job time and end job time. After this, the code will continue into \Classes\JmgJobBundle\makeRegistrations i.e



public boolean makeRegistrations(JmgDate _registrationDate = registrationDate, JmgTime _registrationTime = registrationTime)

{

---------------------------------------------------------------------------



registrationDate = _registrationDate;

registrationTime = _registrationTime;



this.checkRegistrationTime();

this.checkPilot();



ret = this.requestStartupInfo();

if (ret)

{

ret = this.requestFeedback(NoYes::Yes);

}



if (ret)

{

try

{


ttsbegin;


showMessage = false;



switch (bundleType)

{


case JmgJobBundleType::IPC:


this.makeRegistrationsIPC();


break;


case JmgJobBundleType::Prod:


this.makeRegistrationsProd();


break;


case JmgJobBundleType::Proj:


this.makeRegistrationsProj();


break;


--------------------------------------------------------


break;


default:


break;

}


this.postProductionJournals();




this.postTime();


ttscommit;



}

------------------------------------------------------

}



The code will then have updated the start/end job time with i.e the system time. Then the code will fall into this.makeRegistrationsProd() before falling into \Classes\JmgJobBundle\postTime which is called from \Classes\JmgJobBundle\makeRegistrations and after, code will fall into \Classes\JmgPostStandardSystem\postTime which is called from \Classes\JmgJobBundle\postTime.

Finally, start time/end times are updated with the same time.



public void postTime()

{


---------------------------------------------------------------------


for (i = 1; i
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
atinkerersnotebook: Walkthrough & Tutorial Summary Blog bot DAX Blogs 1 09.09.2013 09:11
amer-ax: It was a great day! Blog bot DAX Blogs 3 29.12.2012 01:02
emeadaxsupport: "Parameter is missing a value" error running a customized report in Microsoft Dynamics AX 2012 Blog bot DAX Blogs 0 21.11.2012 00:12
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
daxdilip: Whats New in Dynamics AX 2012 (A brief extract from the recently held Tech Conf.) Blog bot DAX Blogs 7 31.01.2011 12:35
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 13:20.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.