Skip to content
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

Rounding rules #128

Merged
merged 5 commits into from
Feb 7, 2018
Merged

Rounding rules #128

merged 5 commits into from
Feb 7, 2018

Conversation

kevinpapst
Copy link
Member

@kevinpapst kevinpapst commented Feb 4, 2018

added CONTRIBUTION guidelines
fixed license year
@simonschaufi
Copy link
Contributor

simonschaufi commented Feb 4, 2018

oh, this pr is quite big. It looks like multiple things are done and not just one, especially about the documentation.

Please explain how to use this feature and how it can be manually tested. Please also write some specs how this feature should work!

@kevinpapst
Copy link
Member Author

kevinpapst commented Feb 5, 2018

Sure! The are some "mixins" to the main topic of this pull request, like general improvement of the documentation and code sniffer fixes - these can be ignored feature wise, but you could still have a look, especially at the documentation. Is the current state helpful or do you miss more details and such...

The main part of this PR are two features: rounding of timesheet records and the option to configure different rates multipliers for different weekdays (this was asked in Kimai v1 from time to time - people who wanted to charge more on weekends). The later feature is disabled by default, but a configuration example is included in kimai.yaml.

These "calculation services" can also dynamically be added during runtime by bundles, using the service container and the tag timesheet.calculator. A bundle can register these new services as described in the developer documentation. So bundles could bring more configuration options for the users who are not satisfied with the out-of-the-box solution.

For now time rounding is a global setting, as I don't think that companies want their employees to be able to configure their own rounding rules. And freelancer can configure it in the yaml file. Also adding dynamic administration configs through the web is a major feature which needs to be tackled at a later date...

Please have a look at:
https://github.com/kevinpapst/kimai2/tree/rounding-rules/var/docs
Especially the parts in configuration from here on:
https://github.com/kevinpapst/kimai2/blob/rounding-rules/var/docs/configurations.md#timesheet-records---rounding-of-begin-end-and-duration
And here the last part for developer:
https://github.com/kevinpapst/kimai2/blob/rounding-rules/var/docs/developers.md#adding-timesheet-calculator

All you need to do is to pull this branch and adjust the configuration as explained in the docu. Edit timesheet records which were stopped or stop a running entry. The configured rounding rules for times and rate should be applied.

@simonschaufi
Copy link
Contributor

simonschaufi commented Feb 5, 2018

Great. this is much easier to understand than just reading code ;)
One main feature is missing for me: Night shifts are better payed than day shifts. Would you add this as "premium feature" or could this also be part of this pull request?

@kevinpapst
Copy link
Member Author

kevinpapst commented Feb 5, 2018

Yeah, I thought about the nightshift as well .. .and then comes the feiertags-rules ;-)
Currently I use the end date of each record to find out if a rule applies, this is already not perfect and has room for improvements, I simply hope that nightshifts are not first priority for users.

Real rules could fast become quite complicated and at least the shift rules might be user-specific.

My conclusion is: I would not add it as a feature for the first test version, but either later or as premium feature.

@simonschaufi
Copy link
Contributor

I have never worked in a company with night shifts, therefore I don't know how they are calculated so I'm not even able to write a spec.

@kevinpapst
Copy link
Member Author

Let me know if you have further feedback, otherwise I would merge it

@simonschaufi
Copy link
Contributor

Ready for merge

@kevinpapst kevinpapst merged commit 2e60e14 into master Feb 7, 2018
@kevinpapst kevinpapst deleted the rounding-rules branch February 7, 2018 11:51
@kevinpapst kevinpapst added this to the 0.2 milestone Jun 23, 2018
@lock
Copy link

lock bot commented Nov 18, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Nov 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants