In Shop Floor Control, the payroll statistics form cuts off at 8 characters - chopping off the end if the time is over 99 hours or if it is negative hours. AX 2009.
Example:
Person A has 15 hours of PTO. "Ending balance" field displays correctly:
15:00:00
Person B has 120 hours of PTO. "Ending balance" field displays:
120:00:0
Person C just took 40 hours of PTO. "Change" field displays:
-40:00:0
I have lengthened the field. I have added a new extended data type longer than 8 characters. (and, yes, recompiled and even restarted the service several times since then). I've looked at the class (jmgProfileSeconds). No changes have been made to any part of this class ever. I understand that time itself is literally 8 characters (it's never "123" o'clock), and I know that's where the problem is, but I can't get further than that.
Arrrgghhh. Any thoughts?
Pretty sure the issue is here, as that's where the colons are added to make the time be understandable (adding the colons), but I'm kind of stuck.
static JmgTimeString formattedSeconds(JmgSeconds timeSec, JmgSecondPresentation _presentation = -1)
{
JmgSecondPresentation presentation;
JmgTimeString ret;
presentation = _presentation;
if (prmisdefault(_presentation))
presentation = JmgParameters::find().SecondPresentation;
if (presentation == JmgSecondPresentationEnum::Seconds)
return num2str(timeSec,1,0,0,0);
if (presentation == JmgSecondPresentationEnum::Minuts)
return num2str(timeSec/60,1,0,0,0);
if (presentation == JmgSecondPresentationEnum::Clocktime)
{
if (timeSec < 0)
{
ret = '-';
timeSec = timeSec * -1;
ret += num2Str0( (timeSec div (#ProfTestSec/24)),1,0,0,0) +':' ;
}
else
{
ret += num2Str0( (timeSec div (#ProfTestSec/24)),2,0,0,0) +':';
}
ret += num2Str0( (timeSec mod (#ProfTestSec/24))div 60,2,0,0,0) +':'+
num2Str0( (timeSec mod (#ProfTestSec/24))mod 60,2,0,0,0);
return ret;
}
if (presentation == JmgSecondPresentationEnum::Centitime)
return num2Str0(decround((timeSec/(#ProfTestSec/24)),2),5,2,0,0);
return '';
}