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:
Kevin Papst
2023-03-08 00:38:10 +01:00
committed by GitHub
parent 80f8f70695
commit 9d503300f6
46 changed files with 422 additions and 534 deletions

View File

@@ -4830,16 +4830,6 @@ parameters:
count: 1
path: src/Form/Type/EntityMetaDefinitionType.php
-
message: "#^Parameter \\#1 \\$string of function strtolower expects string, string\\|null given\\.$#"
count: 1
path: src/Form/Type/InvoiceRendererType.php
-
message: "#^Parameter \\#1 \\$string of function ucfirst expects string, string\\|null given\\.$#"
count: 1
path: src/Form/Type/InvoiceRendererType.php
-
message: "#^PHPDoc tag @var for variable \\$collection contains generic class Doctrine\\\\Common\\\\Collections\\\\ArrayCollection but does not specify its types\\: TKey, T$#"
count: 1

View File

@@ -17,11 +17,11 @@ class Constants
/**
* The current release version
*/
public const VERSION = '2.0.5';
public const VERSION = '2.0.6';
/**
* The current release: major * 10000 + minor * 100 + patch
*/
public const VERSION_ID = 20005;
public const VERSION_ID = 20006;
/**
* The software name
*/

View File

@@ -109,7 +109,7 @@ final class InvoiceController extends AbstractController
$total += \count($model->getCalculator()->getEntries());
$values = [
'invoiceDate' => $query->getInvoiceDate(),
'invoiceDate' => null,
'template' => $customerTpl
];
@@ -364,10 +364,10 @@ final class InvoiceController extends AbstractController
$table->addColumn('mf_' . $metaColumn->getName(), ['title' => $metaColumn->getLabel(), 'class' => 'd-none', 'orderBy' => false]);
}
$table->addColumn('invoice_number', ['class' => 'd-none d-md-table-cell w-min', 'title' => 'invoice.number', 'orderBy' => false]);
$table->addColumn('invoice_number', ['class' => 'd-none d-md-table-cell w-min', 'title' => 'invoice.number', 'orderBy' => 'invoice.number']);
$table->addColumn('due_date', ['class' => 'd-none w-min', 'title' => 'invoice.due_days', 'orderBy' => false]);
$table->addColumn('payment_date', ['class' => 'd-none w-min', 'title' => 'invoice.payment_date', 'orderBy' => false]);
$table->addColumn('status', ['class' => 'd-none d-sm-table-cell w-min', 'orderBy' => false]);
$table->addColumn('status', ['class' => 'd-none d-sm-table-cell w-min', 'orderBy' => 'status']);
$table->addColumn('subtotal', ['class' => 'd-none text-end w-min', 'title' => 'invoice.subtotal', 'orderBy' => false]);
$table->addColumn('tax', ['class' => 'd-none text-end w-min', 'title' => 'invoice.tax']);
$table->addColumn('total_rate', ['class' => 'd-none d-md-table-cell text-end w-min']);

View File

@@ -61,13 +61,16 @@ final class InvoiceRendererType extends AbstractType
$type = array_pop($parts);
if (!\is_string($type)) {
return 'programmatic';
}
return match (strtolower($type)) {
'json', 'txt', 'xml' => 'programmatic',
'pdf' => 'PDF',
'docx', 'doc' => 'Word',
'xls', 'xlsx' => 'Excel',
'ods' => 'LibreOffice',
default => ucfirst($type),
default => strtoupper($type),
};
}

View File

@@ -101,7 +101,7 @@ abstract class AbstractSpreadsheetRenderer extends AbstractRenderer
if (\is_string($content) && str_starts_with($content, '=')) {
$contentLooksLikeFormula = true;
}
$value = str_replace($searchKey, $content, $value);
$value = str_replace($searchKey, $content ?? '', $value);
}
if ($contentLooksLikeFormula && $firstReplacerPos === 0) {

View File

@@ -204,7 +204,7 @@ class InvoiceRepository extends EntityRepository
case 'date':
$orderBy = 'i.createdAt';
break;
case 'number':
case 'invoice.number':
$orderBy = 'i.invoiceNumber';
break;
case 'payed':
@@ -213,9 +213,11 @@ class InvoiceRepository extends EntityRepository
case 'total_rate':
$orderBy = 'i.total';
break;
case 'tax':
case 'status':
$orderBy = 'i.' . $orderBy;
$orderBy = 'i.status';
break;
case 'tax':
$orderBy = 'i.tax';
break;
}

View File

@@ -21,9 +21,9 @@ class InvoiceArchiveQuery extends BaseQuery
use DateRangeTrait;
public const INVOICE_ARCHIVE_ORDER_ALLOWED = [
'date', 'total_rate',
'date', 'invoice.number', 'status', 'total_rate'
// TODO other fields have a problem with translation
// 'number', 'tax', 'payed', 'status'
// , 'tax', 'payed'
];
/**

View File

@@ -1,130 +1,142 @@
{% import "macros/widgets.html.twig" as widgets %}
{% extends 'invoice/layout.html.twig' %}
{% block invoice %}
{% set isDecimal = true %}
{% set project = model.query.project %}
{% set activity = model.query.activity %}
<div class="row">
<div class="col-xs-12">
<h2 class="page-header">
<span contenteditable="true">{{ model.template.title }}</span>
</h2>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<table class="table no-border table-sm">
<tr>
<th class="ps-0">{{ '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 class="ps-0">{{ '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 }} {{ model.query.end|date('Y') }}
{% endif %}
</td>
</tr>
<tr>
<th class="ps-0">{{ '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 project is not null %}
<tr>
<th class="ps-0">{{ 'project'|trans }}</th>
<td contenteditable="true">
{{ project.name }}
{% if project.orderNumber is not empty %}
({{ 'orderNumber'|trans }}: {{ project.orderNumber }})
{% endif %}
</td>
</tr>
{% endif %}
{% if activity is not null %}
<tr>
<th class="ps-0">{{ 'activity'|trans }}</th>
<td contenteditable="true">
{{ activity.name }}
</td>
</tr>
{% endif %}
</table>
</div>
</div>
<div class="row invoice-items mt-2 mb-3">
<div class="col-xs-12 table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>{{ 'date'|trans }}</th>
{% if model.query.user is empty %}
<th>{{ 'user'|trans }}</th>
{% endif %}
<th>{{ 'activity'|trans }}</th>
<th class="text-right">{{ '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 class="text-right text-nowrap">{{ entry.duration|duration(isDecimal) }}</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 class="text-right text-nowrap">{{ model.calculator.timeWorked|duration(isDecimal) }}</th>
</tr>
</tfoot>
</table>
</div>
</div>
<div class="row">
<div class="col-xs-12">
{% if model.template.paymentTerms is not empty %}
<p class="lead">{{ '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">
<p class="bt-1 pb-4 pt-1">{{ 'invoice.signature_user'|trans }}</p>
<p class="bt-1 pb-4 pt-1">{{ 'invoice.signature_customer'|trans }}</p>
<!DOCTYPE html>
{% set fallback = app.request is not null ? app.request.locale : 'en' %}
{% set language = model.template.language|default(fallback) %}
{% set isDecimal = true %}
{% set project = model.query.project %}
{% set activity = model.query.activity %}
<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>{{ model.invoiceNumber }}-{{ model.customer.company|default(model.customer.name)|u.snake }}</title>
<style type="text/css">
{{ encore_entry_css_source('invoice')|raw }}
</style>
</head>
<body class="invoice_print">
<div class="wrapper">
<section class="invoice">
<div class="row">
<div class="col-xs-12">
<h2 class="page-header">
<span contenteditable="true">{{ model.template.title }}</span>
</h2>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<table class="table no-border table-sm">
<tr>
<th class="ps-0">{{ 'invoice.from'|trans }}</th>
<td contenteditable="true">
{% if model.query.user is not empty %}
{{ model.query.user.displayName }}
{% else %}
{{ model.template.company }}
{% endif %}
</td>
</tr>
<tr>
<th class="ps-0">{{ '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 }} {{ model.query.end|date('Y') }}
{% endif %}
</td>
</tr>
<tr>
<th class="ps-0">{{ '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 project is not null %}
<tr>
<th class="ps-0">{{ 'project'|trans }}</th>
<td contenteditable="true">
{{ project.name }}
{% if project.orderNumber is not empty %}
({{ 'orderNumber'|trans }}: {{ project.orderNumber }})
{% endif %}
</td>
</tr>
{% endif %}
{% if activity is not null %}
<tr>
<th class="ps-0">{{ 'activity'|trans }}</th>
<td contenteditable="true">
{{ activity.name }}
</td>
</tr>
{% endif %}
</table>
</div>
</div>
<div class="row invoice-items mt-2 mb-3">
<div class="col-xs-12 table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>{{ 'date'|trans }}</th>
{% if model.query.user is empty %}
<th>{{ 'user'|trans }}</th>
{% endif %}
<th>{{ 'activity'|trans }}</th>
<th class="text-right">{{ '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>{{ entry.user.displayName }}</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 class="text-right text-nowrap">{{ entry.duration|duration(isDecimal) }}</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 class="text-right text-nowrap">{{ model.calculator.timeWorked|duration(isDecimal) }}</th>
</tr>
</tfoot>
</table>
</div>
</div>
<div class="row">
<div class="col-xs-12">
{% if model.template.paymentTerms is not empty %}
<p class="lead">{{ '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">
<p class="bt-1 pb-4 pt-1">{{ 'invoice.signature_user'|trans }}</p>
<p class="bt-1 pb-4 pt-1">{{ 'invoice.signature_customer'|trans }}</p>
</div>
</div>
</div>
</section>
</div>
{% endblock %}
</body>
</html>

View File

@@ -284,33 +284,33 @@
{% endmacro %}
{% macro form_type_value(type, value, entity) %}
{% if '\\ColorPickerType' in type or '\\ColorChoiceType' in type %}
{% if 'ColorPickerType' in type or 'ColorChoiceType' in type %}
{% if value is not empty %}
<span class="label-color" data-toggle="tooltip" data-placement="top" title="{{ value }}">
<i class="dot {{ 'dot'|icon(true) }} fa-fw" style="color:{{ value }}"></i>
</span>
{% endif %}
{% elseif '\\DurationType' in type %}
{% elseif 'DurationType' in type %}
{{ value|duration }}
{% elseif '\\YesNoType' in type or '\\CheckBoxType' in type %}
{% elseif 'YesNoType' in type or 'CheckBoxType' in type %}
{{ _self.label_boolean(value) }}
{% elseif '\\DatePickerType' in type %}
{% elseif 'DatePickerType' in type %}
{{ value|date_short }}
{% elseif '\\DateTimePickerType' in type %}
{% elseif 'DateTimePickerType' in type %}
{{ value|date_time }}
{% elseif '\\CountryType' in type %}
{% elseif 'CountryType' in type %}
{{ value|country_name }}
{% elseif '\\CurrencyType' in type %}
{% elseif 'CurrencyType' in type %}
{{ value|currency_name }}
{% elseif '\\LanguageType' in type %}
{% elseif 'LanguageType' in type %}
{{ value|locale_name }}
{% elseif '\\TagsType' in type %}
{% elseif 'TagsType' in type %}
{% for tag in value|split(',') %}
{% if tag is not empty %}
{{ _self.badge(tag, null|colorize(tag)) }}
{% endif %}
{% endfor %}
{% elseif '\\MoneyType' in type %}
{% elseif 'MoneyType' in type %}
{% set classname = class_name(entity) %}
{% if entity is null %}
{{ value }}
@@ -325,11 +325,11 @@
{% else %}
{{ value }}
{% endif %}
{% elseif '\\TextareaType' in type %}
{% elseif 'TextareaType' in type %}
{{ value|nl2br }}
{% elseif '\\EmailType' in type %}
{% elseif 'EmailType' in type %}
<a href="mailto:{{ value }}">{{ value }}</a>
{% elseif '\\UrlType' in type %}
{% elseif 'UrlType' in type %}
<a href="{{ value }}" target="_blank">{{ value }}</a>
{% else %}
{{ value }}

View File

@@ -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 %}
&ndash;
{% 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 %}
&ndash;
{% 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>

View File

@@ -1,147 +1,157 @@
{% extends 'invoice/layout.html.twig' %}
{% set language = model.template.language|default(app.request.locale) %}
{% set isDecimal = model.template.decimalDuration|default(false) %}
<!DOCTYPE html>
{% set fallback = app.request is not null ? app.request.locale : 'en' %}
{% set language = model.template.language|default(fallback) %}
{% set currency = model.currency %}
{% block invoice %}
<div class="row">
<div class="col-xs-12">
<h2 class="page-header">
<span contenteditable="true">{{ model.template.title }}</span>
<small class="pull-right">{{ 'date'|trans({}, 'messages', language) }}: {{ model.invoiceDate|date_short }}</small>
</h2>
</div>
</div>
<div class="row">
<div class="col-sm-5">
{{ 'invoice.from'|trans({}, 'messages', language) }}
<address contenteditable="true">
<strong>{{ model.template.company }}</strong><br>
{{ model.template.address|trim|nl2br }}
{% if model.template.vatId is not empty %}
<br>
{{ 'vat_id'|trans({}, 'messages', language) }}:
{{ model.template.vatId }}
{% endif %}
</address>
</div>
<div class="col-sm-2"></div>
<div class="col-sm-5">
{{ 'invoice.to'|trans({}, 'messages', language) }}
<address contenteditable="true">
<strong>{{ model.customer.company|default(model.customer.name) }}</strong><br>
{{ model.customer.address|nl2br }}
{% if model.customer.vatId is not empty %}
<br>
{{ 'vat_id'|trans({}, 'messages', language) }}: {{ model.customer.vatId }}
{% endif %}
{% if model.customer.number is not empty %}
<br>
{{ 'number'|trans({}, 'messages', language) }}: {{ model.customer.number }}
{% endif %}
{% if model.query.project is not empty and model.query.project.orderNumber is not empty %}
<br>
{{ 'orderNumber'|trans({}, 'messages', language) }}: {{ model.query.project.orderNumber }}
{% endif %}
</address>
</div>
</div>
<div class="row">
<div class="col-sm-5">
<p contenteditable="true">
<strong>{{ 'invoice.number'|trans({}, 'messages', language) }}:</strong>
{{ model.invoiceNumber }}
<br>
<strong>{{ 'invoice.due_days'|trans({}, 'messages', language) }}:</strong>
{{ model.dueDate|date_short }}
</p>
</div>
<div class="col-sm-7"></div>
</div>
<div class="row invoice-items">
<div class="col-xs-12 table-responsive">
<table class="table">
<thead>
<tr>
<th>{{ 'date'|trans({}, 'messages', language) }}</th>
<th>{{ 'description'|trans({}, 'messages', language) }}</th>
<th class="text-right">{{ 'unit_price'|trans({}, 'messages', language) }}</th>
<th class="text-right">{{ 'amount'|trans({}, 'messages', language) }}</th>
<th class="text-right">{{ 'total_rate'|trans({}, 'messages', language) }}</th>
</tr>
</thead>
<tbody>
{% for entry in model.calculator.entries %}
{% set duration = entry.duration|duration(isDecimal) %}
{% if entry.fixedRate %}
{% set rate = entry.fixedRate %}
{% set duration = entry.amount|amount %}
{% else %}
{% set rate = entry.hourlyRate %}
{% endif %}
<tr>
<td nowrap class="text-nowrap">{{ entry.begin|date_short }}</td>
<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 nowrap class="text-nowrap text-right">{{ rate|money(currency) }}</td>
<td nowrap class="text-nowrap text-right">{{ duration }}</td>
<td nowrap class="text-nowrap text-right">{{ entry.rate|money(currency) }}</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<td colspan="4" class="text-right">
{{ 'invoice.subtotal'|trans({}, 'messages', language) }}
</td>
<td class="text-right">{{ model.calculator.subtotal|money(currency) }}</td>
</tr>
<tr>
<td colspan="4" class="text-right">
{{ 'invoice.tax'|trans({}, 'messages', language) }} ({{ model.calculator.vat }}%)
</td>
<td class="text-right">{{ model.calculator.tax|money(currency) }}</td>
</tr>
<tr>
<td colspan="4" class="text-right text-nowrap">
<strong>{{ 'invoice.total'|trans({}, 'messages', language) }}</strong>
</td>
<td class="text-right">
<strong>{{ model.calculator.total|money(currency) }}</strong>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
<div class="row">
<div class="col-xs-12">
{% if model.template.paymentTerms is not empty %}
<div contenteditable="true" class="paymentTerms">
{{ model.template.paymentTerms|nl2br|md2html }}
<html lang="{{ language }}">
<head>
<meta charset="utf-8">
<style type="text/css">
{{ encore_entry_css_source('invoice')|raw }}
</style>
</head>
<body class="invoice_print">
<div class="wrapper">
<section class="invoice">
<div class="row">
<div class="col-xs-12">
<h2 class="page-header">
<span contenteditable="true">{{ model.template.title }}</span>
<small class="pull-right">{{ 'date'|trans({}, 'messages', language) }}: {{ model.invoiceDate|date_short }}</small>
</h2>
</div>
</div>
{% endif %}
</div>
<div class="row">
<div class="col-sm-5">
{{ 'invoice.from'|trans({}, 'messages', language) }}
<address contenteditable="true">
<strong>{{ model.template.company }}</strong><br>
{{ model.template.address|trim|nl2br }}
{% if model.template.vatId is not empty %}
<br>
{{ 'vat_id'|trans({}, 'messages', language) }}:
{{ model.template.vatId }}
{% endif %}
</address>
</div>
<div class="col-sm-2"></div>
<div class="col-sm-5">
{{ 'invoice.to'|trans({}, 'messages', language) }}
<address contenteditable="true">
<strong>{{ model.customer.company|default(model.customer.name) }}</strong><br>
{{ model.customer.address|nl2br }}
{% if model.customer.vatId is not empty %}
<br>
{{ 'vat_id'|trans({}, 'messages', language) }}: {{ model.customer.vatId }}
{% endif %}
{% if model.customer.number is not empty %}
<br>
{{ 'number'|trans({}, 'messages', language) }}: {{ model.customer.number }}
{% endif %}
{% if model.query.project is not empty and model.query.project.orderNumber is not empty %}
<br>
{{ 'orderNumber'|trans({}, 'messages', language) }}: {{ model.query.project.orderNumber }}
{% endif %}
</address>
</div>
</div>
<div class="row">
<div class="col-sm-5">
<p contenteditable="true">
<strong>{{ 'invoice.number'|trans({}, 'messages', language) }}:</strong>
{{ model.invoiceNumber }}
<br>
<strong>{{ 'invoice.due_days'|trans({}, 'messages', language) }}:</strong>
{{ model.dueDate|date_short }}
</p>
</div>
<div class="col-sm-7"></div>
</div>
<div class="row invoice-items">
<div class="col-xs-12 table-responsive">
<table class="table">
<thead>
<tr>
<th>{{ 'date'|trans({}, 'messages', language) }}</th>
<th>{{ 'description'|trans({}, 'messages', language) }}</th>
<th class="text-right">{{ 'unit_price'|trans({}, 'messages', language) }}</th>
<th class="text-right">{{ 'amount'|trans({}, 'messages', language) }}</th>
<th class="text-right">{{ 'total_rate'|trans({}, 'messages', language) }}</th>
</tr>
</thead>
<tbody>
{% for entry in model.calculator.entries %}
{% set duration = entry.duration|duration(true) %}
{% if entry.fixedRate %}
{% set rate = entry.fixedRate %}
{% set duration = entry.amount|amount %}
{% else %}
{% set rate = entry.hourlyRate %}
{% endif %}
<tr>
<td nowrap class="text-nowrap">{{ entry.begin|date_short }}</td>
<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 nowrap class="text-nowrap text-right">{{ rate|money(currency) }}</td>
<td nowrap class="text-nowrap text-right">{{ duration }}</td>
<td nowrap class="text-nowrap text-right">{{ entry.rate|money(currency) }}</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<td colspan="4" class="text-right">
{{ 'invoice.subtotal'|trans({}, 'messages', language) }}
</td>
<td class="text-right">{{ model.calculator.subtotal|money(currency) }}</td>
</tr>
<tr>
<td colspan="4" class="text-right">
{{ 'invoice.tax'|trans({}, 'messages', language) }} ({{ model.calculator.vat }}%)
</td>
<td class="text-right">{{ model.calculator.tax|money(currency) }}</td>
</tr>
<tr>
<td colspan="4" class="text-right text-nowrap">
<strong>{{ 'invoice.total'|trans({}, 'messages', language) }}</strong>
</td>
<td class="text-right">
<strong>{{ model.calculator.total|money(currency) }}</strong>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
<div class="row">
<div class="col-xs-12">
{% if model.template.paymentTerms is not empty %}
<div contenteditable="true" class="paymentTerms">
{{ model.template.paymentTerms|nl2br|md2html }}
</div>
{% endif %}
</div>
</div>
<footer class="footer">
<p>
<strong>{{ 'address'|trans({}, 'messages', language) }}</strong>: {{ model.template.company }} &ndash; {{ model.template.address|replace({"\n": ' &ndash; ', "\r\n": ' &ndash; ', "\r": ' &ndash; '})|raw }}
<br>
<strong>{{ 'invoice_bank_account'|trans({}, 'messages', language) }}</strong>: {{ model.template.paymentDetails|replace({"\n": ' &ndash; ', "\r\n": ' &ndash; ', "\r": ' &ndash; '})|raw }}
<br>
<strong>{{ 'contact'|trans({}, 'messages', language) }}</strong>: {{ model.template.contact|replace({"\n": ' &ndash; ', "\r\n": ' &ndash; ', "\r": ' &ndash; '})|raw }}
</p>
</footer>
</section>
</div>
<footer class="footer">
<p>
<strong>{{ 'address'|trans({}, 'messages', language) }}</strong>: {{ model.template.company }} &ndash; {{ model.template.address|replace({"\n": ' &ndash; ', "\r\n": ' &ndash; ', "\r": ' &ndash; '})|raw }}
<br>
<strong>{{ 'invoice_bank_account'|trans({}, 'messages', language) }}</strong>: {{ model.template.paymentDetails|replace({"\n": ' &ndash; ', "\r\n": ' &ndash; ', "\r": ' &ndash; '})|raw }}
<br>
<strong>{{ 'contact'|trans({}, 'messages', language) }}</strong>: {{ model.template.contact|replace({"\n": ' &ndash; ', "\r\n": ' &ndash; ', "\r": ' &ndash; '})|raw }}
</p>
</footer>
{% endblock %}
</body>
</html>

View File

@@ -18,10 +18,6 @@
<source>service-date</source>
<target>مستقل</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target>HTML (للطباعة عبر المتصفح)</target>
</trans-unit>
<trans-unit id="N6juwc4" resname="default">
<source>default</source>
<target>فاتورة</target>

View File

@@ -26,10 +26,6 @@
<source>programmatic</source>
<target state="translated">K dalšímu zpracování</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target state="translated">HTMP (pro tisk pomocí prohlížeče)</target>
</trans-unit>
<trans-unit id="N6juwc4" resname="default">
<source>default</source>
<target state="translated">Faktura</target>

View File

@@ -19,10 +19,6 @@
<source>programmatic</source>
<target>Zur Weiterverarbeitung</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target>HTML (zum Drucken via Browser)</target>
</trans-unit>
<!-- Renderer -->
<trans-unit id="Utbj3k_" resname="invoice">
<source>invoice</source>

View File

@@ -15,10 +15,6 @@
<source>programmatic</source>
<target state="translated">Για περαιτέρω επεξεργασία</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target state="translated">HTML (για εκτύπωση μέσω προγράμματος περιήγησης)</target>
</trans-unit>
<!-- Renderer -->
<trans-unit id="Utbj3k_" resname="invoice">
<source>invoice</source>

View File

@@ -19,10 +19,6 @@
<source>programmatic</source>
<target>For further processing</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target>HTML (for printing via Browser)</target>
</trans-unit>
<!-- Renderer -->
<trans-unit id="Utbj3k_" resname="invoice">
<source>invoice</source>

View File

@@ -26,10 +26,6 @@
<source>programmatic</source>
<target state="translated">Para su procesamiento posterior</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target state="translated">HTML (impresión por Navegador)</target>
</trans-unit>
<trans-unit id="N6juwc4" resname="default">
<source>default</source>
<target state="translated">Factura</target>

View File

@@ -15,10 +15,6 @@
<source>programmatic</source>
<target state="translated">برای پردازش بیشتر</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target state="translated">HTML (برای چاپ از طریق مرورگر)</target>
</trans-unit>
<!-- Renderer -->
<trans-unit id="Utbj3k_" resname="invoice">
<source>invoice</source>

View File

@@ -15,10 +15,6 @@
<source>programmatic</source>
<target state="translated">Jatko käsittelyä varten</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target state="translated">HTML (tulostukseen selaimen kautta)</target>
</trans-unit>
<!-- Renderer -->
<trans-unit id="Utbj3k_" resname="invoice">
<source>invoice</source>

View File

@@ -18,10 +18,6 @@
<source>service-date</source>
<target>Freelancer</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target>HTML (pour l'impression via le navigateur)</target>
</trans-unit>
<trans-unit id="7mEUv6C" resname="help.upload">
<source>help.upload</source>
<target>Attention : les fichiers existants seront écrasés. Les types de fichiers autorisés sont : %extensions%.</target>

View File

@@ -26,10 +26,6 @@
<source>programmatic</source>
<target>לעיבוד נוסף</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target>HTML (להדפסה דרך הדפדפן)</target>
</trans-unit>
<trans-unit id="N6juwc4" resname="default">
<source>default</source>
<target>חשבונית</target>

View File

@@ -15,10 +15,6 @@
<source>programmatic</source>
<target>Za daljnju obradu</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target>HTML (za ispis putem preglednika)</target>
</trans-unit>
<!-- Renderer -->
<trans-unit id="Utbj3k_" resname="invoice">
<source>invoice</source>

View File

@@ -26,10 +26,6 @@
<source>programmatic</source>
<target>További feldolgozáshoz</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target>HTML (böngészőn keresztüli nyomtatáshoz)</target>
</trans-unit>
<trans-unit id="N6juwc4" resname="default">
<source>default</source>
<target>Számla</target>

View File

@@ -22,10 +22,6 @@
<source>help.upload</source>
<target>주의: 기존 파일을 덮어씁니다. 허용되는 파일 형식은 %extensions%입니다.</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target>HTML (브라우저를 통한 인쇄용)</target>
</trans-unit>
<trans-unit id="mC2ePrm" resname="text">
<source>text</source>
<target>텍스트</target>

View File

@@ -15,10 +15,6 @@
<source>programmatic</source>
<target>For videre behandling</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target>HTML (for utskrift via nettleser)</target>
</trans-unit>
<!-- Renderer -->
<trans-unit id="Utbj3k_" resname="invoice">
<source>invoice</source>

View File

@@ -15,10 +15,6 @@
<source>programmatic</source>
<target>Voor verdere verwerking</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target>HTML (voor afdrukken via de Browser)</target>
</trans-unit>
<!-- Renderer -->
<trans-unit id="Utbj3k_" resname="invoice">
<source>invoice</source>

View File

@@ -26,10 +26,6 @@
<source>programmatic</source>
<target state="translated">Do dalszego przetwarzania</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target state="translated">HTML (do wydruku przez przeglądarkę)</target>
</trans-unit>
<trans-unit id="N6juwc4" resname="default">
<source>default</source>
<target state="translated">Faktura</target>

View File

@@ -15,10 +15,6 @@
<source>programmatic</source>
<target state="translated">Para processamento posterior</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target state="translated">HTML (para impressão via navegador web)</target>
</trans-unit>
<!-- Renderer -->
<trans-unit id="Utbj3k_" resname="invoice">
<source>invoice</source>

View File

@@ -22,10 +22,6 @@
<source>help.upload</source>
<target>Atenção: os arquivos já existentes serão substituídos. Os tipos dos arquivos permitidos são: %extensions%.</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target>HTML (para impressão via navegador)</target>
</trans-unit>
<trans-unit id="E5BwZHT" resname="programmatic">
<source>programmatic</source>
<target>Para processamento posterior</target>

View File

@@ -26,10 +26,6 @@
<source>programmatic</source>
<target>Pentru prelucrare ulterioară</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target>HTML (pentru imprimare prin browser)</target>
</trans-unit>
<trans-unit id="N6juwc4" resname="default">
<source>default</source>
<target>Factură</target>

View File

@@ -26,10 +26,6 @@
<source>programmatic</source>
<target state="translated">För ytterligare bearbetning</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target state="translated">HTML (för utskrift från webbläsare)</target>
</trans-unit>
<trans-unit id="N6juwc4" resname="default">
<source>default</source>
<target state="translated">Faktura</target>

View File

@@ -30,10 +30,6 @@
<source>help.upload</source>
<target>Dikkat: mevcut dosyaların üzerine yazılacaktır. İzin verilen dosya türleri: %extensions%.</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target>HTML (Tarayıcı ile yazdırmak için)</target>
</trans-unit>
<trans-unit id="mC2ePrm" resname="text">
<source>text</source>
<target>Metin</target>

View File

@@ -15,10 +15,6 @@
<source>programmatic</source>
<target state="translated">Для подальшої обробки</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target state="translated">HTML (для друку через браузер)</target>
</trans-unit>
<!-- Renderer -->
<trans-unit id="Utbj3k_" resname="invoice">
<source>invoice</source>

View File

@@ -26,10 +26,6 @@
<source>programmatic</source>
<target state="translated">Để xử lý thêm</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target state="translated">HTML (Để in qua Trình duyệt)</target>
</trans-unit>
<trans-unit id="N6juwc4" resname="default">
<source>default</source>
<target state="translated">Hóa đơn</target>

View File

@@ -18,10 +18,6 @@
<source>service-date</source>
<target>兼职人员</target>
</trans-unit>
<trans-unit id="nA.KOyM" resname="Html">
<source>Html</source>
<target state="translated">HTML用于通过浏览器打印</target>
</trans-unit>
<trans-unit id="N6juwc4" resname="default">
<source>default</source>
<target state="translated">发票</target>

View File

@@ -58,10 +58,6 @@
<source>tasks.my</source>
<target state="translated">مهامي</target>
</trans-unit>
<trans-unit id="bnCqljW" resname="task.delete" xml:space="preserve" approved="no">
<source>task.delete</source>
<target state="translated">هل تريد حذف المهمة؟ لن يتم حذف سجلات الوقت!</target>
</trans-unit>
<trans-unit id="WCaBimL" resname="task.help.end" xml:space="preserve" approved="no">
<source>task.help.end</source>
<target state="translated">يجب إنجاز المهمة إلى غاية هذا التاريخ</target>

View File

@@ -94,10 +94,6 @@
<source>tasks.pending</source>
<target state="translated">Nevyřízené úkoly</target>
</trans-unit>
<trans-unit id="bnCqljW" resname="task.delete" xml:space="preserve" approved="no">
<source>task.delete</source>
<target state="translated">Smazat úkol? Časové záznamy nebudou smazány!</target>
</trans-unit>
<trans-unit id="taZkyYV" resname="task.help.user" xml:space="preserve" approved="no">
<source>task.help.user</source>
<target state="translated">Přiřaďte tuto úlohu uživateli</target>

View File

@@ -53,10 +53,6 @@
<source>tasks.my</source>
<target>Meine Aufgaben</target>
</trans-unit>
<trans-unit id="bnCqljW" resname="task.delete">
<source>task.delete</source>
<target>Aufgabe löschen? Aufgezeichnete Zeiten werden nicht gelöscht!</target>
</trans-unit>
<trans-unit id="FhEb.Hn" resname="task.help.title">
<source>task.help.title</source>
<target>Eine kurze Beschreibung der Aufgabe</target>

View File

@@ -53,10 +53,6 @@
<source>tasks.my</source>
<target>My tasks</target>
</trans-unit>
<trans-unit id="bnCqljW" resname="task.delete">
<source>task.delete</source>
<target>Delete task? Time records will not be deleted!</target>
</trans-unit>
<trans-unit id="FhEb.Hn" resname="task.help.title">
<source>task.help.title</source>
<target>A short description of the task</target>

View File

@@ -78,10 +78,6 @@
<source>task.help.title</source>
<target state="translated">Una breve descripción de la tarea</target>
</trans-unit>
<trans-unit id="bnCqljW" resname="task.delete" xml:space="preserve" approved="no">
<source>task.delete</source>
<target state="translated">¿Eliminar tarea? ¡Los registros de tiempo no se borrarán!</target>
</trans-unit>
<trans-unit id="taZkyYV" resname="task.help.user" xml:space="preserve" approved="no">
<source>task.help.user</source>
<target state="translated">Asignar esta tarea a un usuario</target>

View File

@@ -53,10 +53,6 @@
<source>tasks.my</source>
<target>Tehtäväni</target>
</trans-unit>
<trans-unit id="bnCqljW" resname="task.delete">
<source>task.delete</source>
<target>Poista tehtävä? Työaikoja ei poisteta!</target>
</trans-unit>
<trans-unit id="FhEb.Hn" resname="task.help.title">
<source>task.help.title</source>
<target>Lyhyt kuvaus tehtävälle</target>

View File

@@ -53,10 +53,6 @@
<source>tasks.my</source>
<target>Mes tâches</target>
</trans-unit>
<trans-unit id="bnCqljW" resname="task.delete">
<source>task.delete</source>
<target>Effacer la tâche? Les temps assignés ne seront pas supprimés!</target>
</trans-unit>
<trans-unit id="FhEb.Hn" resname="task.help.title">
<source>task.help.title</source>
<target>Une description courte de la tâche</target>

View File

@@ -53,10 +53,6 @@
<source>tasks.my</source>
<target state="translated">המשימות שלי</target>
</trans-unit>
<trans-unit id="bnCqljW" resname="task.delete" xml:space="preserve" approved="no">
<source>task.delete</source>
<target state="translated">למחוק משימה? רשומות השעות לא תימחקנה!</target>
</trans-unit>
<trans-unit id="FhEb.Hn" resname="task.help.title" xml:space="preserve" approved="no">
<source>task.help.title</source>
<target state="translated">תיאור קצר של המשימה</target>

View File

@@ -50,10 +50,6 @@
<source>task.assign</source>
<target state="translated">Tildel til meg</target>
</trans-unit>
<trans-unit id="bnCqljW" resname="task.delete" xml:space="preserve" approved="no">
<source>task.delete</source>
<target state="needs-translation">Slett gjøremål? Tidssedelene vil ikke bli slettet.</target>
</trans-unit>
<trans-unit id="WCaBimL" resname="task.help.end" xml:space="preserve" approved="no">
<source>task.help.end</source>
<target state="translated">Gjøremålet må utføres før denne datoen</target>

View File

@@ -73,10 +73,6 @@
<source>task.widget_rows</source>
<target state="translated">Quantidade de tarefas por página na ferramenta do painel</target>
</trans-unit>
<trans-unit id="bnCqljW" resname="task.delete" xml:space="preserve" approved="no">
<source>task.delete</source>
<target state="translated">Excluir a tarefa? Os registros de tempo não serão apagados!</target>
</trans-unit>
<trans-unit id="ZCSPtzc" resname="task.help.estimation" xml:space="preserve" approved="no">
<source>task.help.estimation</source>
<target state="translated">Tempo necessário estimado para completar a tarefa em hh:mm</target>

View File

@@ -18,10 +18,6 @@
<source>task.stop</source>
<target state="translated">İşlemeyi duraklat</target>
</trans-unit>
<trans-unit id="bnCqljW" resname="task.delete" xml:space="preserve" approved="no">
<source>task.delete</source>
<target state="translated">Görev silinsin mi? Zaman kayıtları silinmeyecektir!</target>
</trans-unit>
<trans-unit id="s6YOYaU" resname="Tasks" xml:space="preserve" approved="no">
<source>Tasks</source>
<target state="translated">Görevler</target>