https://github.com/Matth--/toggl-invoiceninja-sync
https://github.com/Matth--/toggl-invoiceninja-sync
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/Matth--/toggl-invoiceninja-sync
- Owner: Matth--
- License: agpl-3.0
- Created: 2016-12-17T12:41:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-04-19T18:37:54.000Z (about 2 years ago)
- Last Synced: 2024-11-04T06:35:26.694Z (6 months ago)
- Language: PHP
- Size: 118 KB
- Stars: 25
- Watchers: 5
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome-starred - Matth--/toggl-invoiceninja-sync - (others)
README
[](https://insight.sensiolabs.com/projects/c75bd15a-5d40-4879-9a2f-23e4a6b683e0)
[](https://travis-ci.org/Matth--/toggl-invoiceninja-sync)
[](https://scrutinizer-ci.com/g/Matth--/toggl-invoiceninja-sync/?branch=master)
[](https://scrutinizer-ci.com/g/Matth--/toggl-invoiceninja-sync/?branch=master)# Invoice syncer
This application is built to sync loggings from toggl to invoiceninjaset the correct parameters in config/parameters.yml
## Installation
- Clone or download the repo
- Use the latest tagged release
- run `composer install`Now fill in the parameters
```yaml
parameters:
debug: false
serializer.config_dir: %kernel.root_dir%/config/serializer
seriaizer.cache_dir: %kernel.root_dir%/cachetoggl.api_key: KEY
toggl.toggl_base_uri: https://www.toggl.com/api/
toggl.reports_base_uri: https://www.toggl.com/reports/api/invoice_ninja.base_uri: {your-invoice-ninja-url}/api/
invoice_ninja.api_key: KEY# Key = name in toggl (Has to be correct)
# Value = client id from invoiceninja
# Use '[]' if you don't need any config here
clients:
client_name: 1# Key = name in toggl
# Value= id from invoiceninja
# Use '[]' if you don't need any config here
projects:
first_project: 1
second_project: 2
```The key-value pairs in the `clients` variable are important. The key should be the **exact** client name from toggl. The value should be the client id from invoiceninja.
If the time entry was matched with the `clients` variable it skips the part where it checks the `projects` variable. This varialbe acts the same way as the `clients
variable but instead of matching the client name, it matches the **exact** project name.## Run the command
to run the command just run:
```bash
php syncer sync:timings
```## Run as cronjob
As this command syncs the tasks from the current day, this cronjob setting will run the command daily at 23:55.
```bash
55 23 * * * /path/to/php /path/to/syncer sync:timings
```## Roadmap
- Support for Invoiceninja projects (now it just links project to client as this was written when no projects existed in invoiceninja)
- Next major release will use Symfony 4 components.