var/cache/dev/twig/22/226184b8b2e8e366567405a18e708e8e.php line 111
<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* app/payment/_table.html.twig */
class __TwigTemplate_9d864ff3c78cde1a33f65d9cefec6cb2 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "app/payment/_table.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "app/payment/_table.html.twig"));
// line 1
echo "<table
id=\"datatable\"
class=\"table table-bordered dt-responsive nowrap w-100\"
data-controller=\"payment\"
>
<thead>
<tr>
<th>#</th>
<th>";
// line 9
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Payé par", [], "messages");
echo "</th>
<th>";
// line 10
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Abonnement", [], "messages");
echo "</th>
<th>";
// line 11
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Date", [], "messages");
echo "</th>
<th>";
// line 12
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Montant", [], "messages");
echo "</th>
<th>";
// line 13
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Collecté par", [], "messages");
echo "</th>
<th width=\"220px\">";
// line 14
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Actions", [], "messages");
echo "</th>
</tr>
</thead>
<tbody>
";
// line 18
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["payments"]) || array_key_exists("payments", $context) ? $context["payments"] : (function () { throw new RuntimeError('Variable "payments" does not exist.', 18, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["payment"]) {
// line 19
echo " <tr>
<th scope=\"row\">
";
// line 21
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 21), "html", null, true);
echo "
</th>
<td>
<div class=\"d-flex align-items-center\">
<div class=\"flex-shrink-0 me-3\">
<img
class=\"rounded-circle avatar-md\"
src=\"";
// line 28
((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["payment"], "payedBy", [], "any", false, false, false, 28), "photo", [], "any", false, false, false, 28)) ? (print (twig_escape_filter($this->env, ("/uploads/family_members/" . twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["payment"], "payedBy", [], "any", false, false, false, 28), "photo", [], "any", false, false, false, 28)), "html", null, true))) : (print ("/front/images/family.png")));
echo "\"
alt=\"";
// line 29
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["payment"], "payedBy", [], "any", false, false, false, 29), "firstName", [], "any", false, false, false, 29), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 30
$context["payment"], "payedBy", [], "any", false, false, false, 30), "lastName", [], "any", false, false, false, 30), "html", null, true);
// line 31
echo "\"
/>
</div>
<div class=\"flex-grow-1\">
<a
href=\"";
// line 36
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_family_member_show", ["id" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 37
$context["payment"], "payedBy", [], "any", false, false, false, 37), "id", [], "any", false, false, false, 37)]), "html", null, true);
// line 38
echo "\"
>
<h5 class=\"font-size-14 mb-0\">
";
// line 41
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["payment"], "payedBy", [], "any", false, false, false, 41), "firstName", [], "any", false, false, false, 41), "html", null, true);
echo "
";
// line 42
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["payment"], "payedBy", [], "any", false, false, false, 42), "lastName", [], "any", false, false, false, 42), "html", null, true);
echo "
</h5>
</a>
</div>
</div>
</td>
<td>
";
// line 51
((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["payment"], "subscription", [], "any", false, false, false, 51), "service", [], "any", false, false, false, 51)) ? (print (twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["payment"], "subscription", [], "any", false, false, false, 51), "service", [], "any", false, false, false, 51), "name", [], "any", false, false, false, 51), "html", null, true))) : (print ("")));
// line 52
echo "
-
";
// line 57
((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 55
$context["payment"], "subscription", [], "any", false, false, false, 55), "service", [], "any", false, false, false, 55)) ? (print (twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 56
$context["payment"], "subscription", [], "any", false, false, false, 56), "service", [], "any", false, false, false, 56), "duration", [], "any", false, false, false, 56), "html", null, true))) : (print ("")));
// line 58
echo "
";
// line 59
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Jours", [], "messages");
// line 60
echo " <br />
<b> ";
// line 61
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Prix", [], "messages");
echo " : </b>
<span class=\"text-info\"
>";
// line 63
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["payment"], "subscription", [], "any", false, false, false, 63), "total", [], "any", false, false, false, 63), 0, ".", " "), "html", null, true);
echo "
";
// line 64
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["company"]) || array_key_exists("company", $context) ? $context["company"] : (function () { throw new RuntimeError('Variable "company" does not exist.', 64, $this->source); })()), "currencie", [], "any", false, false, false, 64), "html", null, true);
echo "
</span>
/
<b> ";
// line 67
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Remise", [], "messages");
echo " : </b>
<span class=\"text-info\"
>";
// line 69
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["payment"], "subscription", [], "any", false, false, false, 69), "discount", [], "any", false, false, false, 69), 0, ".", " "), "html", null, true);
echo "
";
// line 70
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["company"]) || array_key_exists("company", $context) ? $context["company"] : (function () { throw new RuntimeError('Variable "company" does not exist.', 70, $this->source); })()), "currencie", [], "any", false, false, false, 70), "html", null, true);
echo "
</span>
</td>
<td>
";
// line 74
((twig_get_attribute($this->env, $this->source, $context["payment"], "date", [], "any", false, false, false, 74)) ? (print (twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["payment"], "date", [], "any", false, false, false, 74), "d-m-Y"), "html", null, true))) : (print ("")));
echo "
</td>
<td>
<b> ";
// line 77
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Total", [], "messages");
echo " : </b>
<span class=\"text-info\"
>";
// line 79
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["payment"], "amount", [], "any", false, false, false, 79), "html", null, true);
echo "
";
// line 80
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["company"]) || array_key_exists("company", $context) ? $context["company"] : (function () { throw new RuntimeError('Variable "company" does not exist.', 80, $this->source); })()), "currencie", [], "any", false, false, false, 80), "html", null, true);
echo "
</span>
<br />
</td>
<td>
";
// line 85
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["payment"], "createdBy", [], "any", false, false, false, 85), "html", null, true);
echo "
</td>
<td>
<a
data-action=\"payment#edit\"
data-payment-id=\"";
// line 90
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["payment"], "id", [], "any", false, false, false, 90), "html", null, true);
echo "\"
href=\"javascript:void(0)\"
class=\"btn btn-info waves-effect waves-light me-2\"
data-toggle=\"tooltip\"
data-placement=\"top\"
title=\"";
// line 95
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Modifier"), "html", null, true);
echo "\"
>
<i class=\"bx bx-edit font-size-16 align-middle\"></i>
</a>
<a
data-action=\"payment#del\"
data-payment-id=\"";
// line 102
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["payment"], "id", [], "any", false, false, false, 102), "html", null, true);
echo "\"
data-payment-token=\"";
// line 103
echo twig_escape_filter($this->env, $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderCsrfToken(("delete" . twig_get_attribute($this->env, $this->source, $context["payment"], "id", [], "any", false, false, false, 103))), "html", null, true);
echo "\"
href=\"javascript:void(0)\"
class=\"btn btn-danger waves-effect waves-light me-2\"
data-toggle=\"tooltip\"
data-placement=\"top\"
title=\"";
// line 108
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Supprimer"), "html", null, true);
echo "\"
>
<i class=\"bx bx-trash font-size-16 align-middle\"></i>
</a>
";
// line 137
echo " </td>
</tr>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['payment'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 140
echo " </tbody>
</table>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "app/payment/_table.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 283 => 140, 267 => 137, 260 => 108, 252 => 103, 248 => 102, 238 => 95, 230 => 90, 222 => 85, 214 => 80, 210 => 79, 205 => 77, 199 => 74, 192 => 70, 188 => 69, 183 => 67, 177 => 64, 173 => 63, 168 => 61, 165 => 60, 163 => 59, 160 => 58, 158 => 56, 157 => 55, 156 => 57, 152 => 52, 150 => 51, 139 => 42, 135 => 41, 130 => 38, 128 => 37, 127 => 36, 120 => 31, 118 => 30, 115 => 29, 111 => 28, 101 => 21, 97 => 19, 80 => 18, 73 => 14, 69 => 13, 65 => 12, 61 => 11, 57 => 10, 53 => 9, 43 => 1,);
}
public function getSourceContext()
{
return new Source("<table
id=\"datatable\"
class=\"table table-bordered dt-responsive nowrap w-100\"
data-controller=\"payment\"
>
<thead>
<tr>
<th>#</th>
<th>{% trans %} Payé par {% endtrans %}</th>
<th>{% trans %} Abonnement {% endtrans %}</th>
<th>{% trans %} Date {% endtrans %}</th>
<th>{% trans %} Montant {% endtrans %}</th>
<th>{% trans %} Collecté par {% endtrans %}</th>
<th width=\"220px\">{% trans %} Actions {% endtrans %}</th>
</tr>
</thead>
<tbody>
{% for payment in payments %}
<tr>
<th scope=\"row\">
{{ loop.index }}
</th>
<td>
<div class=\"d-flex align-items-center\">
<div class=\"flex-shrink-0 me-3\">
<img
class=\"rounded-circle avatar-md\"
src=\"{{ payment.payedBy.photo ? '/uploads/family_members/' ~ payment.payedBy.photo : '/front/images/family.png' }}\"
alt=\"{{ payment.payedBy.firstName }} {{
payment.payedBy.lastName
}}\"
/>
</div>
<div class=\"flex-grow-1\">
<a
href=\"{{
path('app_family_member_show', { id: payment.payedBy.id })
}}\"
>
<h5 class=\"font-size-14 mb-0\">
{{ payment.payedBy.firstName }}
{{ payment.payedBy.lastName }}
</h5>
</a>
</div>
</div>
</td>
<td>
{{
payment.subscription.service ? payment.subscription.service.name : \"\"
}}
-
{{
payment.subscription.service
? payment.subscription.service.duration
: \"\"
}}
{% trans %} Jours {% endtrans %}
<br />
<b> {% trans %} Prix {% endtrans %} : </b>
<span class=\"text-info\"
>{{ payment.subscription.total|number_format(0, '.', ' ') }}
{{ company.currencie }}
</span>
/
<b> {% trans %} Remise {% endtrans %} : </b>
<span class=\"text-info\"
>{{ payment.subscription.discount|number_format(0, '.', ' ') }}
{{ company.currencie }}
</span>
</td>
<td>
{{ payment.date ? payment.date|date('d-m-Y') : '' }}
</td>
<td>
<b> {% trans %} Total {% endtrans %} : </b>
<span class=\"text-info\"
>{{ payment.amount }}
{{ company.currencie }}
</span>
<br />
</td>
<td>
{{ payment.createdBy }}
</td>
<td>
<a
data-action=\"payment#edit\"
data-payment-id=\"{{ payment.id }}\"
href=\"javascript:void(0)\"
class=\"btn btn-info waves-effect waves-light me-2\"
data-toggle=\"tooltip\"
data-placement=\"top\"
title=\"{{ 'Modifier' | trans }}\"
>
<i class=\"bx bx-edit font-size-16 align-middle\"></i>
</a>
<a
data-action=\"payment#del\"
data-payment-id=\"{{ payment.id }}\"
data-payment-token=\"{{ csrf_token('delete' ~ payment.id) }}\"
href=\"javascript:void(0)\"
class=\"btn btn-danger waves-effect waves-light me-2\"
data-toggle=\"tooltip\"
data-placement=\"top\"
title=\"{{ 'Supprimer' | trans }}\"
>
<i class=\"bx bx-trash font-size-16 align-middle\"></i>
</a>
{#
<form
style=\"display: contents\"
id=\"delete-form\"
method=\"post\"
action=\"{{ path('app_payment_delete', { id: payment.id }) }}\"
onclick=\"alertify.set('notifier','position', 'top-right'); alertify.confirm('Supprimer', 'Voulez-vous vraiment supprimer cet objet?', function(e){ document.getElementById('delete-form').submit(); }, function(){ alertify.error('Annuler')});\"
>
<input
type=\"hidden\"
name=\"_token\"
value=\"{{ csrf_token('delete' ~ payment.id) }}\"
/>
<a
href=\"javascript:void(0);\"
type=\"button\"
class=\"btn btn-danger waves-effect waves-light me-2\"
data-toggle=\"tooltip\"
data-placement=\"top\"
title=\"{{ 'Supprimer' | trans }}\"
>
<i class=\"bx bx-trash font-size-16 align-middle\"></i>
</a>
</form>
#}
</td>
</tr>
{% endfor %}
</tbody>
</table>
", "app/payment/_table.html.twig", "/var/www/clevernursery.com/templates/app/payment/_table.html.twig");
}
}