var/cache/dev/twig/88/88ca436473803994c01482ffdb7ef0d91083082312a71f0a8f322c96c6dcd3ff.php line 274

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* clients/detail.html.twig */
  14. class __TwigTemplate_17f715bd3993aac4e85e106b395e873e31080dd7f89dd87e4b80018ac0241eeb extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'headerStyles' => [$this'block_headerStyles'],
  24.             'content' => [$this'block_content'],
  25.             'footerScripts' => [$this'block_footerScripts'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 1
  31.         return "base.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""clients/detail.html.twig"));
  38.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""clients/detail.html.twig"));
  40.         $this->parent $this->loadTemplate("base.html.twig""clients/detail.html.twig"1);
  41.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  42.         
  43.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  44.         
  45.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  46.     }
  47.     // line 2
  48.     public function block_headerStyles($context, array $blocks = [])
  49.     {
  50.         $macros $this->macros;
  51.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  52.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""headerStyles"));
  53.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  54.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""headerStyles"));
  55.         // line 3
  56.         echo "    ";
  57.         $this->displayParentBlock("headerStyles"$context$blocks);
  58.         echo "
  59. ";
  60.         
  61.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  62.         
  63.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  64.     }
  65.     // line 6
  66.     public function block_content($context, array $blocks = [])
  67.     {
  68.         $macros $this->macros;
  69.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  70.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  71.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  72.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  73.         // line 7
  74.         echo "    <div class=\"page-content\">
  75.          <div class=\"page-breadcrumb d-none d-sm-flex align-items-center mb-3\">
  76.             <div class=\"breadcrumb-title pe-3\">Cliente: ";
  77.         // line 9
  78.         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"falsefalsefalse9) . " ") . 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"falsefalsefalse9)), "html"nulltrue);
  79.         echo "</div>
  80.              
  81.                 <div class=\" d-sm-flex align-items-center ms-auto\">
  82.                     
  83.                 
  84.                 </div>
  85.            
  86.             <div class=\"ms-auto\">
  87.             </div>
  88.         </div>
  89.         <div class=\"row\">
  90.             <div class=\"col-md-4\">
  91.                 <form action=\"";
  92.         // line 21
  93.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("modifyClientData");
  94.         echo "?id=";
  95.         echo twig_escape_filter($this->envtwig_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"falsefalsefalse21), "html"nulltrue);
  96.         echo "\" method=\"POST\">
  97.                 <div class=\"card\">
  98.                     <div class=\"card-body p-4\">
  99.                         <h5>Datos personales</h5>
  100.                         <hr>
  101.                         <div class=\"mb-3\">
  102.                             <label for=\"inputProductTitle\" class=\"form-label\">Nombre del Cliente</label>
  103.                             <input type=\"text\" class=\"form-control\" id=\"inputProductTitle\" name=\"name\" value=\"";
  104.         // line 28
  105.         echo twig_escape_filter($this->envtwig_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"falsefalsefalse28), "html"nulltrue);
  106.         echo "\">
  107.                         </div>
  108.                         <div class=\"mb-3\">
  109.                             <label for=\"surname\" class=\"form-label\">Apellidos del Cliente</label>
  110.                             <input type=\"text\" class=\"form-control\" id=\"surname\" name=\"surname\" value=\"";
  111.         // line 32
  112.         echo twig_escape_filter($this->envtwig_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"falsefalsefalse32), "html"nulltrue);
  113.         echo "\">
  114.                         </div>
  115.                         <div class=\"mb-3\">
  116.                             <label for=\"email\" class=\"form-label\">Email del Cliente</label>
  117.                             <input type=\"text\" class=\"form-control\" id=\"email\" name=\"email\" value=\"";
  118.         // line 36
  119.         echo twig_escape_filter($this->envtwig_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"falsefalsefalse36), "html"nulltrue);
  120.         echo "\">
  121.                         </div>
  122.                         <div class=\"mb-3\">
  123.                             <label for=\"nif\" class=\"form-label\">Nif / CIF del Cliente</label>
  124.                             <input type=\"text\" class=\"form-control\" id=\"nif\" name=\"nif\" value=\"";
  125.         // line 40
  126.         echo twig_escape_filter($this->envtwig_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"falsefalsefalse40), "html"nulltrue);
  127.         echo "\">
  128.                         </div>
  129.                         <div class=\"mb-3\">
  130.                             <label for=\"phone\" class=\"form-label\">Teléfono del Cliente</label>
  131.                             <input type=\"text\" class=\"form-control\" id=\"phone\" name=\"phone\" value=\"";
  132.         // line 44
  133.         echo twig_escape_filter($this->envtwig_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"falsefalsefalse44), "html"nulltrue);
  134.         echo "\">
  135.                         </div>
  136.                     </div>
  137.                 </div>
  138.                 <div class=\"card\">
  139.                     <div class=\"card-body p-4\">
  140.                         <h5>Dirección </h5>
  141.                         <hr>
  142.                         <div class=\"mb-3\">
  143.                             <label for=\"address\" class=\"form-label\">Dirección</label>
  144.                             <input type=\"text\" class=\"form-control\" id=\"address\" name=\"address\" value=\"";
  145.         // line 54
  146.         echo twig_escape_filter($this->envtwig_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"falsefalsefalse54), "html"nulltrue);
  147.         echo "\">
  148.                         </div>
  149.                         <div class=\"mb-3\">
  150.                             <label for=\"cp\" class=\"form-label\">Código postal</label>
  151.                             <input type=\"text\" class=\"form-control\" id=\"cp\" name=\"cp\" value=\"";
  152.         // line 58
  153.         echo twig_escape_filter($this->envtwig_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"falsefalsefalse58), "html"nulltrue);
  154.         echo "\">
  155.                         </div>
  156.                         <div class=\"mb-3\">
  157.                             <label for=\"city\" class=\"form-label\">Ciudad</label>
  158.                             <input type=\"text\" class=\"form-control\" id=\"city\" name=\"city\" value=\"";
  159.         // line 62
  160.         echo twig_escape_filter($this->envtwig_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"falsefalsefalse62), "html"nulltrue);
  161.         echo "\">
  162.                         </div>
  163.                         <div class=\"mb-3\">
  164.                             <label for=\"state\" class=\"form-label\">Província</label>
  165.                             <input type=\"text\" class=\"form-control\" id=\"state\" name=\"state\" value=\"";
  166.         // line 66
  167.         echo twig_escape_filter($this->envtwig_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"falsefalsefalse66), "html"nulltrue);
  168.         echo "\">
  169.                         </div>
  170.                         <div class=\"mb-3\">
  171.                             <label for=\"country\" class=\"form-label\">País</label>
  172.                             <input type=\"text\" class=\"form-control\" id=\"country\" name=\"country\" value=\"";
  173.         // line 70
  174.         echo twig_escape_filter($this->envtwig_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"falsefalsefalse70), "html"nulltrue);
  175.         echo "\">
  176.                         </div>
  177.                     </div>
  178.                 </div>
  179.                 <div class=\"card\">
  180.                     <div class=\"card-body p-4\">
  181.                         <div class=\"d-grid\">
  182.                             <button type=\"submit\" class=\"btn btn-primary btn-block\">Guardar cambios</button>
  183.                         </div>
  184.                     </div>
  185.                 </div>
  186.                 </form>
  187.             </div>
  188.             <div class=\"col-md-8\">
  189.                 <div class=\"card\">
  190.                     <div class=\"card-body p-4\">
  191.                         <h5>Estadísticas y datos</h5>
  192.                         <hr>
  193.                         <div class=\"row row-cols-1 row-cols-md-2 row-cols-xl-4\">
  194.                             <div class=\"col\">
  195.                                 <div class=\"card radius-10 border-start border-0 border-3 border-info\">
  196.                                        <div class=\"card-body\">
  197.                                                <div class=\"d-flex align-items-center\">
  198.                                                        <div>
  199.                                                                <p class=\"mb-0 text-secondary\">Total ventas</p>
  200.                                                                <h4 class=\"my-1 text-info\">";
  201.         // line 95
  202.         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"falsefalsefalse95)), "html"nulltrue);
  203.         echo "</h4>
  204.                                                        </div>
  205.                                                        <div class=\"widgets-icons-2 rounded-circle bg-gradient-scooter text-white ms-auto\"><i class=\"bx bxs-wallet\"></i>
  206.                                                        </div>
  207.                                                </div>
  208.                                        </div>
  209.                                 </div>
  210.                             </div>
  211.                             <div class=\"col\">
  212.                                <div class=\"card radius-10 border-start border-0 border-3 border-success\">
  213.                                   <div class=\"card-body\">
  214.                                           <div class=\"d-flex align-items-center\">
  215.                                                   <div>
  216.                                                           <p class=\"mb-0 text-secondary\">Total Productos comprados</p>
  217.                                                           <h4 class=\"my-1 text-success\">";
  218.         // line 109
  219.         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"nulltrue);
  220.         echo "</h4>
  221.                                                           
  222.                                                   </div>
  223.                                                   <div class=\"widgets-icons-2 rounded-circle bg-gradient-ohhappiness text-white ms-auto\"><i class=\"bx bxs-cart\"></i>
  224.                                                   </div>
  225.                                           </div>
  226.                                   </div>
  227.                                </div>
  228.                             </div>
  229.                             <div class=\"col\">
  230.                                <div class=\"card radius-10 border-start border-0 border-3 border-danger\">
  231.                                   <div class=\"card-body\">
  232.                                           <div class=\"d-flex align-items-center\">
  233.                                                   <div>
  234.                                                           <p class=\"mb-0 text-secondary\">Productos reservados</p>
  235.                                                           <h4 class=\"my-1 text-danger\">";
  236.         // line 124
  237.         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"nulltrue);
  238.         echo "</h4>
  239.                                                           
  240.                                                   </div>
  241.                                                   <div class=\"widgets-icons-2 rounded-circle bg-gradient-bloody text-white ms-auto\"><i class=\"bx bxs-save\"></i>
  242.                                                   </div>
  243.                                           </div>
  244.                                   </div>
  245.                                </div>
  246.                             </div>
  247.                             <div class=\"col\">
  248.                                <div class=\"card radius-10 border-start border-0 border-3 border-warning\">
  249.                                   <div class=\"card-body\">
  250.                                           <div class=\"d-flex align-items-center\">
  251.                                                   <div>
  252.                                                           <p class=\"mb-0 text-secondary\">Ultima compra</p>
  253.                                                           <h4 class=\"my-1 text-warning\">";
  254.         // line 139
  255.         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); })())) {
  256.             echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_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"falsefalsefalse139), "d/m/Y"), "html"nulltrue);
  257.         }
  258.         echo "</h4>
  259.                                                           
  260.                                                   </div>
  261.                                                   <div class=\"widgets-icons-2 rounded-circle bg-gradient-blooker text-white ms-auto\"><i class=\"bx bxs-calendar\"></i>
  262.                                                   </div>
  263.                                           </div>
  264.                                   </div>
  265.                                </div>
  266.                             </div> 
  267.                         </div>
  268.                     </div>
  269.                 </div>
  270.                 <div class=\"card\">
  271.                     <div class=\"card-body p-4\">
  272.                         <h5>Ventas</h5>
  273.                         <hr>
  274.                         <table class=\"table mb-0\">
  275.                             <thead>
  276.                                     <tr>
  277.                                             <th scope=\"col\" class=\"cabecera_filtrada\" data-filter=\"id\">ID</th>
  278.                                             <th scope=\"col\" class=\"cabecera_filtrada\" data-filter=\"date\">Fecha</th>
  279.                                             <th scope=\"col\">Cliente</th>
  280.                                             <th scope=\"col\">Vendido por</th>
  281.                                             <th scope=\"col\" class=\"cabecera_filtrada\" data-filter=\"subtotal\">Subtotal</th>
  282.                                             <th scope=\"col\" class=\"cabecera_filtrada\" data-filter=\"ivaValue\">Iva</th>
  283.                                             <th scope=\"col\" class=\"cabecera_filtrada\" data-filter=\"total\">Total</th>
  284.                                             <th scope=\"col\">Estado</th>
  285.                                             <th scope=\"col\">Detalles</th>
  286.                                     </tr>
  287.                             </thead>
  288.                             <tbody>
  289.                                 ";
  290.         // line 171
  291.         $context['_parent'] = $context;
  292.         $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); })()));
  293.         foreach ($context['_seq'] as $context["_key"] => $context["venta"]) {
  294.             // line 172
  295.             echo "                                    <tr>
  296.                                             <th scope=\"row\">";
  297.             // line 173
  298.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["venta"], "getId", [], "method"falsefalsefalse173), "html"nulltrue);
  299.             echo "</th>
  300.                                             <td>";
  301.             // line 174
  302.             echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source$context["venta"], "getDate", [], "method"falsefalsefalse174), "d/m/Y"), "html"nulltrue);
  303.             echo "</td>
  304.                                             <td>";
  305.             // line 175
  306.             echo twig_escape_filter($this->env$this->extensions['App\Twig\outletExtension']->getClienteNameFunc(twig_get_attribute($this->env$this->source$context["venta"], "getClientId", [], "method"falsefalsefalse175)), "html"nulltrue);
  307.             echo "</td>
  308.                                             <td>";
  309.             // line 176
  310.             echo twig_escape_filter($this->env$this->extensions['App\Twig\outletExtension']->getUserNameFunc(twig_get_attribute($this->env$this->source$context["venta"], "getUserId", [], "method"falsefalsefalse176)), "html"nulltrue);
  311.             echo "</td>
  312.                                             <td>";
  313.             // line 177
  314.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["venta"], "getSubtotal", [], "method"falsefalsefalse177), "html"nulltrue);
  315.             echo "</td>
  316.                                             <td>";
  317.             // line 178
  318.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["venta"], "getIvaValue", [], "method"falsefalsefalse178), "html"nulltrue);
  319.             echo "</td>
  320.                                             <td>";
  321.             // line 179
  322.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["venta"], "getTotal", [], "method"falsefalsefalse179), "html"nulltrue);
  323.             echo "</td>
  324.                                             <td>";
  325.             // line 180
  326.             echo $this->extensions['App\Twig\outletExtension']->getStatusLabelFunc(twig_get_attribute($this->env$this->source$context["venta"], "getStatus", [], "method"falsefalsefalse180));
  327.             echo "</td>
  328.                                             <td>
  329.                                                 <button  onclick=\"viewTicket(";
  330.             // line 183
  331.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["venta"], "getId", [], "method"falsefalsefalse183), "html"nulltrue);
  332.             echo ")\" class=\"btn btn-outline-primary\" ><i class=\"bx bx-file\"></i></button>
  333.                                                 <button  onclick=\"printTicket(";
  334.             // line 184
  335.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["venta"], "getId", [], "method"falsefalsefalse184), "html"nulltrue);
  336.             echo ")\" class=\"btn btn-outline-primary\" ><i class=\"bx bx-printer\"></i></button>
  337.                                                 <button  onclick=\"printTicketRegalo(";
  338.             // line 185
  339.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["venta"], "getId", [], "method"falsefalsefalse185), "html"nulltrue);
  340.             echo ")\" class=\"btn btn-outline-primary\" ><i class=\"bx bx-gift\"></i></button>
  341.                                             </td>
  342.                                     </tr>
  343.                                 ";
  344.         }
  345.         $_parent $context['_parent'];
  346.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['venta'], $context['_parent'], $context['loop']);
  347.         $context array_intersect_key($context$_parent) + $_parent;
  348.         // line 190
  349.         echo "                            </tbody>
  350.                         </table>
  351.                         <div class=\"mt-3 col-md-12 text-center align-content-center\">
  352.                             ";
  353.         // line 193
  354.         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); })()));
  355.         echo "
  356.                         </div>
  357.                     </div>
  358.                 </div>
  359.             </div>
  360.         </div>
  361.     </div>
  362. ";
  363.         
  364.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  365.         
  366.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  367.     }
  368.     // line 202
  369.     public function block_footerScripts($context, array $blocks = [])
  370.     {
  371.         $macros $this->macros;
  372.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  373.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""footerScripts"));
  374.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  375.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""footerScripts"));
  376.         // line 203
  377.         echo "    ";
  378.         $this->displayParentBlock("footerScripts"$context$blocks);
  379.         echo "
  380.     <script>
  381.        function printTicket(id){
  382.                 \$.ajax({
  383.                     url:'";
  384.         // line 207
  385.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("printTicket");
  386.         echo "',
  387.                     type:'POST',
  388.                     async:false,
  389.                     data: {id:id },
  390.                     success:function(html){
  391.                         var mywindow = window.open('', 'PRINT', 'height=400,width=600'); 
  392.                         mywindow.document.write(html);
  393.                         mywindow.document.close();
  394.                         mywindow.focus();
  395.                         mywindow.print();
  396.                         //mywindow.close();
  397.                     }
  398.                 });
  399.             }
  400.         function printTicketRegalo(id){
  401.             \$.ajax({
  402.                 url:'";
  403.         // line 225
  404.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("printTicketRegalo");
  405.         echo "',
  406.                 type:'POST',
  407.                     async:false,
  408.                     data: {id:id },
  409.                     success:function(html){
  410.                         var mywindow = window.open('', 'PRINT', 'height=400,width=600'); 
  411.                         mywindow.document.write(html);
  412.                         mywindow.document.close();
  413.                         mywindow.focus();
  414.                         setTimeout(function(){
  415.                             mywindow.print();
  416.                         },2000);
  417.                         //mywindow.close();
  418.                     }
  419.                 });
  420.         }
  421.         function viewTicket(id){
  422.             \$.ajax({
  423.                 url:'";
  424.         // line 244
  425.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("printTicket");
  426.         echo "',
  427.                 type:'POST',
  428.                 async:false,
  429.                 data: {id:id },
  430.                 success:function(html){
  431.                     var mywindow = window.open('', 'PRINT', 'height=400,width=600'); 
  432.                     mywindow.document.write(html);
  433.                     mywindow.document.close();
  434.                     mywindow.focus();
  435.                     //mywindow.print();
  436.                     //mywindow.close();
  437.                 }
  438.             });
  439.         }
  440.     </script>
  441.     
  442. ";
  443.         
  444.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  445.         
  446.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  447.     }
  448.     public function getTemplateName()
  449.     {
  450.         return "clients/detail.html.twig";
  451.     }
  452.     public function isTraitable()
  453.     {
  454.         return false;
  455.     }
  456.     public function getDebugInfo()
  457.     {
  458.         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,);
  459.     }
  460.     public function getSourceContext()
  461.     {
  462.         return new Source("{% extends \"base.html.twig\" %}
  463. {% block headerStyles %}
  464.     {{ parent() }}
  465. {% endblock %}
  466. {% block content %}
  467.     <div class=\"page-content\">
  468.          <div class=\"page-breadcrumb d-none d-sm-flex align-items-center mb-3\">
  469.             <div class=\"breadcrumb-title pe-3\">Cliente: {{ client.getName()~' '~client.getSurname() }}</div>
  470.              
  471.                 <div class=\" d-sm-flex align-items-center ms-auto\">
  472.                     
  473.                 
  474.                 </div>
  475.            
  476.             <div class=\"ms-auto\">
  477.             </div>
  478.         </div>
  479.         <div class=\"row\">
  480.             <div class=\"col-md-4\">
  481.                 <form action=\"{{ path('modifyClientData') }}?id={{ client.getId() }}\" method=\"POST\">
  482.                 <div class=\"card\">
  483.                     <div class=\"card-body p-4\">
  484.                         <h5>Datos personales</h5>
  485.                         <hr>
  486.                         <div class=\"mb-3\">
  487.                             <label for=\"inputProductTitle\" class=\"form-label\">Nombre del Cliente</label>
  488.                             <input type=\"text\" class=\"form-control\" id=\"inputProductTitle\" name=\"name\" value=\"{{ client.getName() }}\">
  489.                         </div>
  490.                         <div class=\"mb-3\">
  491.                             <label for=\"surname\" class=\"form-label\">Apellidos del Cliente</label>
  492.                             <input type=\"text\" class=\"form-control\" id=\"surname\" name=\"surname\" value=\"{{ client.getSurname() }}\">
  493.                         </div>
  494.                         <div class=\"mb-3\">
  495.                             <label for=\"email\" class=\"form-label\">Email del Cliente</label>
  496.                             <input type=\"text\" class=\"form-control\" id=\"email\" name=\"email\" value=\"{{ client.getEmail() }}\">
  497.                         </div>
  498.                         <div class=\"mb-3\">
  499.                             <label for=\"nif\" class=\"form-label\">Nif / CIF del Cliente</label>
  500.                             <input type=\"text\" class=\"form-control\" id=\"nif\" name=\"nif\" value=\"{{ client.getNif() }}\">
  501.                         </div>
  502.                         <div class=\"mb-3\">
  503.                             <label for=\"phone\" class=\"form-label\">Teléfono del Cliente</label>
  504.                             <input type=\"text\" class=\"form-control\" id=\"phone\" name=\"phone\" value=\"{{ client.getPhone() }}\">
  505.                         </div>
  506.                     </div>
  507.                 </div>
  508.                 <div class=\"card\">
  509.                     <div class=\"card-body p-4\">
  510.                         <h5>Dirección </h5>
  511.                         <hr>
  512.                         <div class=\"mb-3\">
  513.                             <label for=\"address\" class=\"form-label\">Dirección</label>
  514.                             <input type=\"text\" class=\"form-control\" id=\"address\" name=\"address\" value=\"{{ client.getAddress() }}\">
  515.                         </div>
  516.                         <div class=\"mb-3\">
  517.                             <label for=\"cp\" class=\"form-label\">Código postal</label>
  518.                             <input type=\"text\" class=\"form-control\" id=\"cp\" name=\"cp\" value=\"{{ client.getCp() }}\">
  519.                         </div>
  520.                         <div class=\"mb-3\">
  521.                             <label for=\"city\" class=\"form-label\">Ciudad</label>
  522.                             <input type=\"text\" class=\"form-control\" id=\"city\" name=\"city\" value=\"{{ client.getCity() }}\">
  523.                         </div>
  524.                         <div class=\"mb-3\">
  525.                             <label for=\"state\" class=\"form-label\">Província</label>
  526.                             <input type=\"text\" class=\"form-control\" id=\"state\" name=\"state\" value=\"{{ client.getState() }}\">
  527.                         </div>
  528.                         <div class=\"mb-3\">
  529.                             <label for=\"country\" class=\"form-label\">País</label>
  530.                             <input type=\"text\" class=\"form-control\" id=\"country\" name=\"country\" value=\"{{ client.getCountry() }}\">
  531.                         </div>
  532.                     </div>
  533.                 </div>
  534.                 <div class=\"card\">
  535.                     <div class=\"card-body p-4\">
  536.                         <div class=\"d-grid\">
  537.                             <button type=\"submit\" class=\"btn btn-primary btn-block\">Guardar cambios</button>
  538.                         </div>
  539.                     </div>
  540.                 </div>
  541.                 </form>
  542.             </div>
  543.             <div class=\"col-md-8\">
  544.                 <div class=\"card\">
  545.                     <div class=\"card-body p-4\">
  546.                         <h5>Estadísticas y datos</h5>
  547.                         <hr>
  548.                         <div class=\"row row-cols-1 row-cols-md-2 row-cols-xl-4\">
  549.                             <div class=\"col\">
  550.                                 <div class=\"card radius-10 border-start border-0 border-3 border-info\">
  551.                                        <div class=\"card-body\">
  552.                                                <div class=\"d-flex align-items-center\">
  553.                                                        <div>
  554.                                                                <p class=\"mb-0 text-secondary\">Total ventas</p>
  555.                                                                <h4 class=\"my-1 text-info\">{{ client.getId() | calculaVenta() }}</h4>
  556.                                                        </div>
  557.                                                        <div class=\"widgets-icons-2 rounded-circle bg-gradient-scooter text-white ms-auto\"><i class=\"bx bxs-wallet\"></i>
  558.                                                        </div>
  559.                                                </div>
  560.                                        </div>
  561.                                 </div>
  562.                             </div>
  563.                             <div class=\"col\">
  564.                                <div class=\"card radius-10 border-start border-0 border-3 border-success\">
  565.                                   <div class=\"card-body\">
  566.                                           <div class=\"d-flex align-items-center\">
  567.                                                   <div>
  568.                                                           <p class=\"mb-0 text-secondary\">Total Productos comprados</p>
  569.                                                           <h4 class=\"my-1 text-success\">{{ prods_cant }}</h4>
  570.                                                           
  571.                                                   </div>
  572.                                                   <div class=\"widgets-icons-2 rounded-circle bg-gradient-ohhappiness text-white ms-auto\"><i class=\"bx bxs-cart\"></i>
  573.                                                   </div>
  574.                                           </div>
  575.                                   </div>
  576.                                </div>
  577.                             </div>
  578.                             <div class=\"col\">
  579.                                <div class=\"card radius-10 border-start border-0 border-3 border-danger\">
  580.                                   <div class=\"card-body\">
  581.                                           <div class=\"d-flex align-items-center\">
  582.                                                   <div>
  583.                                                           <p class=\"mb-0 text-secondary\">Productos reservados</p>
  584.                                                           <h4 class=\"my-1 text-danger\">{{ prods_res }}</h4>
  585.                                                           
  586.                                                   </div>
  587.                                                   <div class=\"widgets-icons-2 rounded-circle bg-gradient-bloody text-white ms-auto\"><i class=\"bx bxs-save\"></i>
  588.                                                   </div>
  589.                                           </div>
  590.                                   </div>
  591.                                </div>
  592.                             </div>
  593.                             <div class=\"col\">
  594.                                <div class=\"card radius-10 border-start border-0 border-3 border-warning\">
  595.                                   <div class=\"card-body\">
  596.                                           <div class=\"d-flex align-items-center\">
  597.                                                   <div>
  598.                                                           <p class=\"mb-0 text-secondary\">Ultima compra</p>
  599.                                                           <h4 class=\"my-1 text-warning\">{% if last_buy %}{{ last_buy.getDate() | date(\"d/m/Y\") }}{% endif %}</h4>
  600.                                                           
  601.                                                   </div>
  602.                                                   <div class=\"widgets-icons-2 rounded-circle bg-gradient-blooker text-white ms-auto\"><i class=\"bx bxs-calendar\"></i>
  603.                                                   </div>
  604.                                           </div>
  605.                                   </div>
  606.                                </div>
  607.                             </div> 
  608.                         </div>
  609.                     </div>
  610.                 </div>
  611.                 <div class=\"card\">
  612.                     <div class=\"card-body p-4\">
  613.                         <h5>Ventas</h5>
  614.                         <hr>
  615.                         <table class=\"table mb-0\">
  616.                             <thead>
  617.                                     <tr>
  618.                                             <th scope=\"col\" class=\"cabecera_filtrada\" data-filter=\"id\">ID</th>
  619.                                             <th scope=\"col\" class=\"cabecera_filtrada\" data-filter=\"date\">Fecha</th>
  620.                                             <th scope=\"col\">Cliente</th>
  621.                                             <th scope=\"col\">Vendido por</th>
  622.                                             <th scope=\"col\" class=\"cabecera_filtrada\" data-filter=\"subtotal\">Subtotal</th>
  623.                                             <th scope=\"col\" class=\"cabecera_filtrada\" data-filter=\"ivaValue\">Iva</th>
  624.                                             <th scope=\"col\" class=\"cabecera_filtrada\" data-filter=\"total\">Total</th>
  625.                                             <th scope=\"col\">Estado</th>
  626.                                             <th scope=\"col\">Detalles</th>
  627.                                     </tr>
  628.                             </thead>
  629.                             <tbody>
  630.                                 {% for venta in ventas %}
  631.                                     <tr>
  632.                                             <th scope=\"row\">{{ venta.getId() }}</th>
  633.                                             <td>{{ venta.getDate() | date (\"d/m/Y\") }}</td>
  634.                                             <td>{{ venta.getClientId() | getClienteName() }}</td>
  635.                                             <td>{{ venta.getUserId() | getUserName() }}</td>
  636.                                             <td>{{ venta.getSubtotal() }}</td>
  637.                                             <td>{{ venta.getIvaValue() }}</td>
  638.                                             <td>{{ venta.getTotal() }}</td>
  639.                                             <td>{{ (venta.getStatus() | getStatusLabel()) | raw }}</td>
  640.                                             <td>
  641.                                                 <button  onclick=\"viewTicket({{venta.getId()}})\" class=\"btn btn-outline-primary\" ><i class=\"bx bx-file\"></i></button>
  642.                                                 <button  onclick=\"printTicket({{venta.getId()}})\" class=\"btn btn-outline-primary\" ><i class=\"bx bx-printer\"></i></button>
  643.                                                 <button  onclick=\"printTicketRegalo({{venta.getId()}})\" class=\"btn btn-outline-primary\" ><i class=\"bx bx-gift\"></i></button>
  644.                                             </td>
  645.                                     </tr>
  646.                                 {% endfor %}
  647.                             </tbody>
  648.                         </table>
  649.                         <div class=\"mt-3 col-md-12 text-center align-content-center\">
  650.                             {{ knp_pagination_render(ventas) }}
  651.                         </div>
  652.                     </div>
  653.                 </div>
  654.             </div>
  655.         </div>
  656.     </div>
  657. {% endblock %}
  658. {% block footerScripts %}
  659.     {{ parent() }}
  660.     <script>
  661.        function printTicket(id){
  662.                 \$.ajax({
  663.                     url:'{{path(\"printTicket\")}}',
  664.                     type:'POST',
  665.                     async:false,
  666.                     data: {id:id },
  667.                     success:function(html){
  668.                         var mywindow = window.open('', 'PRINT', 'height=400,width=600'); 
  669.                         mywindow.document.write(html);
  670.                         mywindow.document.close();
  671.                         mywindow.focus();
  672.                         mywindow.print();
  673.                         //mywindow.close();
  674.                     }
  675.                 });
  676.             }
  677.         function printTicketRegalo(id){
  678.             \$.ajax({
  679.                 url:'{{path(\"printTicketRegalo\")}}',
  680.                 type:'POST',
  681.                     async:false,
  682.                     data: {id:id },
  683.                     success:function(html){
  684.                         var mywindow = window.open('', 'PRINT', 'height=400,width=600'); 
  685.                         mywindow.document.write(html);
  686.                         mywindow.document.close();
  687.                         mywindow.focus();
  688.                         setTimeout(function(){
  689.                             mywindow.print();
  690.                         },2000);
  691.                         //mywindow.close();
  692.                     }
  693.                 });
  694.         }
  695.         function viewTicket(id){
  696.             \$.ajax({
  697.                 url:'{{path(\"printTicket\")}}',
  698.                 type:'POST',
  699.                 async:false,
  700.                 data: {id:id },
  701.                 success:function(html){
  702.                     var mywindow = window.open('', 'PRINT', 'height=400,width=600'); 
  703.                     mywindow.document.write(html);
  704.                     mywindow.document.close();
  705.                     mywindow.focus();
  706.                     //mywindow.print();
  707.                     //mywindow.close();
  708.                 }
  709.             });
  710.         }
  711.     </script>
  712.     
  713. {% endblock %}""clients/detail.html.twig""/home/ideosAdmin/web/nubesdecoloreskids.sell-io.es/public_html/templates/clients/detail.html.twig");
  714.     }
  715. }