AdvoLogix Help

Rounding Hours Via Code

Updated

When enabled, the hours entry can be rounded in accordance with your organizations global setting. The following global Apex method can be used to round the Time's hours to the global rounding setting.

Syntax:

AdvologixUtilities.getTimeByTimeRounding(
  @timeInHoursValue,
);


Parameters:

@timeInHoursValue
The time to be rounded (in hours).


Result:

The function will return time in hours rounded according to your organization's global settings.


Example:

Decimal  timeResult  = AdvologixUtilities.getTimeByTimeRounding(5.67);

 

Example Result:

timeResult
Time (in hours) rounded according to global settings.



0 Comments

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Previous Article Billing Preview ⚡
Next Article Retrieving the Default Rate Via Code
Still need help? Click here!
AdvoLogix® is a registered trademark of AdvoLogix.com LLC a Texas Limited Liability Company. All references to other trademarks belonging to third parties that appear on this website, documentation, or other materials shall be understood to refer to those registered trademarks owned by others, and not to any trademark belonging to AdvoLogix. Otherwise, all material herein is the copyright of AdvoLogix.com LLC. All Rights Reserved.