added further timesheet related invoice fields (#411)

This commit is contained in:
Kevin Papst
2018-11-12 12:19:57 +01:00
committed by GitHub
parent f9dc42d1f9
commit e9cbb872d0
4 changed files with 289 additions and 56 deletions

View File

@@ -93,61 +93,64 @@ See below in `Template variables` to find out which variables you can use in you
You can use the following global variables in your templates:
| Key | Description |
|---|---|
| ${invoice.due_date} | The due date for the invoice payment |
| ${invoice.date} | The creation date of this invoice |
| ${invoice.number} | The generated invoice number |
| ${invoice.currency} | The invoice currency |
| ${invoice.total_time} | The total working time (entries with a fixed rate are always calculated with 1) |
| ${invoice.total} | The invoices total (including tax) |
| ${invoice.subtotal} | The invoices subtotal (excluding tax) |
| ${invoice.vat} | The VAT in percent for this invoice |
| ${invoice.tax} | The tax of the invoice amount |
| ${template.name} | The invoice name, as configured in your template |
| ${template.company} | The company name, as configured in your template |
| ${template.address} | The invoicing address, as configured in your template |
| ${template.title} | The invoice title, as configured in your template |
| ${template.payment_terms} | Your payment terms, usage might differ from template to template |
| ${template.due_days} | The amount of days for the payment, starting with the day of creating the invoice |
| ${query.begin} | The query begin as formatted short date |
| ${query.end} | The query end as formatted short date |
| ${query.month} | The month for this query (begin date) |
| ${query.year} | The year for this query (begin date) |
| ${customer.address} | The customer address |
| ${customer.name} | The customer name |
| ${customer.contact} | The customer contac |
| ${customer.company} | The customer company |
| ${customer.number} | The customer number |
| ${customer.country} | The customer country |
| ${customer.homepage} | The customer homepage |
| ${customer.comment} | The customer comment |
| Key | Description | Example |
|---|---|---|
| ${invoice.due_date} | The due date for the invoice payment | |
| ${invoice.date} | The creation date of this invoice | |
| ${invoice.number} | The generated invoice number | |
| ${invoice.currency} | The invoice currency | |
| ${invoice.total_time} | The total working time (entries with a fixed rate are always calculated with 1) | |
| ${invoice.total} | The invoices total (including tax) | |
| ${invoice.subtotal} | The invoices subtotal (excluding tax) | |
| ${invoice.vat} | The VAT in percent for this invoice | |
| ${invoice.tax} | The tax of the invoice amount | |
| ${template.name} | The invoice name, as configured in your template | |
| ${template.company} | The company name, as configured in your template | |
| ${template.address} | The invoicing address, as configured in your template | |
| ${template.title} | The invoice title, as configured in your template | |
| ${template.payment_terms} | Your payment terms, usage might differ from template to template | |
| ${template.due_days} | The amount of days for the payment, starting with the day of creating the invoice | |
| ${query.begin} | The query begin as formatted short date | |
| ${query.end} | The query end as formatted short date | |
| ${query.month} | The month for this query (begin date) | |
| ${query.year} | The year for this query (begin date) | |
| ${customer.address} | The customer address | |
| ${customer.name} | The customer name | |
| ${customer.contact} | The customer contact | |
| ${customer.company} | The customer company | |
| ${customer.number} | The customer number | |
| ${customer.country} | The customer country | |
| ${customer.homepage} | The customer homepage | |
| ${customer.comment} | The customer comment | |
### Timesheet entry variables
For each timesheet entry you can use the following variables:
For each timesheet entry you can use the variables from the following table.
| Key | Description |
|---|---|
| ${entry.description} | The entries description |
| ${entry.amount} | The amount for this entry (normally the amount of hours) |
| ${entry.rate} | The rate for one unit of the entry (normally one hour) |
| ${entry.total} | The total rate for this entry |
| ${entry.duration} | The duration in seconds |
| ${entry.begin} | The begin date - _format may change and include the time in the future_ |
| ${entry.begin_timestamp} | The timestamp for the begin of this entry |
| ${entry.end} | The begin date - _format may change and include the time in the future_ |
| ${entry.end_timestamp} | The timestamp for the end of this entry |
| ${entry.date} | The start date when this record was created |
| ${entry.user_id} | The user ID |
| ${entry.user_name} | The username |
| ${entry.user_alias} | The user alias |
| ${entry.activity} | Activity name |
| ${entry.activity_id} | Activity ID |
| ${entry.project} | Project name |
| ${entry.project_id} | Project ID |
| ${entry.customer} | Customer name |
| ${entry.customer_id} | Customer ID |
| Key | Description | Example |
|---|---|---|
| ${entry.description} | The entries description | _foo bar_ |
| ${entry.amount} | The format duration/amount for this entry | 02:47 h |
| ${entry.rate} | The rate for one unit of the entry (normally one hour) | 100 |
| ${entry.total} | The total rate for this entry | 278,33 |
| ${entry.duration} | The duration in seconds | 10020 |
| ${entry.duration_minutes} | The duration in minutes with no decimals | 167 |
| ${entry.begin} | The begin date (format depends on the users language) | 27.10.2018 |
| ${entry.begin_time} | The formatted time for the begin of this entry | 14:57 |
| ${entry.begin_timestamp} | The timestamp for the begin of this entry | 1542016273 |
| ${entry.end} | The begin date (format depends on the users language) | 27.10.2018 |
| ${entry.end_time} | The formatted time for the end of this entry | 17:44 |
| ${entry.end_timestamp} | The timestamp for the end of this entry | 1542016273 |
| ${entry.date} | The start date when this record was created | 27.10.2018 |
| ${entry.user_id} | The user ID | 1 |
| ${entry.user_name} | The username | susan_super |
| ${entry.user_alias} | The user alias | Susan Miller |
| ${entry.activity} | Activity name | Post production |
| ${entry.activity_id} | Activity ID | 124 |
| ${entry.project} | Project name | Nemesis |
| ${entry.project_id} | Project ID | 10 |
| ${entry.customer} | Customer name | Acme Studios |
| ${entry.customer_id} | Customer ID | 3 |
## Configure search path