Skip to main content
Solved

Acumatica bug calculating hours from PMActivity.TimeSpent


I am attaching the basic GI I am trying to create which all it is doing is displaying the PMActivity information and then simply converting the PMActivity.TimeSpent from Minutes to Hours by dividing the minutes by 60.  HOWEVER, Acumatica is NOT calculating this correctly, as you can see from the screen shot below.  One of the returned rows calculates 28800 / 60 correctly to 480 hours. But the OTHER two returned rows are NOT calculating correctly at all.  Not even close.  29070 / 60 should = 485.5 hours.  And 31920 / 60 should = 532.  NEITHER of those are even close to Acumatica calculating them to be 421 and 439 hours respectively. 

Is this a major Acumatica bug?  Or is this simply something that Acumatica cannot do, and is there some way to simply have it perform this automatically?

Here is the equation from the attached GI



 

 

7 replies

Userlevel 7
Badge +19

Hi @NetAdmin42  Yes, I’m also observed some issues with the calcualtion. However, instead of calculating, we can use “TimeSpent” field directly right like below

This field is giving us the right value.

 

Userlevel 4
Badge

@Naveen Boga

Ah, ok.  How do I reference or syntax for that in the data field of the Results grid in the GI?  Again, right now I have it coded to be =[PMTimeActivity.TimeSpent]/60

Is there a function I need to use to convert that?

Thank you,

Userlevel 7
Badge +19

@NetAdmin42 Please use the TimeSpent field without any formula like below.

 

 

Userlevel 4
Badge

@Naveen Boga 
Ah, ok, thank you!

BTW, I also found out that you can fix it as a calculated value by dividing by 60.0 instead of 60.

For some reason you have to have a decimal value and THEN it calculates correctly. Very odd.
 

=[PMTimeActivity.TimeSpent] / 60.0  instead of =[PMTimeActivity.TimeSpent] / 60

 

The only issue there is that it formats out to six decimal places. which is no big deal. But interesting

 

Userlevel 7
Badge +19

@NetAdmin42  Okay!

 

In the Schema field, you can provide the any DECIMAL field which has TWO decimals, so that in GI it will display 2 decimals instead of 6 decimals and also change the CAPTION accordingly.

 

 

Userlevel 4
Badge

@Naveen Boga

Yes.  That is exactly what I did to format it down to 2 decimal places. 

Thank you again

Userlevel 7
Badge +19

Great! I'm glad to hear that worked

Reply