-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export "hourly_rate" instead "rate" #6
Comments
Yes, and what is the problem now? |
The hourly rate is fixed but is now displayed differently. Even if the differences are only minor, they are not accepted. |
Aha, I was concentrating on the logic, not the cents. Kimai rounds to 2 decimals, that can't be changed. Talk to the Grandtotal developer please and explain the problem, maybe he allows to set the Einzelpreis instead of the costs in plugins. |
Hi Kevin, i talked to Stefan from GrandTotal. Could you check this |
You can try it yourself. Clone the repository, change the line and then double click the directory |
Hm, true. The hourly_rate is missing in these objects. That needs to be fixed in Kimai first. |
Hi Kevin I think this is a dead end. Even if I calculate it this way, the rounding problem remains. The only solution in my eyes would be if the "hourly_rate" can be transferred to GrandTotal as stored in Kimai. I write this again to Stefan from GrandTotal |
Maybe I am wrong, but I don't think that it matter if you calculate the hourly rate or if it comes from Kimai. There should be no difference for the algorithm. var hourlyRate = aEntry['rate'] / aEntry['duration'] * 3600
var minutes = Math.round(aEntry['duration'] / 60);
var aItemResult = {
'startDate': aEntry['begin'],
'client': '',
'project': '',
'minutes': minutes,
'notes': aEntry['description'] !== null ? aEntry['description'] : '',
'label': aEntry['tags'].join(", "),
'user': aEntry['user'],
'cost': hourlyRate * minutes / 60,
'uid': 'com.kimai2.' + aEntry['id'],
}; |
Currently, a calculated hourly rate is transferred to GrandTotal. This leads to different hourly rates being shown in the invoice.
According to the database, the field "hourly_rate" should be used instead of "rate" for the entry "Cost".
Many thanks
for (var aEntry of aItems)
{
var aItemResult = {
'startDate': aEntry['begin'],
'client': '',
'project': '',
'minutes': Math.round(aEntry['duration'] / 60),
'notes': aEntry['description'] !== null ? aEntry['description'] : '',
'label': aEntry['tags'].join(", "),
'user': aEntry['user'],
'cost': aEntry['rate'],
'uid': 'com.kimai2.' + aEntry['id'],
The text was updated successfully, but these errors were encountered: