added fixed-rate and hourly-rate for customer, project and activity (#304)
This commit is contained in:
@@ -23,10 +23,10 @@ There is a [discussion in the issue tracker](https://github.com/kevinpapst/kimai
|
||||
|
||||
There are two solution for this:
|
||||
|
||||
- Update your MariaDB server to at least 10.7.2
|
||||
- Update your MariaDB server to at least 10.2.7
|
||||
- Switch to SQLite (that can be changed in your `.env` file)
|
||||
|
||||
Further readings:
|
||||
|
||||
- [MariaDB - JSON support was added with 10.7.2](https://mariadb.com/kb/en/library/json-data-type/)
|
||||
- [MariaDB - JSON support was added with 10.2.7](https://mariadb.com/kb/en/library/json-data-type/)
|
||||
- [Using JSON fields with Doctrine ORM on PostgreSQL & MySQL](https://symfony.fi/entry/using-json-fields-with-doctrine-orm-on-postgresql-mysql)
|
||||
|
||||
@@ -4,10 +4,14 @@ Before importing your data from a Kimai v1 installation, please read the followi
|
||||
|
||||
- Data from the existing v1 installation is only read and will never be changed
|
||||
- Data can only be imported from a Kimai installation with at least `v1.0.1` and database revision `1388` (check your `configuration` table)
|
||||
- Kimai v1 has support for activities without project assignment, which Kimai v2 doesn't support. Unattached activities will be created for every project that has a linked activity in any of the imported timesheet records
|
||||
- Rates and fixed-rates are handled in a completely different way and for now only the timesheet record total amounts are imported
|
||||
- Customers cannot login and no user accounts will be created for them
|
||||
- The customers country has to be manually assigned afterwards, as there is no field in Kimai v1 for that
|
||||
- Kimai v1 has support for activities without project assignment yet, which Kimai v2 doesn't support
|
||||
- global activities will be created for every project that has a linked activity in any of the imported timesheet records
|
||||
- User-specific rates are not yet supported in Kimai 2
|
||||
- fixed-rates and hourly-rates for projects and activities are imported
|
||||
- fixed-rates and hourly-rates and total rate for timesheet entries are imported
|
||||
- Customers in Kimai 2 are only used for recording
|
||||
- they cannot login and no user accounts will be created for them
|
||||
- country has to be manually assigned afterwards to customers, as there is no field in Kimai v1 for that
|
||||
- You have to supply the default password that is used for every imported user, as their password will be resetted
|
||||
- Data that was deleted in Kimai v1 (user, customer, projects, activities) will be imported and set to `invisible` (if you don't want that, you have to delete all entries that have the value `1` in the `trash` column before importing)
|
||||
|
||||
|
||||
@@ -20,14 +20,32 @@ Please note: if time rounding is activated (which is the default behaviour), the
|
||||
|
||||
## Rate calculation
|
||||
|
||||
The rate of a timesheet entry can be calculated from several settings.
|
||||
There are two rate types:
|
||||
|
||||
It can have two values dedicated to the entry itself:
|
||||
- if a fixed rate is set, the rate of a record is set to this exact value no matter how long the duration is
|
||||
- if a hourly rate is set, it will be used to calculate the record rate by using it multiplied with the records duration
|
||||
- each of the above can be set to 0, to set the records rate to 0
|
||||
- __Fixed rate__: the value will be used to set the records rate, no matter how long the duration is
|
||||
- __Hourly rate__: will be used to calculate the records rate by multiplying it with the duration (see below)
|
||||
|
||||
If none of the above was set the users rate will be used to calculate the records rate.
|
||||
If any of the above is set to 0, the records rate will be set to 0.
|
||||
|
||||
While calculating the rate of a timesheet entry, the first setting that is found will be used (in order of appearance):
|
||||
|
||||
- Timesheet fixed rate
|
||||
- Activity fixed rate
|
||||
- Project fixed rate
|
||||
- Customer fixed rate
|
||||
- Timesheet hourly rate
|
||||
- Activity hourly rate
|
||||
- Project hourly rate
|
||||
- Customer hourly rate
|
||||
- Users hourly rate
|
||||
|
||||
If neither a fixed nor a hourly rate can be found, the users rate will be used to calculate the records rate.
|
||||
In that case and the users rate is not set or equals 0, the records rate will be set to 0.
|
||||
|
||||
The calculation is based on the following formular:
|
||||
|
||||
- __Fixed rate__: `$fixedRate`
|
||||
- __Hourly rate__: `$hourlyRate * ($durationInSeconds / 3600) * $factor`
|
||||
|
||||
Please see also the configuration chapter about [hourly rates for timesheet records](configurations.md) to see how you
|
||||
can apply configurable multiplying factors based on day and time.
|
||||
|
||||
Reference in New Issue
Block a user