added export module (#538)
This commit is contained in:
@@ -7,8 +7,9 @@ and we will add it as soon as possible.
|
||||
|
||||
## User manual
|
||||
|
||||
- [Invoices](invoices.md) - export your data to different formats with customizable templates
|
||||
- [Timesheets](timesheet.md) - information about timesheets
|
||||
- [Export](export.md) - export filtered timesheet data
|
||||
- [Invoices](invoices.md) - create invoices from timesheet data in different formats with customizable templates
|
||||
- [User and Security](users.md) - docu for user and security topics, like authentication, registration and roles
|
||||
|
||||
## Admins and Developers
|
||||
|
||||
@@ -188,10 +188,10 @@ In the config `kimai.invoice.documents`, you can add a list of directories with
|
||||
|
||||
## Adding invoice calculator
|
||||
|
||||
An invoice calculator is a class extending `App\Invoice\CalculatorInterface` and is responsible for calculating
|
||||
An invoice calculator is a class implementing `App\Invoice\CalculatorInterface` and it is responsible for calculating
|
||||
invoice rates, taxes and taking care of all timesheet entries that should be displayed.
|
||||
|
||||
Every invoice calculator class will be picked up when refreshing the application cache by the [InvoiceServiceCompilerPass](https://github.com/kevinpapst/kimai2/blob/master/src/DependencyInjection/Compiler/InvoiceServiceCompilerPass.php):
|
||||
Every invoice calculator class will be automatically available when refreshing the application cache by the [InvoiceServiceCompilerPass](../../src/DependencyInjection/Compiler/InvoiceServiceCompilerPass.php):
|
||||
|
||||
The ID of the calculator must be unique, please prefix it with your vendor or bundle name and make sure it only contains
|
||||
character as it will be stored in a database column.
|
||||
@@ -200,16 +200,30 @@ Translations are stored in the `invoice-calculator.xx.xliff`.
|
||||
|
||||
## Adding invoice-number generator
|
||||
|
||||
An invoice-number generator is a class extending `App\Invoice\NumberGeneratorInterface` and its only task is to generate
|
||||
An invoice-number generator is a class implementing `App\Invoice\NumberGeneratorInterface` and its only task is to generate
|
||||
a number for the invoice. In most cases you do not want to mix multiple invoice-number generators throughout your invoices.
|
||||
|
||||
Every invoice number-generator class will be picked up when refreshing the application cache by the [InvoiceServiceCompilerPass](https://github.com/kevinpapst/kimai2/blob/master/src/DependencyInjection/Compiler/InvoiceServiceCompilerPass.php):
|
||||
Every invoice number-generator class will be automatically available up when refreshing the application cache by the [InvoiceServiceCompilerPass](../../src/DependencyInjection/Compiler/InvoiceServiceCompilerPass.php):
|
||||
|
||||
The ID of the number generator must be unique, please prefix it with your vendor or bundle name and make sure it only contains
|
||||
character as it will be stored in a database column.
|
||||
|
||||
Translations are stored in the `invoice-numbergenerator.xx.xliff`.
|
||||
|
||||
## Adding invoice renderer
|
||||
|
||||
An invoice renderer is a class implementing `App\Invoice\RendererInterface` and it is responsible to convert an `InvoiceModel` (the actual data)
|
||||
with the use of an `InvoiceDocument` (the template file) into a downloadable/printable document.
|
||||
|
||||
Every invoice renderer class will be automatically available when refreshing the application cache by the [InvoiceServiceCompilerPass](../../src/DependencyInjection/Compiler/InvoiceServiceCompilerPass.php):
|
||||
|
||||
## Adding export renderer
|
||||
|
||||
An export renderer is a class implementing `App\Export\RendererInterface` and it is responsible to convert ar array of `Timesheet` objects
|
||||
into a downloadable/printable document.
|
||||
|
||||
Every export renderer class will be automatically available when refreshing the application cache by the [ExportServiceCompilerPass](../../src/DependencyInjection/Compiler/ExportServiceCompilerPass.php):
|
||||
|
||||
## Adding timesheet calculator
|
||||
|
||||
A timesheet calculator will be called on stopped timesheet records. It can rewrite all values but will normally take care
|
||||
|
||||
@@ -17,11 +17,15 @@ Any issues with the container rather than the application itself should be raise
|
||||
|
||||
## Run the docker
|
||||
|
||||
docker run -ti -p 8001:8001 --name kimai2 --rm kimai/kimai2:dev
|
||||
```
|
||||
docker run -ti -p 8001:8001 --name kimai2 --rm kimai/kimai2:dev
|
||||
```
|
||||
|
||||
You can then access the site on http://127.0.0.1:8001. If that doesn't work check the IP of your docker:
|
||||
|
||||
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' kimai2
|
||||
```
|
||||
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' kimai2
|
||||
```
|
||||
|
||||
You can find Kimai at that IP on port 8001.
|
||||
|
||||
@@ -30,32 +34,42 @@ You can find Kimai at that IP on port 8001.
|
||||
When using dock-machine on your Mac, you need to use the IP of your machine.
|
||||
Considering you started the machine named `default`, you find the IP with:
|
||||
|
||||
docker-machine ip default
|
||||
```
|
||||
docker-machine ip default
|
||||
```
|
||||
|
||||
## Running commands in the docker
|
||||
|
||||
You can run any command in the container in this fashion once it is started. Add `-ti` to attach a terminal.
|
||||
|
||||
docker exec -ti kimai2 bash
|
||||
```
|
||||
docker exec -ti kimai2 bash
|
||||
```
|
||||
|
||||
## Create a user and dummy data
|
||||
|
||||
See the docs [here](installation.md) for full instructions, but this creates a user admin/admin with all privileges.
|
||||
|
||||
docker exec kimai2 bin/console kimai:create-user admin admin@example.com ROLE_SUPER_ADMIN admin
|
||||
```
|
||||
docker exec kimai2 bin/console kimai:create-user admin admin@example.com ROLE_SUPER_ADMIN admin
|
||||
```
|
||||
|
||||
To install the fixtures:
|
||||
|
||||
docker exec kimai2 bin/console kimai:reset-dev
|
||||
```
|
||||
docker exec kimai2 bin/console kimai:reset-dev
|
||||
```
|
||||
|
||||
## Developing against the docker
|
||||
|
||||
It is possible to mount your source tree and sqlite DB into the container at run time. **N.B. The sqlite database needs to writable by the www-data user.** Use ```chown 33:33 kimai.sqlite``` on the host machine.
|
||||
|
||||
docker run --rm -d -p 8001:8001 \
|
||||
-v $(pwd)/src:/opt/kimai/src \
|
||||
-v $(pwd)/var/data/kimai.sqlite:/opt/kimai/var/data/kimai.sqlite \
|
||||
--name kimai2 kimai/kimai2:dev
|
||||
```
|
||||
docker run --rm -d -p 8001:8001 \
|
||||
-v $(pwd)/src:/opt/kimai/src \
|
||||
-v $(pwd)/var/data/kimai.sqlite:/opt/kimai/var/data/kimai.sqlite \
|
||||
--name kimai2 kimai/kimai2:dev
|
||||
```
|
||||
|
||||
Now edits in the local file tree will be served by the container and database changes will persist.
|
||||
|
||||
|
||||
20
var/docs/export.md
Normal file
20
var/docs/export.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Export
|
||||
|
||||
The export module allows you to export filtered timesheet data into several formats.
|
||||
|
||||
## Difference between export and invoice
|
||||
|
||||
There are a couple of differences in these two Kimai modules, the most important ones:
|
||||
|
||||
- Invoices can only be created for a dedicated customer, where export can be done without selecting a customer
|
||||
- Export state is saved with each timesheet record, so you can filter whether already exported items should be included or not
|
||||
- Invoices do more calculation (e.g. tax) and support export to self-created templates (e.g. XLSX, ODS, DOCX)
|
||||
- Invoices set duration to 1 in case of a fixed rate, export shows the real duration
|
||||
|
||||
## Security and privacy
|
||||
|
||||
The export extension does not check timesheet permissions, as this would defeat the purpose of an export.
|
||||
|
||||
Giving a user the permission to export data allows to basically see everything inside Kimai.
|
||||
So all customer, projects, activities, all hourly rates, the personal time worked, the money earned become visible!
|
||||
|
||||
@@ -4,7 +4,7 @@ The recommended way to install Kimai v2 is via SSH, you need GIT and [Composer](
|
||||
|
||||
But there are further installation methods described:
|
||||
- [Development setup](#development-installation)
|
||||
- [Docker](var/docs/docker.md)
|
||||
- [Docker](#docker)
|
||||
- [1-click installations](#hosting-and-1-click-installations)
|
||||
- [FTP](#ftp-installation) (not supported)
|
||||
- Hints for [local single-user setup](#installation-on-a-personal-computer)
|
||||
|
||||
@@ -70,20 +70,24 @@ The permission-names were chosen to be self-explanatory. In the hope that it wor
|
||||
| start_own_timesheet | TIMESHEET | | - |
|
||||
| stop_own_timesheet | TIMESHEET | | - |
|
||||
| create_own_timesheet | TIMESHEET | X | - |
|
||||
| edit_own_timesheet | TIMESHEET | | - |
|
||||
| edit_own_timesheet | TIMESHEET | X | - |
|
||||
| export_own_timesheet | TIMESHEET | | export your own timesheet in the timesheet panel |
|
||||
| delete_own_timesheet | TIMESHEET | | - |
|
||||
| view_other_timesheet | TIMESHEET_OTHER | | allows access to the complete timesheet view |
|
||||
| start_other_timesheet | TIMESHEET_OTHER | | - |
|
||||
| stop_other_timesheet | TIMESHEET_OTHER | | - |
|
||||
| create_other_timesheet | TIMESHEET_OTHER | | - |
|
||||
| edit_other_timesheet | TIMESHEET_OTHER | | - |
|
||||
| edit_other_timesheet | TIMESHEET_OTHER | X | - |
|
||||
| export_other_timesheet | TIMESHEET | | export timesheet in the timesheet admin panel |
|
||||
| delete_other_timesheet | TIMESHEET_OTHER | | - |
|
||||
| view_rate_own_timesheet | RATE | | - |
|
||||
| edit_rate_own_timesheet | RATE | | - |
|
||||
| edit_rate_own_timesheet | RATE | X | - |
|
||||
| view_rate_other_timesheet | RATE_OTHER | | - |
|
||||
| edit_rate_other_timesheet | RATE_OTHER | | - |
|
||||
| edit_rate_other_timesheet | RATE_OTHER | X | - |
|
||||
| view_export | EXPORT | | allows access to the export module|
|
||||
| create_export | EXPORT | | allows to create an export from the selected timesheet data |
|
||||
| edit_export_own_timesheet | EXPORT | X | set the export state of your own timesheet record |
|
||||
| edit_export_other_timesheet | EXPORT | X | set the export state of for other users timesheet records |
|
||||
| view_own_profile | PROFILE | | allows access to the own profile view - without this permission, users cannot access any of their profile settings or passwords ... |
|
||||
| edit_own_profile | PROFILE | | grants access to edit the own profile |
|
||||
| delete_own_profile | PROFILE | | grants access to delete the own profile |
|
||||
|
||||
Reference in New Issue
Block a user