* added sortable js library * activity in invoice is optional * added javascript widget for paginated boxes * fix activity dropdown for globals only * added timesheet service to reduce code duplication * use repository to query for teams in dropdowns * added project validator * validate project start and end against timesheet * include begin and end in dynamic form requests for projects * added timezone and language option to import flag, improve timesheet import speed * deactivate cross-timezone filter * add virtual fields to field order list * composer update * added param to ignore dates * position loader icon fixed - fixes #1330 * permission problem when creating a new project - fixes #1340 * remove dev dependencies webserver and thanks bundle * stop information leak (begin and end date) in duration mode - fixes #1307 * unify timesheet edit dialog for user and admins * fix security issue, own rates exposed to unauthorized users in multi-update dialog
124 lines
4.5 KiB
Twig
124 lines
4.5 KiB
Twig
{% import "macros/widgets.html.twig" as widgets %}
|
|
{% extends 'invoice/layout.html.twig' %}
|
|
|
|
{% block invoice %}
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<h2 class="page-header">
|
|
<span contenteditable="true">{{ model.template.title|default('timesheet'|trans({}, 'invoice-renderer')) }}</span>
|
|
</h2>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<table class="table no-border table-condensed">
|
|
<tr>
|
|
<th>{{ 'invoice.from'|trans }}</th>
|
|
<td contenteditable="true">
|
|
{% if model.query.user is not empty %}
|
|
{{ widgets.username(model.query.user) }}
|
|
{% else %}
|
|
{{ model.template.company }}
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{{ 'label.date'|trans }}</th>
|
|
<td contenteditable="true">
|
|
{% if model.query.begin|date('m') != model.query.end|date('m') or model.query.begin|date('Y') != model.query.end|date('Y') %}
|
|
{{ model.query.begin|date_short }} - {{ model.query.end|date_short }}
|
|
{% else %}
|
|
{{ model.query.end|month_name|trans }} {{ model.query.end|date('Y') }}
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{{ 'label.customer'|trans }}</th>
|
|
<td contenteditable="true">
|
|
{% if model.customer.number is not empty %}[{{ model.customer.number }}]{% endif %}
|
|
{{ model.customer.name }}{% if model.customer.contact is not empty %} / {{ model.customer.contact }}{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% if model.query.project is not empty and model.query.project.orderNumber is not empty %}
|
|
<tr>
|
|
<th>{{ 'label.orderNumber'|trans }}</th>
|
|
<td contenteditable="true">
|
|
{{ model.query.project.orderNumber }}
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row invoice-items">
|
|
<div class="col-xs-12 table-responsive">
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>{{ 'label.date'|trans }}</th>
|
|
{% if model.query.user is empty %}
|
|
<th>{{ 'label.user'|trans }}</th>
|
|
{% endif %}
|
|
<th>{{ 'label.activity'|trans }}</th>
|
|
<th>{{ 'label.hours'|trans }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for entry in model.calculator.entries %}
|
|
<tr>
|
|
<td>{{ entry.begin|date_short }}</td>
|
|
{% if model.query.user is empty %}
|
|
<td>{{ widgets.username(entry.user) }}</td>
|
|
{% endif %}
|
|
<td contenteditable="true">
|
|
{% if entry.description is not empty %}
|
|
{{ entry.description|nl2br }}
|
|
{% else %}
|
|
{% if entry.activity is not null %}{{ entry.activity.name }} / {% endif %}{{ entry.project.name }}
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ entry.duration|duration }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<th></th>
|
|
{% if model.query.user is empty %}
|
|
<th></th>
|
|
{% endif %}
|
|
<th>{{ 'invoice.total_working_time'|trans }}</th>
|
|
<th>{{ model.calculator.timeWorked|duration }}</th>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
{% if model.template.paymentTerms is not empty %}
|
|
<p class="lead">{{ 'label.payment_terms'|trans }}</p>
|
|
|
|
<p class="text-muted well well-sm no-shadow" contenteditable="true" style="margin-bottom: 100px">
|
|
{{ model.template.paymentTerms|trim|nl2br }}
|
|
</p>
|
|
{% endif %}
|
|
|
|
<div class="table-responsive">
|
|
<table class="table">
|
|
<tbody>
|
|
<tr>
|
|
<th style="padding-bottom: 60px">{{ 'invoice.signature_user'|trans }}</th>
|
|
</tr>
|
|
<tr>
|
|
<th>{{ 'invoice.signature_customer'|trans }}</th>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %} |