Troubleshooting 'force exact' fails in timesheets
Who is this article for?
Users encountering errors in timesheets with entries using a comma sa a decimal separator.
IT Administrator permissions are required to resolve the issue.
If your TimeRecording.DayLength setting is set to a decimal value, and you use a comma as your decimal separator, then you might get the message "You cannot set this Time Sheet to Completed because not every day contains [some integer] as required." when completing a timesheet.
This article explains what causes the issue and how to resolve it.
1. Issue
If you use a comma as the decimal separator and your working day length is a decimal, your App Manager settings may look like this.
In this example, the day length is seven and a half hours, "7,5".
In Windows, if the user profile for the user account that runs the Pentana application pool uses a dot (.) as its decimal separator, then the application will ignore the comma.
In the above example:
- Each day is the correct length, displayed as 7.5 hours.
- Service ignores the comma in your DayLength setting.
- Service performs the wrong calculation - it compares 7.5 with 75.
- Service prints the wrong error message.
You might try changing the server's regional settings to one that uses a comma, such as German. However, this usually doesn't work because the PentanaService user typically lacks a user profile and inherits settings from LocalSystem, which is often set to en-US.
2. Solution
There are three potential resolutions.
2.1. Modify day length to include a decimal point
This approach ensures that the application correctly interprets the decimal using the Local System's US decimal format.
To modify the day length:
- Adjust the DayLength setting to a decimal point.
- Click Save.
- Restart the Pentana application pool.
This action will disconnect all active users.
2.2. Update the ServiceWeb.config
Alternatively, you may retain the comma in the DayLength setting and configure the application pool to operate under a specified locale.
To update the config:
- Open App Manager.
- Connect to the appropriate instance.
- Navigate to the Config tab.
- Ensure the Service tab is selected.
- Locate the <system.web> section.
- Add a setting that corresponds to your culture.
In this example, German is specified:
<globalization culture="de" uiCulture="de" />
- Click Save.
- This action will disconnect all active users.
2.3. Modify local system decimal separator
This change may impact Windows and other applications on this server. Please assess if it is appropriate for your environment before following the below steps.
To modify the decimal separator.
- On the application server.
- Open RegEdit.
- Navigate to HKEY_USERS\S-1-5-18\Control Panel\International.
- Within the list, locate sDecimal.
- Change the value from a decimal point (.) to a comma (,).
- Restart the Pentana application pool.
This action will disconnect all active users.