<?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;
/* clients/detail.html.twig */
class __TwigTemplate_17f715bd3993aac4e85e106b395e873e31080dd7f89dd87e4b80018ac0241eeb extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'headerStyles' => [$this, 'block_headerStyles'],
'content' => [$this, 'block_content'],
'footerScripts' => [$this, 'block_footerScripts'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "clients/detail.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "clients/detail.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "clients/detail.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 2
public function block_headerStyles($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "headerStyles"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "headerStyles"));
// line 3
echo " ";
$this->displayParentBlock("headerStyles", $context, $blocks);
echo "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 6
public function block_content($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 7
echo " <div class=\"page-content\">
<div class=\"page-breadcrumb d-none d-sm-flex align-items-center mb-3\">
<div class=\"breadcrumb-title pe-3\">Cliente: ";
// line 9
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, (isset($context["client"]) || array_key_exists("client", $context) ? $context["client"] : (function () { throw new RuntimeError('Variable "client" does not exist.', 9, $this->source); })()), "getName", [], "method", false, false, false, 9) . " ") . twig_get_attribute($this->env, $this->source, (isset($context["client"]) || array_key_exists("client", $context) ? $context["client"] : (function () { throw new RuntimeError('Variable "client" does not exist.', 9, $this->source); })()), "getSurname", [], "method", false, false, false, 9)), "html", null, true);
echo "</div>
<div class=\" d-sm-flex align-items-center ms-auto\">
</div>
<div class=\"ms-auto\">
</div>
</div>
<div class=\"row\">
<div class=\"col-md-4\">
<form action=\"";
// line 21
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("modifyClientData");
echo "?id=";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["client"]) || array_key_exists("client", $context) ? $context["client"] : (function () { throw new RuntimeError('Variable "client" does not exist.', 21, $this->source); })()), "getId", [], "method", false, false, false, 21), "html", null, true);
echo "\" method=\"POST\">
<div class=\"card\">
<div class=\"card-body p-4\">
<h5>Datos personales</h5>
<hr>
<div class=\"mb-3\">
<label for=\"inputProductTitle\" class=\"form-label\">Nombre del Cliente</label>
<input type=\"text\" class=\"form-control\" id=\"inputProductTitle\" name=\"name\" value=\"";
// line 28
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["client"]) || array_key_exists("client", $context) ? $context["client"] : (function () { throw new RuntimeError('Variable "client" does not exist.', 28, $this->source); })()), "getName", [], "method", false, false, false, 28), "html", null, true);
echo "\">
</div>
<div class=\"mb-3\">
<label for=\"surname\" class=\"form-label\">Apellidos del Cliente</label>
<input type=\"text\" class=\"form-control\" id=\"surname\" name=\"surname\" value=\"";
// line 32
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["client"]) || array_key_exists("client", $context) ? $context["client"] : (function () { throw new RuntimeError('Variable "client" does not exist.', 32, $this->source); })()), "getSurname", [], "method", false, false, false, 32), "html", null, true);
echo "\">
</div>
<div class=\"mb-3\">
<label for=\"email\" class=\"form-label\">Email del Cliente</label>
<input type=\"text\" class=\"form-control\" id=\"email\" name=\"email\" value=\"";
// line 36
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["client"]) || array_key_exists("client", $context) ? $context["client"] : (function () { throw new RuntimeError('Variable "client" does not exist.', 36, $this->source); })()), "getEmail", [], "method", false, false, false, 36), "html", null, true);
echo "\">
</div>
<div class=\"mb-3\">
<label for=\"nif\" class=\"form-label\">Nif / CIF del Cliente</label>
<input type=\"text\" class=\"form-control\" id=\"nif\" name=\"nif\" value=\"";
// line 40
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["client"]) || array_key_exists("client", $context) ? $context["client"] : (function () { throw new RuntimeError('Variable "client" does not exist.', 40, $this->source); })()), "getNif", [], "method", false, false, false, 40), "html", null, true);
echo "\">
</div>
<div class=\"mb-3\">
<label for=\"phone\" class=\"form-label\">Teléfono del Cliente</label>
<input type=\"text\" class=\"form-control\" id=\"phone\" name=\"phone\" value=\"";
// line 44
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["client"]) || array_key_exists("client", $context) ? $context["client"] : (function () { throw new RuntimeError('Variable "client" does not exist.', 44, $this->source); })()), "getPhone", [], "method", false, false, false, 44), "html", null, true);
echo "\">
</div>
</div>
</div>
<div class=\"card\">
<div class=\"card-body p-4\">
<h5>Dirección </h5>
<hr>
<div class=\"mb-3\">
<label for=\"address\" class=\"form-label\">Dirección</label>
<input type=\"text\" class=\"form-control\" id=\"address\" name=\"address\" value=\"";
// line 54
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["client"]) || array_key_exists("client", $context) ? $context["client"] : (function () { throw new RuntimeError('Variable "client" does not exist.', 54, $this->source); })()), "getAddress", [], "method", false, false, false, 54), "html", null, true);
echo "\">
</div>
<div class=\"mb-3\">
<label for=\"cp\" class=\"form-label\">Código postal</label>
<input type=\"text\" class=\"form-control\" id=\"cp\" name=\"cp\" value=\"";
// line 58
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["client"]) || array_key_exists("client", $context) ? $context["client"] : (function () { throw new RuntimeError('Variable "client" does not exist.', 58, $this->source); })()), "getCp", [], "method", false, false, false, 58), "html", null, true);
echo "\">
</div>
<div class=\"mb-3\">
<label for=\"city\" class=\"form-label\">Ciudad</label>
<input type=\"text\" class=\"form-control\" id=\"city\" name=\"city\" value=\"";
// line 62
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["client"]) || array_key_exists("client", $context) ? $context["client"] : (function () { throw new RuntimeError('Variable "client" does not exist.', 62, $this->source); })()), "getCity", [], "method", false, false, false, 62), "html", null, true);
echo "\">
</div>
<div class=\"mb-3\">
<label for=\"state\" class=\"form-label\">Província</label>
<input type=\"text\" class=\"form-control\" id=\"state\" name=\"state\" value=\"";
// line 66
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["client"]) || array_key_exists("client", $context) ? $context["client"] : (function () { throw new RuntimeError('Variable "client" does not exist.', 66, $this->source); })()), "getState", [], "method", false, false, false, 66), "html", null, true);
echo "\">
</div>
<div class=\"mb-3\">
<label for=\"country\" class=\"form-label\">País</label>
<input type=\"text\" class=\"form-control\" id=\"country\" name=\"country\" value=\"";
// line 70
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["client"]) || array_key_exists("client", $context) ? $context["client"] : (function () { throw new RuntimeError('Variable "client" does not exist.', 70, $this->source); })()), "getCountry", [], "method", false, false, false, 70), "html", null, true);
echo "\">
</div>
</div>
</div>
<div class=\"card\">
<div class=\"card-body p-4\">
<div class=\"d-grid\">
<button type=\"submit\" class=\"btn btn-primary btn-block\">Guardar cambios</button>
</div>
</div>
</div>
</form>
</div>
<div class=\"col-md-8\">
<div class=\"card\">
<div class=\"card-body p-4\">
<h5>Estadísticas y datos</h5>
<hr>
<div class=\"row row-cols-1 row-cols-md-2 row-cols-xl-4\">
<div class=\"col\">
<div class=\"card radius-10 border-start border-0 border-3 border-info\">
<div class=\"card-body\">
<div class=\"d-flex align-items-center\">
<div>
<p class=\"mb-0 text-secondary\">Total ventas</p>
<h4 class=\"my-1 text-info\">";
// line 95
echo twig_escape_filter($this->env, $this->extensions['App\Twig\outletExtension']->calculaVentaFunc(twig_get_attribute($this->env, $this->source, (isset($context["client"]) || array_key_exists("client", $context) ? $context["client"] : (function () { throw new RuntimeError('Variable "client" does not exist.', 95, $this->source); })()), "getId", [], "method", false, false, false, 95)), "html", null, true);
echo "</h4>
</div>
<div class=\"widgets-icons-2 rounded-circle bg-gradient-scooter text-white ms-auto\"><i class=\"bx bxs-wallet\"></i>
</div>
</div>
</div>
</div>
</div>
<div class=\"col\">
<div class=\"card radius-10 border-start border-0 border-3 border-success\">
<div class=\"card-body\">
<div class=\"d-flex align-items-center\">
<div>
<p class=\"mb-0 text-secondary\">Total Productos comprados</p>
<h4 class=\"my-1 text-success\">";
// line 109
echo twig_escape_filter($this->env, (isset($context["prods_cant"]) || array_key_exists("prods_cant", $context) ? $context["prods_cant"] : (function () { throw new RuntimeError('Variable "prods_cant" does not exist.', 109, $this->source); })()), "html", null, true);
echo "</h4>
</div>
<div class=\"widgets-icons-2 rounded-circle bg-gradient-ohhappiness text-white ms-auto\"><i class=\"bx bxs-cart\"></i>
</div>
</div>
</div>
</div>
</div>
<div class=\"col\">
<div class=\"card radius-10 border-start border-0 border-3 border-danger\">
<div class=\"card-body\">
<div class=\"d-flex align-items-center\">
<div>
<p class=\"mb-0 text-secondary\">Productos reservados</p>
<h4 class=\"my-1 text-danger\">";
// line 124
echo twig_escape_filter($this->env, (isset($context["prods_res"]) || array_key_exists("prods_res", $context) ? $context["prods_res"] : (function () { throw new RuntimeError('Variable "prods_res" does not exist.', 124, $this->source); })()), "html", null, true);
echo "</h4>
</div>
<div class=\"widgets-icons-2 rounded-circle bg-gradient-bloody text-white ms-auto\"><i class=\"bx bxs-save\"></i>
</div>
</div>
</div>
</div>
</div>
<div class=\"col\">
<div class=\"card radius-10 border-start border-0 border-3 border-warning\">
<div class=\"card-body\">
<div class=\"d-flex align-items-center\">
<div>
<p class=\"mb-0 text-secondary\">Ultima compra</p>
<h4 class=\"my-1 text-warning\">";
// line 139
if ((isset($context["last_buy"]) || array_key_exists("last_buy", $context) ? $context["last_buy"] : (function () { throw new RuntimeError('Variable "last_buy" does not exist.', 139, $this->source); })())) {
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["last_buy"]) || array_key_exists("last_buy", $context) ? $context["last_buy"] : (function () { throw new RuntimeError('Variable "last_buy" does not exist.', 139, $this->source); })()), "getDate", [], "method", false, false, false, 139), "d/m/Y"), "html", null, true);
}
echo "</h4>
</div>
<div class=\"widgets-icons-2 rounded-circle bg-gradient-blooker text-white ms-auto\"><i class=\"bx bxs-calendar\"></i>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class=\"card\">
<div class=\"card-body p-4\">
<h5>Ventas</h5>
<hr>
<table class=\"table mb-0\">
<thead>
<tr>
<th scope=\"col\" class=\"cabecera_filtrada\" data-filter=\"id\">ID</th>
<th scope=\"col\" class=\"cabecera_filtrada\" data-filter=\"date\">Fecha</th>
<th scope=\"col\">Cliente</th>
<th scope=\"col\">Vendido por</th>
<th scope=\"col\" class=\"cabecera_filtrada\" data-filter=\"subtotal\">Subtotal</th>
<th scope=\"col\" class=\"cabecera_filtrada\" data-filter=\"ivaValue\">Iva</th>
<th scope=\"col\" class=\"cabecera_filtrada\" data-filter=\"total\">Total</th>
<th scope=\"col\">Estado</th>
<th scope=\"col\">Detalles</th>
</tr>
</thead>
<tbody>
";
// line 171
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["ventas"]) || array_key_exists("ventas", $context) ? $context["ventas"] : (function () { throw new RuntimeError('Variable "ventas" does not exist.', 171, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["venta"]) {
// line 172
echo " <tr>
<th scope=\"row\">";
// line 173
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["venta"], "getId", [], "method", false, false, false, 173), "html", null, true);
echo "</th>
<td>";
// line 174
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["venta"], "getDate", [], "method", false, false, false, 174), "d/m/Y"), "html", null, true);
echo "</td>
<td>";
// line 175
echo twig_escape_filter($this->env, $this->extensions['App\Twig\outletExtension']->getClienteNameFunc(twig_get_attribute($this->env, $this->source, $context["venta"], "getClientId", [], "method", false, false, false, 175)), "html", null, true);
echo "</td>
<td>";
// line 176
echo twig_escape_filter($this->env, $this->extensions['App\Twig\outletExtension']->getUserNameFunc(twig_get_attribute($this->env, $this->source, $context["venta"], "getUserId", [], "method", false, false, false, 176)), "html", null, true);
echo "</td>
<td>";
// line 177
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["venta"], "getSubtotal", [], "method", false, false, false, 177), "html", null, true);
echo "</td>
<td>";
// line 178
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["venta"], "getIvaValue", [], "method", false, false, false, 178), "html", null, true);
echo "</td>
<td>";
// line 179
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["venta"], "getTotal", [], "method", false, false, false, 179), "html", null, true);
echo "</td>
<td>";
// line 180
echo $this->extensions['App\Twig\outletExtension']->getStatusLabelFunc(twig_get_attribute($this->env, $this->source, $context["venta"], "getStatus", [], "method", false, false, false, 180));
echo "</td>
<td>
<button onclick=\"viewTicket(";
// line 183
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["venta"], "getId", [], "method", false, false, false, 183), "html", null, true);
echo ")\" class=\"btn btn-outline-primary\" ><i class=\"bx bx-file\"></i></button>
<button onclick=\"printTicket(";
// line 184
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["venta"], "getId", [], "method", false, false, false, 184), "html", null, true);
echo ")\" class=\"btn btn-outline-primary\" ><i class=\"bx bx-printer\"></i></button>
<button onclick=\"printTicketRegalo(";
// line 185
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["venta"], "getId", [], "method", false, false, false, 185), "html", null, true);
echo ")\" class=\"btn btn-outline-primary\" ><i class=\"bx bx-gift\"></i></button>
</td>
</tr>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['venta'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 190
echo " </tbody>
</table>
<div class=\"mt-3 col-md-12 text-center align-content-center\">
";
// line 193
echo $this->extensions['Knp\Bundle\PaginatorBundle\Twig\Extension\PaginationExtension']->render($this->env, (isset($context["ventas"]) || array_key_exists("ventas", $context) ? $context["ventas"] : (function () { throw new RuntimeError('Variable "ventas" does not exist.', 193, $this->source); })()));
echo "
</div>
</div>
</div>
</div>
</div>
</div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 202
public function block_footerScripts($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "footerScripts"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "footerScripts"));
// line 203
echo " ";
$this->displayParentBlock("footerScripts", $context, $blocks);
echo "
<script>
function printTicket(id){
\$.ajax({
url:'";
// line 207
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("printTicket");
echo "',
type:'POST',
async:false,
data: {id:id },
success:function(html){
var mywindow = window.open('', 'PRINT', 'height=400,width=600');
mywindow.document.write(html);
mywindow.document.close();
mywindow.focus();
mywindow.print();
//mywindow.close();
}
});
}
function printTicketRegalo(id){
\$.ajax({
url:'";
// line 225
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("printTicketRegalo");
echo "',
type:'POST',
async:false,
data: {id:id },
success:function(html){
var mywindow = window.open('', 'PRINT', 'height=400,width=600');
mywindow.document.write(html);
mywindow.document.close();
mywindow.focus();
setTimeout(function(){
mywindow.print();
},2000);
//mywindow.close();
}
});
}
function viewTicket(id){
\$.ajax({
url:'";
// line 244
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("printTicket");
echo "',
type:'POST',
async:false,
data: {id:id },
success:function(html){
var mywindow = window.open('', 'PRINT', 'height=400,width=600');
mywindow.document.write(html);
mywindow.document.close();
mywindow.focus();
//mywindow.print();
//mywindow.close();
}
});
}
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "clients/detail.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 455 => 244, 433 => 225, 412 => 207, 404 => 203, 394 => 202, 376 => 193, 371 => 190, 360 => 185, 356 => 184, 352 => 183, 346 => 180, 342 => 179, 338 => 178, 334 => 177, 330 => 176, 326 => 175, 322 => 174, 318 => 173, 315 => 172, 311 => 171, 274 => 139, 256 => 124, 238 => 109, 221 => 95, 193 => 70, 186 => 66, 179 => 62, 172 => 58, 165 => 54, 152 => 44, 145 => 40, 138 => 36, 131 => 32, 124 => 28, 112 => 21, 97 => 9, 93 => 7, 83 => 6, 70 => 3, 60 => 2, 37 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends \"base.html.twig\" %}
{% block headerStyles %}
{{ parent() }}
{% endblock %}
{% block content %}
<div class=\"page-content\">
<div class=\"page-breadcrumb d-none d-sm-flex align-items-center mb-3\">
<div class=\"breadcrumb-title pe-3\">Cliente: {{ client.getName()~' '~client.getSurname() }}</div>
<div class=\" d-sm-flex align-items-center ms-auto\">
</div>
<div class=\"ms-auto\">
</div>
</div>
<div class=\"row\">
<div class=\"col-md-4\">
<form action=\"{{ path('modifyClientData') }}?id={{ client.getId() }}\" method=\"POST\">
<div class=\"card\">
<div class=\"card-body p-4\">
<h5>Datos personales</h5>
<hr>
<div class=\"mb-3\">
<label for=\"inputProductTitle\" class=\"form-label\">Nombre del Cliente</label>
<input type=\"text\" class=\"form-control\" id=\"inputProductTitle\" name=\"name\" value=\"{{ client.getName() }}\">
</div>
<div class=\"mb-3\">
<label for=\"surname\" class=\"form-label\">Apellidos del Cliente</label>
<input type=\"text\" class=\"form-control\" id=\"surname\" name=\"surname\" value=\"{{ client.getSurname() }}\">
</div>
<div class=\"mb-3\">
<label for=\"email\" class=\"form-label\">Email del Cliente</label>
<input type=\"text\" class=\"form-control\" id=\"email\" name=\"email\" value=\"{{ client.getEmail() }}\">
</div>
<div class=\"mb-3\">
<label for=\"nif\" class=\"form-label\">Nif / CIF del Cliente</label>
<input type=\"text\" class=\"form-control\" id=\"nif\" name=\"nif\" value=\"{{ client.getNif() }}\">
</div>
<div class=\"mb-3\">
<label for=\"phone\" class=\"form-label\">Teléfono del Cliente</label>
<input type=\"text\" class=\"form-control\" id=\"phone\" name=\"phone\" value=\"{{ client.getPhone() }}\">
</div>
</div>
</div>
<div class=\"card\">
<div class=\"card-body p-4\">
<h5>Dirección </h5>
<hr>
<div class=\"mb-3\">
<label for=\"address\" class=\"form-label\">Dirección</label>
<input type=\"text\" class=\"form-control\" id=\"address\" name=\"address\" value=\"{{ client.getAddress() }}\">
</div>
<div class=\"mb-3\">
<label for=\"cp\" class=\"form-label\">Código postal</label>
<input type=\"text\" class=\"form-control\" id=\"cp\" name=\"cp\" value=\"{{ client.getCp() }}\">
</div>
<div class=\"mb-3\">
<label for=\"city\" class=\"form-label\">Ciudad</label>
<input type=\"text\" class=\"form-control\" id=\"city\" name=\"city\" value=\"{{ client.getCity() }}\">
</div>
<div class=\"mb-3\">
<label for=\"state\" class=\"form-label\">Província</label>
<input type=\"text\" class=\"form-control\" id=\"state\" name=\"state\" value=\"{{ client.getState() }}\">
</div>
<div class=\"mb-3\">
<label for=\"country\" class=\"form-label\">País</label>
<input type=\"text\" class=\"form-control\" id=\"country\" name=\"country\" value=\"{{ client.getCountry() }}\">
</div>
</div>
</div>
<div class=\"card\">
<div class=\"card-body p-4\">
<div class=\"d-grid\">
<button type=\"submit\" class=\"btn btn-primary btn-block\">Guardar cambios</button>
</div>
</div>
</div>
</form>
</div>
<div class=\"col-md-8\">
<div class=\"card\">
<div class=\"card-body p-4\">
<h5>Estadísticas y datos</h5>
<hr>
<div class=\"row row-cols-1 row-cols-md-2 row-cols-xl-4\">
<div class=\"col\">
<div class=\"card radius-10 border-start border-0 border-3 border-info\">
<div class=\"card-body\">
<div class=\"d-flex align-items-center\">
<div>
<p class=\"mb-0 text-secondary\">Total ventas</p>
<h4 class=\"my-1 text-info\">{{ client.getId() | calculaVenta() }}</h4>
</div>
<div class=\"widgets-icons-2 rounded-circle bg-gradient-scooter text-white ms-auto\"><i class=\"bx bxs-wallet\"></i>
</div>
</div>
</div>
</div>
</div>
<div class=\"col\">
<div class=\"card radius-10 border-start border-0 border-3 border-success\">
<div class=\"card-body\">
<div class=\"d-flex align-items-center\">
<div>
<p class=\"mb-0 text-secondary\">Total Productos comprados</p>
<h4 class=\"my-1 text-success\">{{ prods_cant }}</h4>
</div>
<div class=\"widgets-icons-2 rounded-circle bg-gradient-ohhappiness text-white ms-auto\"><i class=\"bx bxs-cart\"></i>
</div>
</div>
</div>
</div>
</div>
<div class=\"col\">
<div class=\"card radius-10 border-start border-0 border-3 border-danger\">
<div class=\"card-body\">
<div class=\"d-flex align-items-center\">
<div>
<p class=\"mb-0 text-secondary\">Productos reservados</p>
<h4 class=\"my-1 text-danger\">{{ prods_res }}</h4>
</div>
<div class=\"widgets-icons-2 rounded-circle bg-gradient-bloody text-white ms-auto\"><i class=\"bx bxs-save\"></i>
</div>
</div>
</div>
</div>
</div>
<div class=\"col\">
<div class=\"card radius-10 border-start border-0 border-3 border-warning\">
<div class=\"card-body\">
<div class=\"d-flex align-items-center\">
<div>
<p class=\"mb-0 text-secondary\">Ultima compra</p>
<h4 class=\"my-1 text-warning\">{% if last_buy %}{{ last_buy.getDate() | date(\"d/m/Y\") }}{% endif %}</h4>
</div>
<div class=\"widgets-icons-2 rounded-circle bg-gradient-blooker text-white ms-auto\"><i class=\"bx bxs-calendar\"></i>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class=\"card\">
<div class=\"card-body p-4\">
<h5>Ventas</h5>
<hr>
<table class=\"table mb-0\">
<thead>
<tr>
<th scope=\"col\" class=\"cabecera_filtrada\" data-filter=\"id\">ID</th>
<th scope=\"col\" class=\"cabecera_filtrada\" data-filter=\"date\">Fecha</th>
<th scope=\"col\">Cliente</th>
<th scope=\"col\">Vendido por</th>
<th scope=\"col\" class=\"cabecera_filtrada\" data-filter=\"subtotal\">Subtotal</th>
<th scope=\"col\" class=\"cabecera_filtrada\" data-filter=\"ivaValue\">Iva</th>
<th scope=\"col\" class=\"cabecera_filtrada\" data-filter=\"total\">Total</th>
<th scope=\"col\">Estado</th>
<th scope=\"col\">Detalles</th>
</tr>
</thead>
<tbody>
{% for venta in ventas %}
<tr>
<th scope=\"row\">{{ venta.getId() }}</th>
<td>{{ venta.getDate() | date (\"d/m/Y\") }}</td>
<td>{{ venta.getClientId() | getClienteName() }}</td>
<td>{{ venta.getUserId() | getUserName() }}</td>
<td>{{ venta.getSubtotal() }}</td>
<td>{{ venta.getIvaValue() }}</td>
<td>{{ venta.getTotal() }}</td>
<td>{{ (venta.getStatus() | getStatusLabel()) | raw }}</td>
<td>
<button onclick=\"viewTicket({{venta.getId()}})\" class=\"btn btn-outline-primary\" ><i class=\"bx bx-file\"></i></button>
<button onclick=\"printTicket({{venta.getId()}})\" class=\"btn btn-outline-primary\" ><i class=\"bx bx-printer\"></i></button>
<button onclick=\"printTicketRegalo({{venta.getId()}})\" class=\"btn btn-outline-primary\" ><i class=\"bx bx-gift\"></i></button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class=\"mt-3 col-md-12 text-center align-content-center\">
{{ knp_pagination_render(ventas) }}
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block footerScripts %}
{{ parent() }}
<script>
function printTicket(id){
\$.ajax({
url:'{{path(\"printTicket\")}}',
type:'POST',
async:false,
data: {id:id },
success:function(html){
var mywindow = window.open('', 'PRINT', 'height=400,width=600');
mywindow.document.write(html);
mywindow.document.close();
mywindow.focus();
mywindow.print();
//mywindow.close();
}
});
}
function printTicketRegalo(id){
\$.ajax({
url:'{{path(\"printTicketRegalo\")}}',
type:'POST',
async:false,
data: {id:id },
success:function(html){
var mywindow = window.open('', 'PRINT', 'height=400,width=600');
mywindow.document.write(html);
mywindow.document.close();
mywindow.focus();
setTimeout(function(){
mywindow.print();
},2000);
//mywindow.close();
}
});
}
function viewTicket(id){
\$.ajax({
url:'{{path(\"printTicket\")}}',
type:'POST',
async:false,
data: {id:id },
success:function(html){
var mywindow = window.open('', 'PRINT', 'height=400,width=600');
mywindow.document.write(html);
mywindow.document.close();
mywindow.focus();
//mywindow.print();
//mywindow.close();
}
});
}
</script>
{% endblock %}", "clients/detail.html.twig", "/home/ideosAdmin/web/nubesdecoloreskids.sell-io.es/public_html/templates/clients/detail.html.twig");
}
}