Release 2.0.6 (#3900)
* cleanup invoice templates * cleanup invoice translations * fix invoice datetime for now * support invoice archive order by number and status * bump version * allow meta-field sub-classing * removed unused translation task.delete * prevent null in str_replace
This commit is contained in:
@@ -1,99 +1,110 @@
|
||||
{% extends 'invoice/layout.html.twig' %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
<!DOCTYPE html>
|
||||
{% import "macros/datatables.html.twig" as tables %}
|
||||
{% set language = app.request is not null ? app.request.locale : 'en' %}
|
||||
{% set decimal = false %}
|
||||
{% set showUserColumn = true %}
|
||||
{% if query.user %}
|
||||
{% set showUserColumn = false %}
|
||||
{% endif %}
|
||||
<html lang="{{ language }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<title>{{ 'export'|trans }}</title>
|
||||
<style type="text/css">
|
||||
{{ encore_entry_css_source('invoice')|raw }}
|
||||
</style>
|
||||
</head>
|
||||
<body class="invoice_print">
|
||||
<div class="wrapper">
|
||||
<section class="invoice">
|
||||
|
||||
{% block title %}{{ 'export'|trans }}{% endblock %}
|
||||
{% block invoice %}
|
||||
{% set decimal = decimal|default(false) %}
|
||||
{% set showUserColumn = true %}
|
||||
{% if query.user %}
|
||||
{% set showUserColumn = false %}
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h2 class="page-header">
|
||||
{% if not showUserColumn %}
|
||||
{{ widgets.username(query.user) }}:
|
||||
{% endif %}
|
||||
{% if query.begin is not empty %}
|
||||
{{ query.begin|date_short }}
|
||||
{% else %}
|
||||
{% set last = entries|last %}
|
||||
{{ last.begin|date_short }}
|
||||
{% endif %}
|
||||
–
|
||||
{% if query.end is not empty %}
|
||||
{{ query.end|date_short }}
|
||||
{% else %}
|
||||
{% set first = entries|first %}
|
||||
{{ first.end|date_short }}
|
||||
{% endif %}
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'date'|trans }}</th>
|
||||
{% if showUserColumn %}
|
||||
<th>{{ 'username'|trans }}</th>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h2 class="page-header">
|
||||
{% if not showUserColumn %}
|
||||
{{ query.user.displayName }}:
|
||||
{% endif %}
|
||||
<th>{{ 'description'|trans }}</th>
|
||||
{% for field in timesheetMetaFields %}
|
||||
<th class="text-nowrap">{{ field.label|trans }}</th>
|
||||
{% endfor %}
|
||||
<th>{{ 'hours'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% set timeWorked = 0 %}
|
||||
{% for entry in entries %}
|
||||
{% set timeWorked = timeWorked + entry.duration %}
|
||||
{% if query.begin is not empty %}
|
||||
{{ query.begin|date_short }}
|
||||
{% else %}
|
||||
{% set last = entries|last %}
|
||||
{{ last.begin|date_short }}
|
||||
{% endif %}
|
||||
–
|
||||
{% if query.end is not empty %}
|
||||
{{ query.end|date_short }}
|
||||
{% else %}
|
||||
{% set first = entries|first %}
|
||||
{{ first.end|date_short }}
|
||||
{% endif %}
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-nowrap">{{ entry.begin|date_short }}</td>
|
||||
<th>{{ 'date'|trans }}</th>
|
||||
{% if showUserColumn %}
|
||||
<td>{{ widgets.username(entry.user) }}</td>
|
||||
<th>{{ 'username'|trans }}</th>
|
||||
{% endif %}
|
||||
<td>
|
||||
{% if entry.description is not empty %}
|
||||
<div>
|
||||
{{ entry.description|desc2html }}
|
||||
</div>
|
||||
<th>{{ 'description'|trans }}</th>
|
||||
{% for field in timesheetMetaFields %}
|
||||
<th class="text-nowrap">{{ field.label|trans }}</th>
|
||||
{% endfor %}
|
||||
<th>{{ 'hours'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% set timeWorked = 0 %}
|
||||
{% for entry in entries %}
|
||||
{% set timeWorked = timeWorked + entry.duration %}
|
||||
<tr>
|
||||
<td class="text-nowrap">{{ entry.begin|date_short }}</td>
|
||||
{% if showUserColumn %}
|
||||
<td>{{ entry.user.displayName }}</td>
|
||||
{% endif %}
|
||||
<span class="small">
|
||||
<td>
|
||||
{% if entry.description is not empty %}
|
||||
<div>
|
||||
{{ entry.description|desc2html }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<span class="small">
|
||||
{% if entry.activity is not null %}{{ 'activity'|trans }}: {{ entry.activity.name }} |{% endif %}
|
||||
{{ 'project'|trans }}: {{ entry.project.name }} |
|
||||
{{ 'project'|trans }}: {{ entry.project.name }} |
|
||||
{{ 'customer'|trans }}: {{ entry.project.customer.name }}
|
||||
</span>
|
||||
</td>
|
||||
{% for field in timesheetMetaFields %}
|
||||
<td>{{ tables.datatable_meta_column(entry, field) }}</td>
|
||||
{% endfor %}
|
||||
<td class="text-nowrap">{{ entry.duration|duration(decimal) }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th></th>
|
||||
{% if showUserColumn %}
|
||||
<th></th>
|
||||
{% endif %}
|
||||
{% for field in timesheetMetaFields %}
|
||||
<th></th>
|
||||
</td>
|
||||
{% for field in timesheetMetaFields %}
|
||||
<td>{{ tables.datatable_meta_column(entry, field) }}</td>
|
||||
{% endfor %}
|
||||
<td class="text-nowrap">{{ entry.duration|duration(decimal) }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<th>{{ 'invoice.total_working_time'|trans }}</th>
|
||||
<th class="text-nowrap">{{ timeWorked|duration(decimal) }}</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th></th>
|
||||
{% if showUserColumn %}
|
||||
<th></th>
|
||||
{% endif %}
|
||||
{% for field in timesheetMetaFields %}
|
||||
<th></th>
|
||||
{% endfor %}
|
||||
<th>{{ 'invoice.total_working_time'|trans }}</th>
|
||||
<th class="text-nowrap">{{ timeWorked|duration(decimal) }}</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block print_button %}{% endblock %}
|
||||
</section>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user