{% extends 'base.html.twig' %} {% import "macros/widgets.html.twig" as widgets %} {% import "customer/actions.html.twig" as actions %} {% block page_actions %}{{ actions.customer(customer, 'details') }}{% endblock %} {% block page_title %}{{ 'admin_customer.title'|trans }}{% endblock %} {% block main %} {% set can_edit = is_granted('edit', customer) %} {% embed '@AdminLTE/Widgets/box-widget.html.twig' %} {% import "macros/widgets.html.twig" as widgets %} {% block box_attributes %}id="customer_details_box"{% endblock %} {% block box_title %} {{ widgets.label_customer(customer) }} {% if customer.company is not empty %} – {{ customer.company }}{% endif %} {% endblock %} {% block box_tools %} {% if can_edit %} {% endif %} {% endblock %} {% block box_body %} {% if customer.comment is not empty %} {{ customer.comment|comment2html(true) }} {% endif %} {% if not customer.visible %} {% endif %} {% if customer.address is not empty %} {% endif %} {% if customer.contact is not empty %} {% endif %} {% if customer.phone is not empty %} {% endif %} {% if customer.mobile is not empty %} {% endif %} {% if customer.email is not empty %} {% endif %} {% if customer.homepage is not empty %} {% endif %} {% if customer.fax is not empty %} {% endif %} {% if customer.timezone is not empty %} {% endif %} {% if customer.currency is not empty %} {% endif %} {% if is_granted('details', customer) %} {% if customer.number is not empty %} {% endif %} {% if customer.vatId is not empty %} {% endif %} {% if can_edit %} {% endif %} {% for metaField in customer.visibleMetaFields %} {% endfor %} {% endif %}
{{ 'label.visible'|trans }} {{ widgets.label_boolean(customer.visible) }}
{{ 'label.address'|trans }} {{ customer.address|nl2br }} {% if customer.country is not empty %}
{{ customer.country|country }} {% endif %}
{{ 'label.contact'|trans }} {{ customer.contact }}
{{ 'label.phone'|trans }} {{ customer.phone }}
{{ 'label.mobile'|trans }} {{ customer.mobile }}
{{ 'label.email'|trans }} {{ customer.email }}
{{ 'label.homepage'|trans }} {{ customer.homepage|replace({'https://': '', 'http://': ''}) }}
{{ 'label.fax'|trans }} {{ customer.fax }}
{{ 'label.timezone'|trans }} {{ now|date_full(false) }}
{{ 'label.currency'|trans }} {{ customer.currency }}
{{ 'label.number'|trans }} {{ customer.number }}
{{ 'label.vat_id'|trans }} {{ customer.vatId }}
{{ 'label.fixedRate'|trans }} {% if customer.fixedRate is not empty %} {{ customer.fixedRate|money(customer.currency) }} {% else %} – {% endif %}
{{ 'label.hourlyRate'|trans }} {% if customer.hourlyRate is not empty %} {{ customer.hourlyRate|money(customer.currency) }} {% else %} – {% endif %}
{{ metaField.label }} {{ widgets.form_type_value(metaField.type, metaField.value, customer) }}
{% endblock %} {% endembed %} {{ render(controller('App\\Controller\\CustomerController::projectsAction', {'customer': customer.id, 'page': 1})) }} {% if stats is not null %} {{ include('customer/embed_budget.html.twig', {'customer': customer, 'stats': stats}) }} {% endif %} {% if teams is not null %} {% set options = {'teams': teams, 'team': team} %} {% if is_granted('permissions', customer) %} {% set options = options|merge({'route_create': path('customer_team_create', {'id': customer.id}), 'route_edit': path('admin_customer_permissions', {'id': customer.id})}) %} {% endif %} {{ include('embeds/teams.html.twig', options) }} {% endif %} {% if comments is not null %} {% set options = {'form': commentForm, 'comments': comments} %} {% if can_edit %} {% set options = options|merge({'route_pin': 'customer_comment_pin', 'route_delete': 'customer_comment_delete'}) %} {% endif %} {{ include('embeds/comments.html.twig', options) }} {% endif %} {% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}