var/cache/dev/twig/e7/e78f7a3a078f8af272330cc268a848ac.php line 174

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. /* role/user/ticket/intervention/activity/single.html.twig */
  15. class __TwigTemplate_91c36ed0ef6c70fd2fbda342f1d14b62 extends Template
  16. {
  17.     private $source;
  18.     private $macros = [];
  19.     public function __construct(Environment $env)
  20.     {
  21.         parent::__construct($env);
  22.         $this->source $this->getSourceContext();
  23.         $this->blocks = [
  24.             'title' => [$this'block_title'],
  25.             'pageTitleH1' => [$this'block_pageTitleH1'],
  26.             'pageTitleBreadcrumb' => [$this'block_pageTitleBreadcrumb'],
  27.             'subMenuLeft' => [$this'block_subMenuLeft'],
  28.             'subMenuRight' => [$this'block_subMenuRight'],
  29.             'interventionContent' => [$this'block_interventionContent'],
  30.             'javascripts' => [$this'block_javascripts'],
  31.         ];
  32.     }
  33.     protected function doGetParent(array $context)
  34.     {
  35.         // line 1
  36.         return "role/user/ticket/intervention/index.html.twig";
  37.     }
  38.     protected function doDisplay(array $context, array $blocks = [])
  39.     {
  40.         $macros $this->macros;
  41.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  42.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""role/user/ticket/intervention/activity/single.html.twig"));
  43.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  44.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""role/user/ticket/intervention/activity/single.html.twig"));
  45.         $this->parent $this->loadTemplate("role/user/ticket/intervention/index.html.twig""role/user/ticket/intervention/activity/single.html.twig"1);
  46.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  47.         
  48.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  49.         
  50.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  51.     }
  52.     // line 3
  53.     public function block_title($context, array $blocks = [])
  54.     {
  55.         $macros $this->macros;
  56.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  57.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  58.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  59.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  60.         yield "Ticket - Intervento - Attività";
  61.         
  62.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  63.         
  64.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  65.         return; yield '';
  66.     }
  67.     // line 5
  68.     public function block_pageTitleH1($context, array $blocks = [])
  69.     {
  70.         $macros $this->macros;
  71.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  72.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""pageTitleH1"));
  73.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  74.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""pageTitleH1"));
  75.         yield "Ticket - Intervento - Attività";
  76.         
  77.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  78.         
  79.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  80.         return; yield '';
  81.     }
  82.     // line 7
  83.     public function block_pageTitleBreadcrumb($context, array $blocks = [])
  84.     {
  85.         $macros $this->macros;
  86.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  87.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""pageTitleBreadcrumb"));
  88.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  89.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""pageTitleBreadcrumb"));
  90.         // line 8
  91.         yield "\t<li class=\"breadcrumb-item\"><a href=\"";
  92.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("user_ticket_sheet", ["ticketId" => CoreExtension::getAttribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'8$this->source); })()), "id", [], "any"falsefalsefalse8)]), "html"nulltrue);
  93.         yield "\">Ticket</a></li>
  94. \t<li class=\"breadcrumb-item\"><a href=\"javascript:void(0)\">Intervento</a></li>
  95. \t<li class=\"breadcrumb-item\"><a href=\"javascript:void(0)\">Attività</a></li>
  96. ";
  97.         
  98.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  99.         
  100.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  101.         return; yield '';
  102.     }
  103.     // line 13
  104.     public function block_subMenuLeft($context, array $blocks = [])
  105.     {
  106.         $macros $this->macros;
  107.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  108.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""subMenuLeft"));
  109.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  110.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""subMenuLeft"));
  111.         // line 14
  112.         yield "\t<li class=\"nav-item\"><a class=\"nav-link\" href=\"";
  113.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("user_ticket_intervention_activity_summary", ["interventionId" => CoreExtension::getAttribute($this->env$this->source, (isset($context["intervention"]) || array_key_exists("intervention"$context) ? $context["intervention"] : (function () { throw new RuntimeError('Variable "intervention" does not exist.'14$this->source); })()), "id", [], "any"falsefalsefalse14)]), "html"nulltrue);
  114.         yield "\">Riassunto</a></li>
  115. ";
  116.         
  117.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  118.         
  119.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  120.         return; yield '';
  121.     }
  122.     // line 17
  123.     public function block_subMenuRight($context, array $blocks = [])
  124.     {
  125.         $macros $this->macros;
  126.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  127.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""subMenuRight"));
  128.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  129.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""subMenuRight"));
  130.         
  131.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  132.         
  133.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  134.         return; yield '';
  135.     }
  136.     // line 20
  137.     public function block_interventionContent($context, array $blocks = [])
  138.     {
  139.         $macros $this->macros;
  140.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  141.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""interventionContent"));
  142.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  143.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""interventionContent"));
  144.         // line 21
  145.         yield "\t<div class=\"row\">
  146. \t\t<div class=\"col-12\">
  147. \t\t\t<h4 class=\"form_title\"><a onclick=\"showClientWarehouse()\" class=\"cursor_p\">Visualizza/Nascondi magazzino cliente</a></h4>
  148. \t\t\t<hr class=\"m_t_none\">
  149. \t\t\t<div id=\"clientWarehouse\" style=\"display:none\">
  150. \t\t\t\t";
  151.         // line 26
  152.         if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'26$this->source); })()), "client", [], "any"falsefalsefalse26), "warehouse", [], "any"falsefalsefalse26), "products", [], "any"falsefalsefalse26)) > 0)) {
  153.             // line 27
  154.             yield "\t\t\t\t\t<table class=\"table table_no_padding responsive_font_size\">
  155. \t\t\t\t\t\t<tbody>
  156. \t\t\t\t\t\t\t";
  157.             // line 29
  158.             $context['_parent'] = $context;
  159.             $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'29$this->source); })()), "client", [], "any"falsefalsefalse29), "warehouse", [], "any"falsefalsefalse29), "products", [], "any"falsefalsefalse29));
  160.             $context['loop'] = [
  161.               'parent' => $context['_parent'],
  162.               'index0' => 0,
  163.               'index'  => 1,
  164.               'first'  => true,
  165.             ];
  166.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  167.                 $length count($context['_seq']);
  168.                 $context['loop']['revindex0'] = $length 1;
  169.                 $context['loop']['revindex'] = $length;
  170.                 $context['loop']['length'] = $length;
  171.                 $context['loop']['last'] = === $length;
  172.             }
  173.             foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
  174.                 // line 30
  175.                 yield "\t\t\t\t\t\t\t\t";
  176.                 if ((CoreExtension::getAttribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse30) > 1)) {
  177.                     // line 31
  178.                     yield "\t\t\t\t\t\t\t\t\t<tr><th colspan=\"2\" style=\"padding-top: 10px!important; padding-bottom: 10px!important;border-bottom-width: 0px;\"><hr style=\"height:1px !important; margin:0px\"></th></tr>
  179. \t\t\t\t\t\t\t\t";
  180.                 }
  181.                 // line 33
  182.                 yield "\t\t\t\t\t\t\t\t<tr>
  183. \t\t\t\t\t\t\t\t\t<th class=\"td_w_100p\" style=\"border-bottom: 0px\">Modello</th>
  184. \t\t\t\t\t\t\t\t\t<td style=\"border-bottom: 0px\">";
  185.                 // line 35
  186.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["p"], "model", [], "any"falsefalsefalse35), "name", [], "any"falsefalsefalse35), "html"nulltrue);
  187.                 yield " (";
  188.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["p"], "model", [], "any"falsefalsefalse35), "sku", [], "any"falsefalsefalse35), "html"nulltrue);
  189.                 yield ")</td>
  190. \t\t\t\t\t\t\t\t</tr>
  191. \t\t\t\t\t\t\t\t<tr>
  192. \t\t\t\t\t\t\t\t\t<th style=\"border-bottom: 0px\">Termid</th>
  193. \t\t\t\t\t\t\t\t\t<td style=\"border-bottom: 0px\">";
  194.                 // line 39
  195.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["p"], "termid", [], "any"falsefalsefalse39), "html"nulltrue);
  196.                 yield "</td>
  197. \t\t\t\t\t\t\t\t</tr>
  198. \t\t\t\t\t\t\t\t<tr>
  199. \t\t\t\t\t\t\t\t\t<th style=\"border-bottom: 0px\">Matr. Produttore</th>
  200. \t\t\t\t\t\t\t\t\t<td style=\"border-bottom: 0px\">";
  201.                 // line 43
  202.                 if ((CoreExtension::getAttribute($this->env$this->source$context["p"], "codeProducer", [], "any"falsefalsefalse43) != null)) {
  203.                     yield "<a href=\"javascript: copyToClipboard(";
  204.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["p"], "id", [], "any"falsefalsefalse43), "html"nulltrue);
  205.                     yield ", 'producer')\" class=\"underline\" data-bs-toggle=\"tooltip\" title=\"Copia matricola\">";
  206.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["p"], "codeProducer", [], "any"falsefalsefalse43), "html"nulltrue);
  207.                     yield "</a>";
  208.                 } else {
  209.                     yield "---";
  210.                 }
  211.                 yield "</td>
  212. \t\t\t\t\t\t\t\t</tr>
  213. \t\t\t\t\t\t\t\t<tr>
  214. \t\t\t\t\t\t\t\t\t<th style=\"border-bottom: 0px\">Matr. Fornitore</th>
  215. \t\t\t\t\t\t\t\t\t<td style=\"border-bottom: 0px\">";
  216.                 // line 47
  217.                 if ((CoreExtension::getAttribute($this->env$this->source$context["p"], "codeSupplier", [], "any"falsefalsefalse47) != null)) {
  218.                     yield "<a href=\"javascript: copyToClipboard(";
  219.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["p"], "id", [], "any"falsefalsefalse47), "html"nulltrue);
  220.                     yield ", 'supplier')\" class=\"underline\" data-bs-toggle=\"tooltip\" title=\"Copia matricola\">";
  221.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["p"], "codeSupplier", [], "any"falsefalsefalse47), "html"nulltrue);
  222.                     yield "</a>";
  223.                 } else {
  224.                     yield "---";
  225.                 }
  226.                 yield "</td>
  227. \t\t\t\t\t\t\t\t</tr>
  228. \t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"product_";
  229.                 // line 49
  230.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["p"], "id", [], "any"falsefalsefalse49), "html"nulltrue);
  231.                 yield "_producer\" value=\"";
  232.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["p"], "codeProducer", [], "any"falsefalsefalse49), "html"nulltrue);
  233.                 yield "\">
  234. \t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"product_";
  235.                 // line 50
  236.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["p"], "id", [], "any"falsefalsefalse50), "html"nulltrue);
  237.                 yield "_supplier\" value=\"";
  238.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["p"], "codeSupplier", [], "any"falsefalsefalse50), "html"nulltrue);
  239.                 yield "\">
  240. \t\t\t\t\t\t\t";
  241.                 ++$context['loop']['index0'];
  242.                 ++$context['loop']['index'];
  243.                 $context['loop']['first'] = false;
  244.                 if (isset($context['loop']['length'])) {
  245.                     --$context['loop']['revindex0'];
  246.                     --$context['loop']['revindex'];
  247.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  248.                 }
  249.             }
  250.             $_parent $context['_parent'];
  251.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['p'], $context['_parent'], $context['loop']);
  252.             $context array_intersect_key($context$_parent) + $_parent;
  253.             // line 52
  254.             yield "\t\t\t\t\t\t</tbody>
  255. \t\t\t\t\t</table>
  256. \t\t\t\t";
  257.         } else {
  258.             // line 55
  259.             yield "\t\t\t\t\t<div class=\"style-msg infomsg\">
  260. \t\t\t\t\t\t<div class=\"sb-msg responsive_font_size\">
  261. \t\t\t\t\t\t\t<i class=\"icon-info-sign\"></i><strong>Info:</strong> Nessuna matricola registrata presente su questo cliente!
  262. \t\t\t\t\t\t</div>
  263. \t\t\t\t\t</div>
  264. \t\t\t\t";
  265.         }
  266.         // line 61
  267.         yield "\t\t\t</div>
  268. \t\t</div>
  269. \t</div>
  270. \t<input type=\"hidden\" id=\"can_submit_withdraw\" value=\"0\">
  271. \t<input type=\"hidden\" id=\"can_submit_installation\" value=\"0\">
  272. \t<input type=\"hidden\" id=\"can_submit_actual\" value=\"0\">
  273. \t";
  274.         // line 69
  275.         yield         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'69$this->source); })()), 'form_start', ["attr" => ["novalidate" => "novalidate""id" => "form"]]);
  276.         yield 
  277. \t\t<div class=\"row\">
  278. \t\t\t<div class=\"col-12\">
  279. \t\t\t\t<h4 class=\"form_title\">Dettaglia l'attività: ";
  280.         // line 72
  281.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'72$this->source); })()), "value", [], "any"falsefalsefalse72), "html"nulltrue);
  282.         yield "</h4>
  283. \t\t\t\t<hr class=\"m_t_none\">
  284. \t\t\t</div>
  285. \t\t</div>
  286. \t\t";
  287.         // line 77
  288.         yield "\t\t";
  289.         if ((CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'77$this->source); })()), "producerWithdrawMandatory", [], "any"falsefalsefalse77) || CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'77$this->source); })()), "supplierWithdrawMandatory", [], "any"falsefalsefalse77))) {
  290.             // line 78
  291.             yield "\t\t\t";
  292.             if (CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'78$this->source); })()), "producerWithdrawMandatory", [], "any"falsefalsefalse78)) {
  293.                 // line 79
  294.                 yield "\t\t\t\t<div class=\"row form-group\">
  295. \t\t\t\t\t<div class=\"col-10 col-lg-11\">
  296. \t\t\t\t\t\t<label class=\"form_label\">Ritiro - Matricola produttore*</label>
  297. \t\t\t\t\t\t<div ";
  298.                 // line 82
  299.                 yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'82$this->source); })()), "producerWithdraw", [], "any"falsefalsefalse82), 'errors');
  300.                 yield ">
  301. \t\t\t\t\t\t\t";
  302.                 // line 83
  303.                 yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'83$this->source); })()), "producerWithdraw", [], "any"falsefalsefalse83), 'widget', ["attr" => ["inputmode" => "search""onKeyDown" => "updateButtonSubmit()""onBlur" => "onBlurManageBarcode(\"producer_withdraw\")"]]);
  304.                 yield "
  305. \t\t\t\t\t\t</div>
  306. \t\t\t\t\t</div>
  307. \t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
  308. \t\t\t\t\t\t<a href=\"javascript:openScanditModal('producer_withdraw', 'produttore')\"><img src=\"";
  309.                 // line 87
  310.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((isset($context["icon_frame"]) || array_key_exists("icon_frame"$context) ? $context["icon_frame"] : (function () { throw new RuntimeError('Variable "icon_frame" does not exist.'87$this->source); })())), "html"nulltrue);
  311.                 yield "\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Scansiona\"></a>
  312. \t\t\t\t\t</div>
  313. \t\t\t\t</div>
  314. \t\t\t";
  315.             } else {
  316.                 // line 91
  317.                 yield "\t\t\t\t";
  318.                 yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'91$this->source); })()), "producerWithdraw", [], "any"falsefalsefalse91), 'widget', ["attr" => ["class" => "display_n"]]);
  319.                 yield "
  320. \t\t\t";
  321.             }
  322.             // line 93
  323.             yield "\t\t\t";
  324.             if (CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'93$this->source); })()), "supplierWithdrawMandatory", [], "any"falsefalsefalse93)) {
  325.                 // line 94
  326.                 yield "\t\t\t\t<div class=\"row form-group\">
  327. \t\t\t\t\t<div class=\"col-10 col-lg-11\">
  328. \t\t\t\t\t\t<label class=\"form_label\">Ritiro - Matricola fornitore*</label>
  329. \t\t\t\t\t\t<div ";
  330.                 // line 97
  331.                 yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'97$this->source); })()), "supplierWithdraw", [], "any"falsefalsefalse97), 'errors');
  332.                 yield ">
  333. \t\t\t\t\t\t\t";
  334.                 // line 98
  335.                 yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'98$this->source); })()), "supplierWithdraw", [], "any"falsefalsefalse98), 'widget', ["attr" => ["onKeyDown" => "updateButtonSubmit()""onBlur" => "onBlurManageBarcode(\"supplier_withdraw\")"]]);
  336.                 yield "
  337. \t\t\t\t\t\t</div>
  338. \t\t\t\t\t</div>
  339. \t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
  340. \t\t\t\t\t\t<a href=\"javascript:openScanditModal('supplier_withdraw', 'fornitore')\"><img src=\"";
  341.                 // line 102
  342.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((isset($context["icon_frame"]) || array_key_exists("icon_frame"$context) ? $context["icon_frame"] : (function () { throw new RuntimeError('Variable "icon_frame" does not exist.'102$this->source); })())), "html"nulltrue);
  343.                 yield "\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Scansiona\"></a>
  344. \t\t\t\t\t</div>
  345. \t\t\t\t</div>
  346. \t\t\t";
  347.             } else {
  348.                 // line 106
  349.                 yield "\t\t\t\t";
  350.                 yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'106$this->source); })()), "supplierWithdraw", [], "any"falsefalsefalse106), 'widget', ["attr" => ["class" => "display_n"]]);
  351.                 yield "
  352. \t\t\t";
  353.             }
  354.             // line 108
  355.             yield "\t\t\t<div class=\"row form-group\" id=\"row_model_withdraw\">
  356. \t\t\t\t<div class=\"col-10 col-lg-11\">
  357. \t\t\t\t\t<label class=\"form_label\">Ritiro - Modello</label>
  358. \t\t\t\t\t<div ";
  359.             // line 111
  360.             yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'111$this->source); })()), "modelWithdraw", [], "any"falsefalsefalse111), 'errors');
  361.             yield ">
  362. \t\t\t\t\t\t";
  363.             // line 112
  364.             yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'112$this->source); })()), "modelWithdraw", [], "any"falsefalsefalse112), 'widget', ["attr" => ["class" => "form-control""readonly" => true]]);
  365.             yield "
  366. \t\t\t\t\t</div>
  367. \t\t\t\t</div>
  368. \t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
  369. \t\t\t\t\t<a href=\"javascript: selectFromWarehouse('withdraw')\"><img src=\"";
  370.             // line 116
  371.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((isset($context["icon_selection"]) || array_key_exists("icon_selection"$context) ? $context["icon_selection"] : (function () { throw new RuntimeError('Variable "icon_selection" does not exist.'116$this->source); })())), "html"nulltrue);
  372.             yield "\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Seleziona\"></a>
  373. \t\t\t\t</div>
  374. \t\t\t\t<div class=\"col-12 switch\" id=\"row_component_withdraw\" style=\"display: none\">
  375. \t\t\t\t</div>
  376. \t\t\t</div>
  377. \t\t";
  378.         } else {
  379.             // line 122
  380.             yield "\t\t\t";
  381.             yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'122$this->source); })()), "modelWithdraw", [], "any"falsefalsefalse122), 'widget', ["attr" => ["class" => "display_n"]]);
  382.             yield "
  383. \t\t\t";
  384.             // line 123
  385.             yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'123$this->source); })()), "producerWithdraw", [], "any"falsefalsefalse123), 'widget', ["attr" => ["class" => "display_n"]]);
  386.             yield "
  387. \t\t\t";
  388.             // line 124
  389.             yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'124$this->source); })()), "supplierWithdraw", [], "any"falsefalsefalse124), 'widget', ["attr" => ["class" => "display_n"]]);
  390.             yield "
  391. \t\t";
  392.         }
  393.         // line 126
  394.         yield "\t\t";
  395.         // line 127
  396.         yield "\t\t";
  397.         if ((CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'127$this->source); })()), "producerInstallationMandatory", [], "any"falsefalsefalse127) || CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'127$this->source); })()), "supplierInstallationMandatory", [], "any"falsefalsefalse127))) {
  398.             // line 128
  399.             yield "\t\t\t";
  400.             if (CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'128$this->source); })()), "producerInstallationMandatory", [], "any"falsefalsefalse128)) {
  401.                 // line 129
  402.                 yield "\t\t\t\t<div class=\"row form-group\">
  403. \t\t\t\t\t<div class=\"col-10 col-lg-11\">
  404. \t\t\t\t\t\t<label class=\"form_label\">Installazione - Matricola produttore*</label>
  405. \t\t\t\t\t\t<div ";
  406.                 // line 132
  407.                 yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'132$this->source); })()), "producerInstallation", [], "any"falsefalsefalse132), 'errors');
  408.                 yield ">
  409. \t\t\t\t\t\t\t";
  410.                 // line 133
  411.                 yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'133$this->source); })()), "producerInstallation", [], "any"falsefalsefalse133), 'widget', ["attr" => ["inputmode" => "search""onKeyDown" => "updateButtonSubmit()""onBlur" => "onBlurManageBarcode(\"producer_installation\")"]]);
  412.                 yield "
  413. \t\t\t\t\t\t</div>
  414. \t\t\t\t\t</div>
  415. \t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
  416. \t\t\t\t\t\t<a href=\"javascript:openScanditModal('producer_installation', 'produttore')\"><img src=\"";
  417.                 // line 137
  418.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((isset($context["icon_frame"]) || array_key_exists("icon_frame"$context) ? $context["icon_frame"] : (function () { throw new RuntimeError('Variable "icon_frame" does not exist.'137$this->source); })())), "html"nulltrue);
  419.                 yield "\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Scansiona\"></a>
  420. \t\t\t\t\t</div>
  421. \t\t\t\t</div>
  422. \t\t\t";
  423.             } else {
  424.                 // line 141
  425.                 yield "\t\t\t\t";
  426.                 yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'141$this->source); })()), "producerInstallation", [], "any"falsefalsefalse141), 'widget', ["attr" => ["class" => "display_n"]]);
  427.                 yield "
  428. \t\t\t";
  429.             }
  430.             // line 143
  431.             yield "\t\t\t";
  432.             if (CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'143$this->source); })()), "supplierInstallationMandatory", [], "any"falsefalsefalse143)) {
  433.                 // line 144
  434.                 yield "\t\t\t\t<div class=\"row form-group\">
  435. \t\t\t\t\t<div class=\"col-10 col-lg-11\">
  436. \t\t\t\t\t\t<label class=\"form_label\">Installazione - Matricola fornitore*</label>
  437. \t\t\t\t\t\t<div ";
  438.                 // line 147
  439.                 yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'147$this->source); })()), "supplierInstallation", [], "any"falsefalsefalse147), 'errors');
  440.                 yield ">
  441. \t\t\t\t\t\t\t";
  442.                 // line 148
  443.                 yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'148$this->source); })()), "supplierInstallation", [], "any"falsefalsefalse148), 'widget', ["attr" => ["onKeyDown" => "updateButtonSubmit()""onBlur" => "onBlurManageBarcode(\"supplier_installation\")"]]);
  444.                 yield "
  445. \t\t\t\t\t\t</div>
  446. \t\t\t\t\t</div>
  447. \t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
  448. \t\t\t\t\t\t<a href=\"javascript:openScanditModal('supplier_installation', 'fornitore')\"><img src=\"";
  449.                 // line 152
  450.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((isset($context["icon_frame"]) || array_key_exists("icon_frame"$context) ? $context["icon_frame"] : (function () { throw new RuntimeError('Variable "icon_frame" does not exist.'152$this->source); })())), "html"nulltrue);
  451.                 yield "\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Scansiona\"></a>
  452. \t\t\t\t\t</div>
  453. \t\t\t\t</div>
  454. \t\t\t";
  455.             } else {
  456.                 // line 156
  457.                 yield "\t\t\t\t";
  458.                 yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'156$this->source); })()), "supplierInstallation", [], "any"falsefalsefalse156), 'widget', ["attr" => ["class" => "display_n"]]);
  459.                 yield "
  460. \t\t\t";
  461.             }
  462.             // line 158
  463.             yield "\t\t\t<div class=\"row form-group\" id=\"row_model_installation\">
  464. \t\t\t\t<div class=\"col-10 col-lg-11\">
  465. \t\t\t\t\t<label class=\"form_label\">Installazione - Prodotto</label>
  466. \t\t\t\t\t<div ";
  467.             // line 161
  468.             yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'161$this->source); })()), "modelInstallation", [], "any"falsefalsefalse161), 'errors');
  469.             yield ">
  470. \t\t\t\t\t\t";
  471.             // line 162
  472.             yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'162$this->source); })()), "modelInstallation", [], "any"falsefalsefalse162), 'widget', ["attr" => ["readonly" => true]]);
  473.             yield "
  474. \t\t\t\t\t</div>
  475. \t\t\t\t</div>
  476. \t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
  477. \t\t\t\t\t<a href=\"tel:";
  478.             // line 166
  479.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["company"]) || array_key_exists("company"$context) ? $context["company"] : (function () { throw new RuntimeError('Variable "company" does not exist.'166$this->source); })()), "phoneSupportTechnician", [], "any"falsefalsefalse166), "html"nulltrue);
  480.             yield "\"><img class=\"icon_red m_t_33p\" width=\"38\" src=\"";
  481.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((isset($context["icon_telephone"]) || array_key_exists("icon_telephone"$context) ? $context["icon_telephone"] : (function () { throw new RuntimeError('Variable "icon_telephone" does not exist.'166$this->source); })())), "html"nulltrue);
  482.             yield "\" data-bs-toggle=\"tooltip\" title=\"Ho un problema\"/></a>
  483. \t\t\t\t</div>
  484. \t\t\t</div>
  485. \t\t";
  486.         } else {
  487.             // line 170
  488.             yield "\t\t\t";
  489.             yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'170$this->source); })()), "modelInstallation", [], "any"falsefalsefalse170), 'widget', ["attr" => ["class" => "display_n"]]);
  490.             yield "
  491. \t\t\t";
  492.             // line 171
  493.             yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'171$this->source); })()), "producerInstallation", [], "any"falsefalsefalse171), 'widget', ["attr" => ["class" => "display_n"]]);
  494.             yield "
  495. \t\t\t";
  496.             // line 172
  497.             yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'172$this->source); })()), "supplierInstallation", [], "any"falsefalsefalse172), 'widget', ["attr" => ["class" => "display_n"]]);
  498.             yield "
  499. \t\t";
  500.         }
  501.         // line 174
  502.         yield "\t\t";
  503.         // line 175
  504.         yield "\t\t";
  505.         if ((CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'175$this->source); })()), "producerActualMandatory", [], "any"falsefalsefalse175) || CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'175$this->source); })()), "supplierActualMandatory", [], "any"falsefalsefalse175))) {
  506.             // line 176
  507.             yield "\t\t\t";
  508.             if (CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'176$this->source); })()), "producerActualMandatory", [], "any"falsefalsefalse176)) {
  509.                 // line 177
  510.                 yield "\t\t\t\t<div class=\"row form-group\">
  511. \t\t\t\t\t<div class=\"col-10 col-lg-11\">
  512. \t\t\t\t\t\t<label class=\"form_label\">Attuale - Matricola produttore*</label>
  513. \t\t\t\t\t\t<div ";
  514.                 // line 180
  515.                 yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'180$this->source); })()), "producerActual", [], "any"falsefalsefalse180), 'errors');
  516.                 yield ">
  517. \t\t\t\t\t\t\t";
  518.                 // line 181
  519.                 yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'181$this->source); })()), "producerActual", [], "any"falsefalsefalse181), 'widget', ["attr" => ["inputmode" => "search""onKeyDown" => "updateButtonSubmit()""onBlur" => "onBlurManageBarcode(\"producer_actual\")"]]);
  520.                 yield "
  521. \t\t\t\t\t\t</div>
  522. \t\t\t\t\t</div>
  523. \t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
  524. \t\t\t\t\t\t<a href=\"javascript:openScanditModal('producer_actual', 'produttore')\"><img src=\"";
  525.                 // line 185
  526.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((isset($context["icon_frame"]) || array_key_exists("icon_frame"$context) ? $context["icon_frame"] : (function () { throw new RuntimeError('Variable "icon_frame" does not exist.'185$this->source); })())), "html"nulltrue);
  527.                 yield "\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Scansiona\"></a>
  528. \t\t\t\t\t</div>
  529. \t\t\t\t</div>
  530. \t\t\t";
  531.             } else {
  532.                 // line 189
  533.                 yield "\t\t\t\t";
  534.                 yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'189$this->source); })()), "producerActual", [], "any"falsefalsefalse189), 'widget', ["attr" => ["class" => "display_n"]]);
  535.                 yield "
  536. \t\t\t";
  537.             }
  538.             // line 191
  539.             yield "\t\t\t";
  540.             if (CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'191$this->source); })()), "supplierActualMandatory", [], "any"falsefalsefalse191)) {
  541.                 // line 192
  542.                 yield "\t\t\t\t<div class=\"row form-group\">
  543. \t\t\t\t\t<div class=\"col-10 col-lg-11\">
  544. \t\t\t\t\t\t<label class=\"form_label\">Attuale - Matricola fornitore*</label>
  545. \t\t\t\t\t\t<div ";
  546.                 // line 195
  547.                 yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'195$this->source); })()), "supplierActual", [], "any"falsefalsefalse195), 'errors');
  548.                 yield ">
  549. \t\t\t\t\t\t\t";
  550.                 // line 196
  551.                 yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'196$this->source); })()), "supplierActual", [], "any"falsefalsefalse196), 'widget', ["attr" => ["onKeyDown" => "updateButtonSubmit()""onBlur" => "onBlurManageBarcode(\"supplier_actual\")"]]);
  552.                 yield "
  553. \t\t\t\t\t\t</div>
  554. \t\t\t\t\t</div>
  555. \t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
  556. \t\t\t\t\t\t<a href=\"javascript:openScanditModal('supplier_actual', 'fornitore')\"><img src=\"";
  557.                 // line 200
  558.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((isset($context["icon_frame"]) || array_key_exists("icon_frame"$context) ? $context["icon_frame"] : (function () { throw new RuntimeError('Variable "icon_frame" does not exist.'200$this->source); })())), "html"nulltrue);
  559.                 yield "\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Scansiona\"></a>
  560. \t\t\t\t\t</div>
  561. \t\t\t\t</div>
  562. \t\t\t";
  563.             } else {
  564.                 // line 204
  565.                 yield "\t\t\t\t";
  566.                 yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'204$this->source); })()), "supplierActual", [], "any"falsefalsefalse204), 'widget', ["attr" => ["class" => "display_n"]]);
  567.                 yield "
  568. \t\t\t";
  569.             }
  570.             // line 206
  571.             yield "\t\t\t<div class=\"row form-group\" id=\"row_model_actual\">
  572. \t\t\t\t<div class=\"col-10 col-lg-11\">
  573. \t\t\t\t\t<label class=\"form_label\">Attuale - Modello</label>
  574. \t\t\t\t\t<div ";
  575.             // line 209
  576.             yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'209$this->source); })()), "modelActual", [], "any"falsefalsefalse209), 'errors');
  577.             yield ">
  578. \t\t\t\t\t\t";
  579.             // line 210
  580.             yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'210$this->source); })()), "modelActual", [], "any"falsefalsefalse210), 'widget', ["attr" => ["readonly" => true]]);
  581.             yield "
  582. \t\t\t\t\t</div>
  583. \t\t\t\t</div>
  584. \t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
  585. \t\t\t\t\t<a href=\"javascript: selectFromWarehouse('actual')\"><img src=\"";
  586.             // line 214
  587.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((isset($context["icon_selection"]) || array_key_exists("icon_selection"$context) ? $context["icon_selection"] : (function () { throw new RuntimeError('Variable "icon_selection" does not exist.'214$this->source); })())), "html"nulltrue);
  588.             yield "\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Seleziona\"></a>
  589. \t\t\t\t</div>
  590. \t\t\t</div>
  591. \t\t";
  592.         } else {
  593.             // line 218
  594.             yield "\t\t\t";
  595.             yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'218$this->source); })()), "modelActual", [], "any"falsefalsefalse218), 'widget', ["attr" => ["class" => "display_n"]]);
  596.             yield "
  597. \t\t\t";
  598.             // line 219
  599.             yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'219$this->source); })()), "producerActual", [], "any"falsefalsefalse219), 'widget', ["attr" => ["class" => "display_n"]]);
  600.             yield "
  601. \t\t\t";
  602.             // line 220
  603.             yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'220$this->source); })()), "supplierActual", [], "any"falsefalsefalse220), 'widget', ["attr" => ["class" => "display_n"]]);
  604.             yield "
  605. \t\t";
  606.         }
  607.         // line 222
  608.         yield "\t\t<div class=\"row m_t_50p\">
  609. \t\t\t<div class=\"col-12 txt_a_c\">
  610. \t\t\t\t<a id=\"button_submit\" href=\"javascript: void()\" class=\"button button-3d button-small button-grey\">Inserisci</a>
  611. \t\t\t</div>
  612. \t\t</div>
  613. \t\t";
  614.         // line 227
  615.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'227$this->source); })()), "productWithdrawId", [], "any"falsefalsefalse227), 'widget');
  616.         yield "
  617. \t\t";
  618.         // line 228
  619.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'228$this->source); })()), "modelWithdrawId", [], "any"falsefalsefalse228), 'widget');
  620.         yield "
  621. \t\t";
  622.         // line 229
  623.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'229$this->source); })()), "scanOrManualProducerWithdraw", [], "any"falsefalsefalse229), 'widget');
  624.         yield "
  625. \t\t";
  626.         // line 230
  627.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'230$this->source); })()), "scanOrManualProducerWithdrawCode", [], "any"falsefalsefalse230), 'widget');
  628.         yield "
  629. \t\t";
  630.         // line 231
  631.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'231$this->source); })()), "scanOrManualSupplierWithdraw", [], "any"falsefalsefalse231), 'widget');
  632.         yield "
  633. \t\t";
  634.         // line 232
  635.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'232$this->source); })()), "scanOrManualSupplierWithdrawCode", [], "any"falsefalsefalse232), 'widget');
  636.         yield "
  637. \t\t";
  638.         // line 234
  639.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'234$this->source); })()), "productActualId", [], "any"falsefalsefalse234), 'widget');
  640.         yield "
  641. \t\t";
  642.         // line 235
  643.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'235$this->source); })()), "modelActualId", [], "any"falsefalsefalse235), 'widget');
  644.         yield "
  645. \t\t";
  646.         // line 236
  647.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'236$this->source); })()), "scanOrManualProducerActual", [], "any"falsefalsefalse236), 'widget');
  648.         yield "
  649. \t\t";
  650.         // line 237
  651.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'237$this->source); })()), "scanOrManualProducerActualCode", [], "any"falsefalsefalse237), 'widget');
  652.         yield "
  653. \t\t";
  654.         // line 238
  655.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'238$this->source); })()), "scanOrManualSupplierActual", [], "any"falsefalsefalse238), 'widget');
  656.         yield "
  657. \t\t";
  658.         // line 239
  659.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'239$this->source); })()), "scanOrManualSupplierActualCode", [], "any"falsefalsefalse239), 'widget');
  660.         yield "
  661. \t\t";
  662.         // line 241
  663.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'241$this->source); })()), "productInstallationId", [], "any"falsefalsefalse241), 'widget');
  664.         yield "
  665. \t\t";
  666.         // line 242
  667.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'242$this->source); })()), "scanOrManualProducerInstallation", [], "any"falsefalsefalse242), 'widget');
  668.         yield "
  669. \t\t";
  670.         // line 243
  671.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'243$this->source); })()), "scanOrManualProducerInstallationCode", [], "any"falsefalsefalse243), 'widget');
  672.         yield "
  673. \t\t";
  674.         // line 244
  675.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'244$this->source); })()), "scanOrManualSupplierInstallation", [], "any"falsefalsefalse244), 'widget');
  676.         yield "
  677. \t\t";
  678.         // line 245
  679.         yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'245$this->source); })()), "scanOrManualSupplierInstallationCode", [], "any"falsefalsefalse245), 'widget');
  680.         yield "
  681. \t\t
  682. \t\t<input type=\"hidden\" name=\"activityTypeId\" value=\"";
  683.         // line 247
  684.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'247$this->source); })()), "id", [], "any"falsefalsefalse247), "html"nulltrue);
  685.         yield "\">
  686. \t\t<input type=\"hidden\" name=\"ticketId\" value=\"";
  687.         // line 248
  688.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'248$this->source); })()), "id", [], "any"falsefalsefalse248), "html"nulltrue);
  689.         yield "\">
  690. \t";
  691.         // line 249
  692.         yield         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'249$this->source); })()), 'form_end');
  693.         yield "
  694. \t<div id=\"selectProductModal\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\">
  695. \t\t<div class=\"modal-dialog modal-lg\" role=\"document\">
  696. \t\t\t<div class=\"modal-content\">
  697. \t\t\t\t<div class=\"modal-header\"><h3 class=\"modal-title\">Seleziona prodotto dal magazzino cliente</h3></div>
  698. \t\t\t\t<div class=\"modal-body\">
  699. \t\t\t\t\t<div class=\"row\">
  700. \t\t\t\t\t\t<div class=\"col-12 overflow_a\">
  701. \t\t\t\t\t\t\t<table id=\"table_products\" class=\"table table-sm responsive_font_size\">
  702. \t\t\t\t\t\t\t\t<thead>
  703. \t\t\t\t\t\t\t\t\t<tr>
  704. \t\t\t\t\t\t\t\t\t\t<td colspan=\"2\"><input type=\"text\" class=\"form-control font_12\" id=\"filter_search_product\" onKeyPress=\"searchProducts()\" onBlur=\"searchProducts()\"/></td>
  705. \t\t\t\t\t\t\t\t\t</tr>
  706. \t\t\t\t\t\t\t\t</thead>
  707. \t\t\t\t\t\t\t\t<tbody id=\"tbody_products\">
  708. \t\t\t\t\t\t\t\t</tbody>
  709. \t\t\t\t\t\t\t</table>
  710. \t\t\t\t\t\t</div>
  711. \t\t\t\t\t</div>
  712. \t\t\t\t</div>
  713. \t\t\t\t<div class=\"modal-footer txt_a_c\">
  714. \t\t\t\t\t<a href=\"javascript:void(0)\" class=\"button button-3d button-mini button-pr\" data-bs-dismiss=\"modal\">Chiudi</a>
  715. \t\t\t\t</div>
  716. \t\t\t</div>
  717. \t\t</div>
  718. \t</div>
  719. \t<div id=\"selectModelModal\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\">
  720. \t\t<div class=\"modal-dialog modal-lg\" role=\"document\">
  721. \t\t\t<div class=\"modal-content\">
  722. \t\t\t\t<div class=\"modal-header\"><h3 class=\"modal-title\">Seleziona modello</h3></div>
  723. \t\t\t\t<div class=\"modal-body\">
  724. \t\t\t\t\t<div class=\"row\">
  725. \t\t\t\t\t\t<div class=\"col-12 overflow_a\">
  726. \t\t\t\t\t\t\t<table id=\"table_models\" class=\"table table-sm responsive_font_size\">
  727. \t\t\t\t\t\t\t\t<thead>
  728. \t\t\t\t\t\t\t\t\t<tr>
  729. \t\t\t\t\t\t\t\t\t\t<td colspan=\"5\" class=\"txt_a_c\"><a href=\"javascript: updateSelectCodeModal('products')\" class=\"button button-3d button-mini button-pr\">Cerca prodotto nel magazzino cliente</a></td>
  730. \t\t\t\t\t\t\t\t\t</tr>
  731. \t\t\t\t\t\t\t\t\t<tr>
  732. \t\t\t\t\t\t\t\t\t\t<td><input type=\"text\" class=\"form-control font_12\" id=\"filter_search_model\" onKeyPress=\"searchModels()\" onBlur=\"searchModels()\"/></td>
  733. \t\t\t\t\t\t\t\t\t\t<td class=\"td_action\"><a href=\"tel:";
  734.         // line 291
  735.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["company"]) || array_key_exists("company"$context) ? $context["company"] : (function () { throw new RuntimeError('Variable "company" does not exist.'291$this->source); })()), "phoneSupportTechnician", [], "any"falsefalsefalse291), "html"nulltrue);
  736.         yield "\" data-bs-toggle=\"tooltip\" title=\"Richiedi inserimento nuovo\"><img class=\"icon_red\" src=\"";
  737.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((isset($context["icon_telephone"]) || array_key_exists("icon_telephone"$context) ? $context["icon_telephone"] : (function () { throw new RuntimeError('Variable "icon_telephone" does not exist.'291$this->source); })())), "html"nulltrue);
  738.         yield "\" /></a></td>
  739. \t\t\t\t\t\t\t\t\t</tr>
  740. \t\t\t\t\t\t\t\t</thead>
  741. \t\t\t\t\t\t\t\t<tbody id=\"tbody_models\">
  742. \t\t\t\t\t\t\t\t</tbody>
  743. \t\t\t\t\t\t\t</table>
  744. \t\t\t\t\t\t</div>
  745. \t\t\t\t\t</div>
  746. \t\t\t\t</div>
  747. \t\t\t\t<div class=\"modal-footer txt_a_c\">
  748. \t\t\t\t\t<a href=\"javascript:void(0)\" class=\"button button-3d button-mini button-pr\" data-bs-dismiss=\"modal\">Chiudi</a>
  749. \t\t\t\t</div>
  750. \t\t\t</div>
  751. \t\t</div>
  752. \t</div>
  753. \t<input type=\"hidden\" id=\"selected_type\">
  754. \t<input type=\"hidden\" id=\"scanned_type\">
  755. \t<div id=\"modalWarehouseOther\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\">
  756. \t\t<div class=\"modal-dialog\" role=\"document\">
  757. \t\t\t<div class=\"modal-content\">
  758. \t\t\t\t<div class=\"modal-header\"><h3 class=\"modal-title\">Magazzino non corrispondente</h3></div>\t\t\t
  759. \t\t\t\t<div class=\"modal-body\">
  760. \t\t\t\t\t<input type=\"hidden\" id=\"move_product_id\">
  761. \t\t\t\t\t<input type=\"hidden\" id=\"move_type\">
  762. \t\t\t\t\t<div class=\"row\">
  763. \t\t\t\t\t\t<div class=\"col-12 txt_a_c\">
  764. \t\t\t\t\t\t\t<input type=\"hidden\" id=\"move_product_type\" />
  765. \t\t\t\t\t\t\t<label class=\"modal_subtitle\">Attenzione!</label>
  766. \t\t\t\t\t\t\t<p class=\"modal_paragraph\">La matricola corrisponde a un prodotto che è presente nel magazzino <span id=\"move_warehouse_nickname\" class=\"f_w_b\"></span>!</p>
  767. \t\t\t\t\t\t\t";
  768.         // line 322
  769.         if ((CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'322$this->source); })()), "user", [], "any"falsefalsefalse322), "accountTypology", [], "any"falsefalsefalse322) != "technician")) {
  770.             // line 323
  771.             yield "\t\t\t\t\t\t\t\t<p class=\"modal_paragraph\">Cliccando sul bottone <a class='button button-3d button-mini button-green' href='javascript:void(0)'>sposta</a> lo inserirai nel magazzino corretto per poter chiudere l'intervento.<br>Si è sicuri di voler proseguire?</p>
  772. \t\t\t\t\t\t\t";
  773.         } else {
  774.             // line 325
  775.             yield "\t\t\t\t\t\t\t\t<a href=\"tel:";
  776.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["company"]) || array_key_exists("company"$context) ? $context["company"] : (function () { throw new RuntimeError('Variable "company" does not exist.'325$this->source); })()), "phoneSupportTechnician", [], "any"falsefalsefalse325), "html"nulltrue);
  777.             yield "\"><img class=\"icon_red m_t_33p\" width=\"38\" src=\"";
  778.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((isset($context["icon_telephone"]) || array_key_exists("icon_telephone"$context) ? $context["icon_telephone"] : (function () { throw new RuntimeError('Variable "icon_telephone" does not exist.'325$this->source); })())), "html"nulltrue);
  779.             yield "\" data-bs-toggle=\"tooltip\" title=\"Ho un problema\"/></a>
  780. \t\t\t\t\t\t\t";
  781.         }
  782.         // line 327
  783.         yield "\t\t\t\t\t\t</div>
  784. \t\t\t\t\t</div>
  785. \t\t\t\t</div>
  786. \t\t\t\t<div class=\"modal-footer\">
  787. \t\t\t\t\t";
  788.         // line 331
  789.         if ((CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'331$this->source); })()), "user", [], "any"falsefalsefalse331), "accountTypology", [], "any"falsefalsefalse331) != "technician")) {
  790.             // line 332
  791.             yield "\t\t\t\t\t\t<a href=\"javascript:void(0)\" class=\"button button-3d button-mini button-red f_left\" data-bs-dismiss=\"modal\">Annulla</a>
  792. \t\t\t\t\t\t<a href=\"javascript:moveProduct()\" class=\"button button-3d button-mini button-green f_right\">Sposta</a>
  793. \t\t\t\t\t";
  794.         } else {
  795.             // line 335
  796.             yield "\t\t\t\t\t\t<a href=\"javascript:void(0)\" class=\"button button-3d button-mini button-red\" data-bs-dismiss=\"modal\">Annulla</a>
  797. \t\t\t\t\t";
  798.         }
  799.         // line 337
  800.         yield "\t\t\t\t</div>
  801. \t\t\t</div>
  802. \t\t</div>
  803. \t</div>
  804. \t<div id=\"scanditReaderModal\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\">
  805. \t\t<div class=\"modal-dialog modal-lg\" role=\"document\">
  806. \t\t\t<div class=\"modal-content\">
  807. \t\t\t\t<div class=\"modal-header\"><h3 class=\"modal-title\">Inquadra matricola <span id=\"scandit_code_type\" class=\"color_w\"></span></h3></div>                
  808. \t\t\t\t<div class=\"modal-body\">
  809. \t\t\t\t\t<input type=\"hidden\" id=\"scandit_reader_active\" value=\"0\">
  810. \t\t\t\t\t<div id=\"data-capture-view\"></div>
  811. \t\t\t\t\t<a id=\"scandit_button_scan\" href=\"javascript: scanditUpdateScan(1)\" class=\"button button-3d button-mini button-green\" style=\"position: fixed; bottom: 30%; right: 10px;\">Attiva scansione</a>
  812. \t\t\t\t</div>
  813. \t\t\t\t<div class=\"modal-footer txt_a_c\">
  814. \t\t\t\t\t<a href=\"javascript:void(0)\" class=\"button button-3d button-mini button-pr\" data-bs-dismiss=\"modal\">Chiudi</a>
  815. \t\t\t\t</div>
  816. \t\t\t</div>
  817. \t\t</div>
  818. \t</div>
  819. ";
  820.         
  821.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  822.         
  823.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  824.         return; yield '';
  825.     }
  826.     // line 359
  827.     public function block_javascripts($context, array $blocks = [])
  828.     {
  829.         $macros $this->macros;
  830.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  831.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  832.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  833.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  834.         // line 360
  835.         yield "\t";
  836.         yield from $this->yieldParentBlock("javascripts"$context$blocks);
  837.         yield "
  838. \t";
  839.         // line 361
  840.         yield from         $this->loadTemplate("components/js/scandit_js.html.twig""role/user/ticket/intervention/activity/single.html.twig"361)->unwrap()->yield(CoreExtension::merge($context, ["action" => "intervention"]));
  841.         // line 362
  842.         yield "\t";
  843.         if (CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'362$this->source); })()), "pos", [], "any"falsefalsefalse362)) {
  844.             $context["posAccessory"] = "POS";
  845.         } else {
  846.             $context["posAccessory"] = "Accessorio";
  847.         }
  848.         // line 363
  849.         yield "\t<script>
  850. \t\t\$(document).ready(function(){
  851. \t\t\t";
  852.         // line 365
  853.         if ((CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'365$this->source); })()), "producerWithdrawMandatory", [], "any"falsefalsefalse365) || CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'365$this->source); })()), "supplierWithdrawMandatory", [], "any"falsefalsefalse365))) {
  854.             // line 366
  855.             yield "\t\t\t\tshowWithdrawModelComponent(document.getElementById('form_intervention_activity_modelWithdrawId').value);
  856. \t\t\t";
  857.         }
  858.         // line 368
  859.         yield "
  860. \t\t\t";
  861.         // line 369
  862.         if (((CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'369$this->source); })()), "producerWithdrawMandatory", [], "any"falsefalsefalse369) == false) && (CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'369$this->source); })()), "supplierWithdrawMandatory", [], "any"falsefalsefalse369) == false))) {
  863.             // line 370
  864.             yield "\t\t\t\tupdateCanSubmitField(\"producer_withdraw\", 1);
  865. \t\t\t";
  866.         }
  867.         // line 372
  868.         yield "\t\t\t";
  869.         if (((CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'372$this->source); })()), "producerActualMandatory", [], "any"falsefalsefalse372) == false) && (CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'372$this->source); })()), "supplierActualMandatory", [], "any"falsefalsefalse372) == false))) {
  870.             // line 373
  871.             yield "\t\t\t\tupdateCanSubmitField(\"producer_actual\", 1);
  872. \t\t\t";
  873.         }
  874.         // line 375
  875.         yield "\t\t\t";
  876.         if (((CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'375$this->source); })()), "producerInstallationMandatory", [], "any"falsefalsefalse375) == false) && (CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'375$this->source); })()), "supplierInstallationMandatory", [], "any"falsefalsefalse375) == false))) {
  877.             // line 376
  878.             yield "\t\t\t\tupdateCanSubmitField(\"producer_installation\", 1);
  879. \t\t\t";
  880.         }
  881.         // line 378
  882.         yield "\t\t\tupdateButtonSubmit();
  883. \t\t});
  884. \t\t\t
  885. \t\tdocument.body.addEventListener(\"keypress\", function(e) {
  886. \t\t\tif(e.key == 'Enter' || e.key == 'Tab'){
  887. \t\t\t\tswitch(document.activeElement.id){
  888. \t\t\t\t\tcase 'form_intervention_activity_producerWithdraw': var type = 'producer_withdraw'; break;
  889. \t\t\t\t\tcase 'form_intervention_activity_supplierWithdraw': var type = 'supplier_withdraw'; break;
  890. \t\t\t\t\tcase 'form_intervention_activity_producerInstallation': var type = 'producer_installation'; break;
  891. \t\t\t\t\tcase 'form_intervention_activity_supplierInstallation': var type = 'supplier_installation'; break;
  892. \t\t\t\t\tcase 'form_intervention_activity_producerActual': var type = 'producer_actual'; break;
  893. \t\t\t\t\tcase 'form_intervention_activity_supplierActual': var type = 'supplier_actual'; break;
  894. \t\t\t\t\tdefault: break;
  895. \t\t\t\t}
  896. \t\t\t\tdocument.activeElement.blur();
  897. \t\t\t}
  898. \t\t});
  899. \t\t
  900. \t\tfunction openScanditModal(type, label){
  901. \t\t\tdocument.getElementById('scanned_type').value = type;
  902. \t\t\tdocument.getElementById('scandit_code_type').innerHTML = label;
  903. \t\t\t\$('#scanditReaderModal').modal({backdrop: 'static', keyboard: false}).modal(\"show\");
  904. \t\t}
  905. \t\t
  906. \t\tfunction closeModal(){
  907. \t\t\tdocument.getElementById('scandit_reader_active').value = 0;
  908. \t\t\t\$('#scanditReaderModal').modal('hide');
  909. \t\t}
  910. \t\t
  911. \t\tfunction selectFromWarehouse(type){
  912. \t\t\tvar typeVal = '';
  913. \t\t\tdocument.getElementById('selected_type').value = type;
  914. \t\t\tswitch(type){
  915. \t\t\t\tcase 'actual': typeVal = 'Actual'; break;
  916. \t\t\t\tcase 'withdraw': typeVal = 'Withdraw'; break;
  917. \t\t\t\tdefault: break;
  918. \t\t\t}
  919. \t\t\tif(document.getElementById('form_intervention_activity_producer' + typeVal).value != '' || document.getElementById('form_intervention_activity_supplier' + typeVal).value != ''){
  920. \t\t\t\tsearchModels();
  921. \t\t\t\t\$('#selectModelModal').modal({backdrop: 'static', keyboard: false}).modal(\"show\");
  922. \t\t\t}
  923. \t\t\telse{
  924. \t\t\t\tsearchProducts();
  925. \t\t\t\t\$('#selectProductModal').modal({backdrop: 'static', keyboard: false}).modal(\"show\");
  926. \t\t\t}\t\t
  927. \t\t}
  928. \t\tfunction updateSelectCodeModal(table){
  929. \t\t\tif(table == 'models'){
  930. \t\t\t\tsearchModels();
  931. \t\t\t\t\$('#selectProductModal').modal('hide');
  932. \t\t\t\t\$('#selectModelModal').modal({backdrop: 'static', keyboard: false}).modal(\"show\");
  933. \t\t\t}
  934. \t\t\telse{
  935. \t\t\t\tsearchProducts();
  936. \t\t\t\t\$('#selectModelModal').modal('hide');
  937. \t\t\t\t\$('#selectProductModal').modal({backdrop: 'static', keyboard: false}).modal(\"show\");
  938. \t\t\t}
  939. \t\t}
  940. \t\t";
  941.         // line 439
  942.         yield "\t\tfunction searchProducts(){
  943. \t\t\tvar type = document.getElementById('selected_type').value;
  944. \t\t\tvar filter = document.getElementById('filter_search_product').value;
  945. \t\t\t\$.post('";
  946.         // line 443
  947.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("user_ticket_intervention_activity_product_search");
  948.         yield "', {ticketId:\"";
  949.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'443$this->source); })()), "id", [], "any"falsefalsefalse443), "html"nulltrue);
  950.         yield "\", interventionId:\"";
  951.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["intervention"]) || array_key_exists("intervention"$context) ? $context["intervention"] : (function () { throw new RuntimeError('Variable "intervention" does not exist.'443$this->source); })()), "id", [], "any"falsefalsefalse443), "html"nulltrue);
  952.         yield "\", activityTypeId:\"";
  953.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'443$this->source); })()), "id", [], "any"falsefalsefalse443), "html"nulltrue);
  954.         yield "\", type:type, filter: filter, isPos:\"";
  955.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["isPos"]) || array_key_exists("isPos"$context) ? $context["isPos"] : (function () { throw new RuntimeError('Variable "isPos" does not exist.'443$this->source); })()), "html"nulltrue);
  956.         yield "\"}, function(response){ 
  957. \t\t\t\tif(response.code == 200 && response.success){
  958. \t\t\t\t\tvar tbody = document.getElementById('tbody_products');
  959. \t\t\t\t\ttbody.innerHTML = '';
  960. \t\t\t\t\tvar products = JSON.parse(response.products);
  961. \t\t\t\t\t
  962. \t\t\t\t\tif(products.length > 0){
  963. \t\t\t\t\t\tfor(i=0; i<products.length; i++){
  964. \t\t\t\t\t\t\tvar tr = document.createElement('tr');
  965. \t\t\t\t\t\t\tvar td = document.createElement('td');
  966. \t\t\t\t\t\t\tvar tdSel = document.createElement('td');
  967. \t\t\t\t\t\t\ttd.innerHTML = '<table class=\"table table_no_padding b_none m_b_none\"><tr><th class=\"td_w_120p\">Modello</th><td id=\"model_' + products[i].id + '\">' + products[i].modelName + '</td></tr><tr><th>Matr. produttore</th><td id=\"code_producer_' + products[i].id + '\">' + products[i].codeProducer + '</td></tr><tr><th id=\"code_supplier_' + products[i].id + '\">Matr. fornitore</th><td>' + products[i].codeSupplier + '</td></tr></table>';
  968. \t\t\t\t\t\t\ttdSel.className = 'td_action';
  969. \t\t\t\t\t\t\ttdSel.innerHTML = '<a href=\"javascript: selectProduct(' + products[i].id + ')\" data-bs-toggle=\"tooltip\" title=\"Seleziona\"><img class=\"icon_green\" src=\"";
  970.         // line 458
  971.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((isset($context["icon_select"]) || array_key_exists("icon_select"$context) ? $context["icon_select"] : (function () { throw new RuntimeError('Variable "icon_select" does not exist.'458$this->source); })())), "html"nulltrue);
  972.         yield "\" /></a>';
  973. \t\t\t\t\t\t\ttr.appendChild(td);
  974. \t\t\t\t\t\t\ttr.appendChild(tdSel);
  975. \t\t\t\t\t\t\ttbody.appendChild(tr);
  976. \t\t\t\t\t\t}
  977. \t\t\t\t\t}
  978. \t\t\t\t\telse{
  979. \t\t\t\t\t\tvar tr = document.createElement('tr');
  980. \t\t\t\t\t\tvar td = document.createElement('td');
  981. \t\t\t\t\t\ttd.setAttribute('colspan', '2');
  982. \t\t\t\t\t\ttd.innerHTML = 'La ricerca non ha trovato prodotti, <a href=\"javascript: updateSelectCodeModal(\\'models\\')\" class=\"button button-3d button-mini button-pr\">Inserisci nuovo modello</a>';
  983. \t\t\t\t\t\ttr.appendChild(td);
  984. \t\t\t\t\t\ttbody.appendChild(tr);
  985. \t\t\t\t\t}
  986. \t\t\t\t}
  987. \t\t\t}, \"json\");
  988. \t\t}
  989. \t\tfunction selectProduct(productId){
  990. \t\t\tif(document.getElementById('selected_type').value == 'withdraw'){
  991. \t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdrawId').value = null;
  992. \t\t\t\tdocument.getElementById('form_intervention_activity_productWithdrawId').value = productId;
  993. \t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdraw').value = document.getElementById('model_' + productId).innerHTML;
  994. \t\t\t\tdocument.getElementById('form_intervention_activity_producerWithdraw').value = document.getElementById('code_producer_' + productId).innerHTML;
  995. \t\t\t\tdocument.getElementById('form_intervention_activity_supplierWithdraw').value = document.getElementById('code_supplier_' + productId).innerHTML;
  996. \t\t\t}
  997. \t\t\tif(document.getElementById('selected_type').value == 'installation'){
  998. \t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallationId').value = null;
  999. \t\t\t\tdocument.getElementById('form_intervention_activity_productInstallationId').value = productId;
  1000. \t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallation').value = document.getElementById('model_' + productId).innerHTML;
  1001. \t\t\t\tdocument.getElementById('form_intervention_activity_producerInstallation').value = document.getElementById('code_producer_' + productId).innerHTML;
  1002. \t\t\t\tdocument.getElementById('form_intervention_activity_supplierInstallation').value = document.getElementById('code_supplier_' + productId).innerHTML;
  1003. \t\t\t}
  1004. \t\t\tif(document.getElementById('selected_type').value == 'actual'){
  1005. \t\t\t\tdocument.getElementById('form_intervention_activity_modelActualId').value = null;
  1006. \t\t\t\tdocument.getElementById('form_intervention_activity_productActualId').value = productId;
  1007. \t\t\t\tdocument.getElementById('form_intervention_activity_modelActual').value = document.getElementById('model_' + productId).innerHTML;
  1008. \t\t\t\tdocument.getElementById('form_intervention_activity_producerActual').value = document.getElementById('code_producer_' + productId).innerHTML;
  1009. \t\t\t\tdocument.getElementById('form_intervention_activity_supplierActual').value = document.getElementById('code_supplier_' + productId).innerHTML;
  1010. \t\t\t}
  1011. \t\t\t\$('#selectProductModal').modal({backdrop: 'static', keyboard: false}).modal(\"hide\");
  1012. \t\t}
  1013. \t\t";
  1014.         // line 503
  1015.         yield "\t\tfunction searchModels(){
  1016. \t\t\tvar filter = document.getElementById('filter_search_model').value;
  1017. \t\t\t\$.post('";
  1018.         // line 506
  1019.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("user_ticket_intervention_activity_model_search");
  1020.         yield "', {interventionId: \"";
  1021.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["intervention"]) || array_key_exists("intervention"$context) ? $context["intervention"] : (function () { throw new RuntimeError('Variable "intervention" does not exist.'506$this->source); })()), "id", [], "any"falsefalsefalse506), "html"nulltrue);
  1022.         yield "\", activityTypeId:\"";
  1023.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'506$this->source); })()), "id", [], "any"falsefalsefalse506), "html"nulltrue);
  1024.         yield "\", isPos:\"";
  1025.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["isPos"]) || array_key_exists("isPos"$context) ? $context["isPos"] : (function () { throw new RuntimeError('Variable "isPos" does not exist.'506$this->source); })()), "html"nulltrue);
  1026.         yield "\", filter: filter}, function(response){ 
  1027. \t\t\t\tif(response.code == 200 && response.success){
  1028. \t\t\t\t\tvar tbody = document.getElementById('tbody_models');
  1029. \t\t\t\t\ttbody.innerHTML = '';
  1030. \t\t\t\t\tvar models = JSON.parse(response.models);
  1031. \t\t\t\t\t
  1032. \t\t\t\t\tif(models.length > 0){
  1033. \t\t\t\t\t\tfor(i=0; i<models.length; i++){
  1034. \t\t\t\t\t\t\tvar tr = document.createElement('tr');
  1035. \t\t\t\t\t\t\tvar td = document.createElement('td');
  1036. \t\t\t\t\t\t\tvar tdName = document.createElement('td');
  1037. \t\t\t\t\t\t\tvar tdSel = document.createElement('td');
  1038. \t\t\t\t\t\t\t
  1039. \t\t\t\t\t\t\ttd.innerHTML = '<table class=\"table table_no_padding b_none m_b_none\"><tr><th class=\"td_w_70p\">Modello</th><td id=\"name_' + models[i].id + '\">' + models[i].name + '<td><tr><th>Cat/S.Cat</th><td>' + models[i].category + '/' + models[i].subcategory + '</td></tr><tr><th>Produttore</th><td>' + models[i].producer + '</td></tr></table>';
  1040. \t\t\t\t\t\t\ttdSel.className = 'td_action';
  1041. \t\t\t\t\t\t\ttdSel.innerHTML = '<a href=\"javascript: selectModel(' + models[i].id + ')\" data-bs-toggle=\"tooltip\" title=\"Seleziona\"><img class=\"icon_green\" src=\"";
  1042.         // line 522
  1043.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((isset($context["icon_select"]) || array_key_exists("icon_select"$context) ? $context["icon_select"] : (function () { throw new RuntimeError('Variable "icon_select" does not exist.'522$this->source); })())), "html"nulltrue);
  1044.         yield "\" /></a>';
  1045. \t\t\t\t\t\t\ttr.appendChild(td);
  1046. \t\t\t\t\t\t\ttr.appendChild(tdSel);
  1047. \t\t\t\t\t\t\ttbody.appendChild(tr);
  1048. \t\t\t\t\t\t}
  1049. \t\t\t\t\t}
  1050. \t\t\t\t\telse{
  1051. \t\t\t\t\t\tvar tr = document.createElement('tr');
  1052. \t\t\t\t\t\tvar td = document.createElement('td');
  1053. \t\t\t\t\t\ttd.setAttribute('colspan', '2');
  1054. \t\t\t\t\t\ttd.innerHTML = 'La ricerca non ha trovato modelli. Controlla la correttezza della ricerca o richiedi di inserire il modello attraverso il pulsante telefono.';
  1055. \t\t\t\t\t\ttr.appendChild(td);
  1056. \t\t\t\t\t\ttbody.appendChild(tr);
  1057. \t\t\t\t\t}
  1058. \t\t\t\t}
  1059. \t\t\t}, \"json\");
  1060. \t\t}
  1061. \t\tfunction selectModel(modelId){
  1062. \t\t\tif(document.getElementById('selected_type').value == 'withdraw'){
  1063. \t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdrawId').value = modelId;
  1064. \t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdraw').value = document.getElementById('name_' + modelId).innerHTML;
  1065. \t\t\t\tshowWithdrawModelComponent(modelId);
  1066. \t\t\t}
  1067. \t\t\tif(document.getElementById('selected_type').value == 'installation'){
  1068. \t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallationId').value = modelId;
  1069. \t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallation').value = document.getElementById('name_' + modelId).innerHTML;
  1070. \t\t\t}
  1071. \t\t\tif(document.getElementById('selected_type').value == 'actual'){
  1072. \t\t\t\tdocument.getElementById('form_intervention_activity_modelActualId').value = modelId;
  1073. \t\t\t\tdocument.getElementById('form_intervention_activity_modelActual').value = document.getElementById('name_' + modelId).innerHTML;
  1074. \t\t\t}
  1075. \t\t\t\$('#selectModelModal').modal({backdrop: 'static', keyboard: false}).modal(\"hide\");
  1076. \t\t}
  1077. \t\tfunction showWithdrawModelComponent(modelId){
  1078. \t\t\t\$.post('";
  1079.         // line 559
  1080.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("user_ticket_intervention_activity_model_components");
  1081.         yield "', {activityTypeId: \"";
  1082.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'559$this->source); })()), "id", [], "any"falsefalsefalse559), "html"nulltrue);
  1083.         yield "\", modelId: modelId}, function(response){ 
  1084. \t\t\t\tif(response.code == 200 && response.success){
  1085. \t\t\t\t\tvar components = JSON.parse(response.components);
  1086. \t\t\t\t\t
  1087. \t\t\t\t\tvar rowComponent = document.getElementById('row_component_withdraw');
  1088. \t\t\t\t\trowComponent.innerHTML = '';
  1089. \t\t\t\t\trowComponent.className = 'col-12 switch m_t_20p';
  1090. \t\t\t\t\tvar table = document.createElement('table');
  1091. \t\t\t\t\ttable.className = \"table b_none table_no_padding m_none\";
  1092. \t\t\t\t\tif(components.length == 0){
  1093. \t\t\t\t\t\tvar tr = document.createElement('tr');
  1094. \t\t\t\t\t\ttr.innerHTML = '<td style=\"border-bottom: 2px solid #fff!important;\"><label class=\"m_b_none l_s_none f_w_500 p_tb_0p\">Nessun componente associato a questo modello</label></td>';
  1095. \t\t\t\t\t\ttable.appendChild(tr);
  1096. \t\t\t\t\t}
  1097. \t\t\t\t\telse{
  1098. \t\t\t\t\t\tvar label = document.createElement('label');
  1099. \t\t\t\t\t\tlabel.className = 'm_b_none l_s_none f_w_500';
  1100. \t\t\t\t\t\tlabel.innerHTML = 'Seleziona i componenti che hai ritirato insieme al prodotto/modello';
  1101. \t\t\t\t\t\tfor(i=0; i<components.length; i++){
  1102. \t\t\t\t\t\t\tvar tr = document.createElement('tr');
  1103. \t\t\t\t\t\t\ttr.innerHTML = '<td class=\"td_w_40p\" style=\"border-bottom: 2px solid #fff!important;\"><input id=\"component_' + components[i].id + '\" class=\"switch-toggle switch-flat-mini switch-toggle-flat\" type=\"checkbox\" name=\"component_' + components[i].id + '\"><label for=\"component_' + components[i].id + '\" class=\"m_b_none p_tb_0p\"></label></td><td class=\"txt_a_l\" style=\"border-bottom: 2px solid #fff!important;\"><label class=\"m_b_none l_s_none f_w_500 p_tb_0p\">' + components[i].name + '</label></td>';
  1104. \t\t\t\t\t\t\ttable.appendChild(tr);
  1105. \t\t\t\t\t\t}
  1106. \t\t\t\t\t\trowComponent.appendChild(label);
  1107. \t\t\t\t\t}
  1108. \t\t\t\t\trowComponent.appendChild(table);
  1109. \t\t\t\t\trowComponent.style.display = 'block';
  1110. \t\t\t\t}
  1111. \t\t\t}, \"json\");
  1112. \t\t}
  1113. \t\t
  1114. \t\tfunction onBlurManageBarcode(type){
  1115. \t\t\tdocument.getElementById(\"move_type\").value = type;
  1116. \t\t\tswitch(type){
  1117. \t\t\t\tcase 'producer_withdraw': 
  1118. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"withdraw\";
  1119. \t\t\t\t\tvar codeTypeLabel = \"produttore\";
  1120. \t\t\t\t\tvar code = document.getElementById('form_intervention_activity_producerWithdraw').value;
  1121. \t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualProducerWithdrawCode').value != code){
  1122. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerWithdrawCode').value = code;
  1123. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerWithdraw').value = 'manual';
  1124. \t\t\t\t\t}
  1125. \t\t\t\t\tbreak;
  1126. \t\t\t\tcase 'supplier_withdraw': 
  1127. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"withdraw\";
  1128. \t\t\t\t\tvar codeTypeLabel = \"fornitore\";
  1129. \t\t\t\t\tvar code = document.getElementById('form_intervention_activity_supplierWithdraw').value;
  1130. \t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualSupplierWithdrawCode').value != code){
  1131. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierWithdrawCode').value = code;
  1132. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierWithdraw').value = 'manual';
  1133. \t\t\t\t\t}
  1134. \t\t\t\t\tbreak;
  1135. \t\t\t\tcase 'producer_installation': 
  1136. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"installation\";
  1137. \t\t\t\t\tvar codeTypeLabel = \"produttore\";
  1138. \t\t\t\t\tvar code = document.getElementById('form_intervention_activity_producerInstallation').value;
  1139. \t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualProducerInstallationCode').value != code){
  1140. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerInstallationCode').value = code;
  1141. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerInstallation').value = 'manual';
  1142. \t\t\t\t\t}
  1143. \t\t\t\t\tbreak;
  1144. \t\t\t\tcase 'supplier_installation': 
  1145. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"installation\";
  1146. \t\t\t\t\tvar codeTypeLabel = \"fornitore\";
  1147. \t\t\t\t\tvar code = document.getElementById('form_intervention_activity_supplierInstallation').value;
  1148. \t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualSupplierInstallationCode').value != code){
  1149. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierInstallationCode').value = code;
  1150. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierInstallation').value = 'manual';
  1151. \t\t\t\t\t}
  1152. \t\t\t\t\tbreak;
  1153. \t\t\t\tcase 'producer_actual': 
  1154. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"actual\";
  1155. \t\t\t\t\tvar codeTypeLabel = \"produttore\";
  1156. \t\t\t\t\tvar code = document.getElementById('form_intervention_activity_producerActual').value;
  1157. \t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualProducerActualCode').value != code){
  1158. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerActualCode').value = code;
  1159. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerActual').value = 'manual';
  1160. \t\t\t\t\t}
  1161. \t\t\t\t\tbreak;
  1162. \t\t\t\tcase 'supplier_actual': 
  1163. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"actual\";
  1164. \t\t\t\t\tvar codeTypeLabel = \"fornitore\";
  1165. \t\t\t\t\tvar code = document.getElementById('form_intervention_activity_supplierActual').value;
  1166. \t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualSupplierActualCode').value != code){
  1167. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierActualCode').value = code;
  1168. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierActual').value = 'manual';
  1169. \t\t\t\t\t}
  1170. \t\t\t\t\tbreak;
  1171. \t\t\t\tdefault: break;
  1172. \t\t\t}
  1173. \t\t\tcheckCodePost(type, code, codeTypeLabel);
  1174. \t\t}
  1175. \t\tfunction manageBarcode(code){
  1176. \t\t\tvar type = document.getElementById('scanned_type').value;
  1177. \t\t\tswitch(type){
  1178. \t\t\t\tcase 'producer_withdraw':
  1179. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"withdraw\";
  1180. \t\t\t\t\tvar codeTypeLabel = \"produttore\";
  1181. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerWithdrawCode').value = code;
  1182. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerWithdraw').value = 'scan';
  1183. \t\t\t\t\tbreak;
  1184. \t\t\t\tcase 'supplier_withdraw': 
  1185. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"withdraw\";
  1186. \t\t\t\t\tvar codeTypeLabel = \"fornitore\";
  1187. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierWithdrawCode').value = code;
  1188. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierWithdraw').value = 'scan';
  1189. \t\t\t\t\tbreak;
  1190. \t\t\t\tcase 'producer_installation':
  1191. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"installation\";
  1192. \t\t\t\t\tvar codeTypeLabel = \"produttore\";
  1193. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerInstallationCode').value = code;
  1194. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerInstallation').value = 'scan';
  1195. \t\t\t\t\tbreak;
  1196. \t\t\t\tcase 'supplier_installation': 
  1197. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"installation\";
  1198. \t\t\t\t\tvar codeTypeLabel = \"fornitore\";
  1199. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierInstallationCode').value = code;
  1200. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierInstallation').value = 'scan';
  1201. \t\t\t\t\tbreak;
  1202. \t\t\t\tcase 'producer_actual':
  1203. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"actual\";
  1204. \t\t\t\t\tvar codeTypeLabel = \"produttore\";
  1205. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerActualCode').value = code;
  1206. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerActual').value = 'scan';
  1207. \t\t\t\t\tbreak;
  1208. \t\t\t\tcase 'supplier_actual': 
  1209. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"actual\";
  1210. \t\t\t\t\tvar codeTypeLabel = \"fornitore\";
  1211. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierActualCode').value = code;
  1212. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierActual').value = 'scan';
  1213. \t\t\t\t\tbreak;
  1214. \t\t\t\tdefault: break;
  1215. \t\t\t}
  1216. \t\t\tcheckCodePost(type, code, codeTypeLabel);
  1217. \t\t}
  1218. \t\t
  1219. \t\tfunction checkCodePost(type, code, codeTypeLabel){
  1220. \t\t\tvar code = code.toUpperCase();
  1221. \t\t\t\$.post('";
  1222.         // line 702
  1223.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("user_ticket_intervention_activity_product_search_code");
  1224.         yield "', {ticketId:\"";
  1225.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'702$this->source); })()), "id", [], "any"falsefalsefalse702), "html"nulltrue);
  1226.         yield "\", interventionId:\"";
  1227.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["intervention"]) || array_key_exists("intervention"$context) ? $context["intervention"] : (function () { throw new RuntimeError('Variable "intervention" does not exist.'702$this->source); })()), "id", [], "any"falsefalsefalse702), "html"nulltrue);
  1228.         yield "\", activityTypeId:\"";
  1229.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["activityType"]) || array_key_exists("activityType"$context) ? $context["activityType"] : (function () { throw new RuntimeError('Variable "activityType" does not exist.'702$this->source); })()), "id", [], "any"falsefalsefalse702), "html"nulltrue);
  1230.         yield "\", type:type, code:code}, function(response){ 
  1231. \t\t\t\tvar response = JSON.parse(response);
  1232. \t\t\t\tvar canSubmit = false;
  1233. \t\t\t\tif(response.code == 200 && response.success)
  1234. \t\t\t\t{
  1235. \t\t\t\t\tif(response.found){
  1236. \t\t\t\t\t\t// Se trovato prodotto
  1237. \t\t\t\t\t\tvar product = JSON.parse(response.product);
  1238. \t\t\t\t\t\tif(product.posAccessoryOk){
  1239. \t\t\t\t\t\t\t// Se POS o Accessorio coerente con il tipo di attività
  1240. \t\t\t\t\t\t\tif(product.supplierOk){
  1241. \t\t\t\t\t\t\t\t// Se il fornitore è tra quelli del prodotto
  1242. \t\t\t\t\t\t\t\tif(product.otherWarehouse == 1){
  1243. \t\t\t\t\t\t\t\t\t// Se non è nel magazzino corretto
  1244. \t\t\t\t\t\t\t\t\tif(product.canMove == 1){
  1245. \t\t\t\t\t\t\t\t\t\tdocument.getElementById('move_product_id').value = product.id;
  1246. \t\t\t\t\t\t\t\t\t\tdocument.getElementById('move_warehouse_nickname').innerHTML = product.otherWarehouseNickname;
  1247. \t\t\t\t\t\t\t\t\t\t\$('#modalWarehouseOther').modal({backdrop: 'static', keyboard: false}).modal('show');
  1248. \t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
  1249. \t\t\t\t\t\t\t\t\t}
  1250. \t\t\t\t\t\t\t\t\telse{
  1251. \t\t\t\t\t\t\t\t\t\t// Se installazione e non posso muovere
  1252. \t\t\t\t\t\t\t\t\t\tprintAlertWarning(\"Il prodotto trovato con codice \" + codeTypeLabel + \" \\\"\" + code + \"\\\" non può essere spostato perché non è nello stato corretto!\");
  1253. \t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
  1254. \t\t\t\t\t\t\t\t\t}
  1255. \t\t\t\t\t\t\t\t}
  1256. \t\t\t\t\t\t\t\telse{
  1257. \t\t\t\t\t\t\t\t\t// Se in magazzino corretto
  1258. \t\t\t\t\t\t\t\t\tswitch(type){
  1259. \t\t\t\t\t\t\t\t\t\tcase 'producer_withdraw': 
  1260. \t\t\t\t\t\t\t\t\t\tcase 'supplier_withdraw': 
  1261. \t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_productWithdrawId').value = product.id;
  1262. \t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdraw').value = product.model;
  1263. \t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerWithdraw').value = product.codeProducer;
  1264. \t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierWithdraw').value = product.codeSupplier;
  1265. \t\t\t\t\t\t\t\t\t\t\tshowWithdrawModelComponent(product.model.id);
  1266. \t\t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
  1267. \t\t\t\t\t\t\t\t\t\t\tbreak;
  1268. \t\t\t\t\t\t\t\t\t\tcase 'producer_installation': 
  1269. \t\t\t\t\t\t\t\t\t\tcase 'supplier_installation':
  1270. \t\t\t\t\t\t\t\t\t\t\t// Faccio canMove solo qua perché negli altri 2 casi è sul magazzino cliente e non hanno i trasferimenti
  1271. \t\t\t\t\t\t\t\t\t\t\tif(product.canMove == 1){
  1272. \t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_productInstallationId').value = product.id;
  1273. \t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallation').value = product.model;
  1274. \t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerInstallation').value = product.codeProducer;
  1275. \t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierInstallation').value = product.codeSupplier;
  1276. \t\t\t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
  1277. \t\t\t\t\t\t\t\t\t\t\t}
  1278. \t\t\t\t\t\t\t\t\t\t\telse{
  1279. \t\t\t\t\t\t\t\t\t\t\t\t// Se installazione e non posso muovere
  1280. \t\t\t\t\t\t\t\t\t\t\t\tprintAlertWarning(\"Il prodotto trovato con codice \" + codeTypeLabel + \" \\\"\" + code + \"\\\" non può essere spostato perché non è in stato disponibile!\");
  1281. \t\t\t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
  1282. \t\t\t\t\t\t\t\t\t\t\t}
  1283. \t\t\t\t\t\t\t\t\t\t\tbreak;
  1284. \t\t\t\t\t\t\t\t\t\tcase 'producer_actual': 
  1285. \t\t\t\t\t\t\t\t\t\tcase 'supplier_actual':
  1286. \t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_productActualId').value = product.id;
  1287. \t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelActual').value = product.model;
  1288. \t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerActual').value = product.codeProducer;
  1289. \t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierActual').value = product.codeSupplier;
  1290. \t\t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
  1291. \t\t\t\t\t\t\t\t\t\t\tbreak;
  1292. \t\t\t\t\t\t\t\t\t\tdefault: break;
  1293. \t\t\t\t\t\t\t\t\t}
  1294. \t\t\t\t\t\t\t\t}
  1295. \t\t\t\t\t\t\t}
  1296. \t\t\t\t\t\t\telse{
  1297. \t\t\t\t\t\t\t\t// Se fornitore ticket non è tra i fornitori prodotto
  1298. \t\t\t\t\t\t\t\tprintAlertWarning(\"Il prodotto trovato con codice \" + codeTypeLabel + \" \\\"\" + code + \"\\\" non può essere usato per il fornitore ";
  1299.         // line 770
  1300.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["ticket"]) || array_key_exists("ticket"$context) ? $context["ticket"] : (function () { throw new RuntimeError('Variable "ticket" does not exist.'770$this->source); })()), "supplier", [], "any"falsefalsefalse770), "name", [], "any"falsefalsefalse770), "html"nulltrue);
  1301.         yield "!\");
  1302. \t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
  1303. \t\t\t\t\t\t\t}
  1304. \t\t\t\t\t\t}
  1305. \t\t\t\t\t\telse{
  1306. \t\t\t\t\t\t\t// Se POS o Accessorio non coerente con l'attività
  1307. \t\t\t\t\t\t\tprintAlertWarning(\"Il prodotto trovato con codice \" + codeTypeLabel + \" \\\"\" + code + \"\\\" non può essere usato per questo tipo di intervento, selezionare un ";
  1308.         // line 776
  1309.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["posAccessory"]) || array_key_exists("posAccessory"$context) ? $context["posAccessory"] : (function () { throw new RuntimeError('Variable "posAccessory" does not exist.'776$this->source); })()), "html"nulltrue);
  1310.         yield "!\");
  1311. \t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
  1312. \t\t\t\t\t\t}
  1313. \t\t\t\t\t}
  1314. \t\t\t\t\telse{
  1315. \t\t\t\t\t\t// Se non ho trovato prodotto
  1316. \t\t\t\t\t\tif(code != ''){
  1317. \t\t\t\t\t\t\tswitch(type){
  1318. \t\t\t\t\t\t\t\tcase 'producer_withdraw': 
  1319. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerWithdraw').value = code;
  1320. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdraw').value = '';
  1321. \t\t\t\t\t\t\t\t\tdocument.getElementById('row_component_withdraw').className = 'col-12';
  1322. \t\t\t\t\t\t\t\t\tdocument.getElementById('row_component_withdraw').innerHTML = '';
  1323. \t\t\t\t\t\t\t\t\tprintAlertInfo(\"Il codice \" + codeTypeLabel + \" è utilizzabile, seleziona il modello prima di proseguire!\");
  1324. \t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
  1325. \t\t\t\t\t\t\t\t\tbreak;
  1326. \t\t\t\t\t\t\t\tcase 'supplier_withdraw': 
  1327. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierWithdraw').value = code;
  1328. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdraw').value = '';
  1329. \t\t\t\t\t\t\t\t\tdocument.getElementById('row_component_withdraw').className = 'col-12';
  1330. \t\t\t\t\t\t\t\t\tdocument.getElementById('row_component_withdraw').innerHTML = '';
  1331. \t\t\t\t\t\t\t\t\tprintAlertInfo(\"Il codice \" + codeTypeLabel + \" è utilizzabile, seleziona il modello prima di proseguire!\");
  1332. \t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
  1333. \t\t\t\t\t\t\t\t\tbreak;
  1334. \t\t\t\t\t\t\t\tcase 'producer_installation':
  1335. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerInstallation').value = code;
  1336. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallation').value = '';
  1337. \t\t\t\t\t\t\t\t\tprintAlertWarning(\"Nessun prodotto trovato con codice \" + codeTypeLabel + \" nel magazzino tecnico!\");
  1338. \t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
  1339. \t\t\t\t\t\t\t\t\tbreak;
  1340. \t\t\t\t\t\t\t\tcase 'supplier_installation':
  1341. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierInstallation').value = code;
  1342. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallation').value = '';
  1343. \t\t\t\t\t\t\t\t\tprintAlertWarning(\"Nessun prodotto trovato con codice \" + codeTypeLabel + \" nel magazzino tecnico!\");
  1344. \t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
  1345. \t\t\t\t\t\t\t\t\tbreak;
  1346. \t\t\t\t\t\t\t\tcase 'producer_actual': 
  1347. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerActual').value = code;
  1348. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelActual').value = '';
  1349. \t\t\t\t\t\t\t\t\tprintAlertInfo(\"Il codice \" + codeTypeLabel + \" è utilizzabile, seleziona il modello prima di proseguire!\");
  1350. \t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
  1351. \t\t\t\t\t\t\t\t\tbreak;
  1352. \t\t\t\t\t\t\t\tcase 'supplier_actual': 
  1353. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierActual').value = code;
  1354. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelActual').value = '';
  1355. \t\t\t\t\t\t\t\t\tprintAlertInfo(\"Il codice \" + codeTypeLabel + \" è utilizzabile, seleziona il modello prima di proseguire!\");
  1356. \t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
  1357. \t\t\t\t\t\t\t\t\tbreak;
  1358. \t\t\t\t\t\t\t\tdefault: break;
  1359. \t\t\t\t\t\t\t}
  1360. \t\t\t\t\t\t}
  1361. \t\t\t\t\t}
  1362. \t\t\t\t}
  1363. \t\t\t\tcloseModal();
  1364. \t\t\t\tupdateButtonSubmit();
  1365. \t\t\t});
  1366. \t\t}
  1367. \t\tfunction showClientWarehouse(){
  1368. \t\t\tif(document.getElementById(\"clientWarehouse\").style.display == \"block\")
  1369. \t\t\t\tdocument.getElementById(\"clientWarehouse\").style.display = \"none\";
  1370. \t\t\telse
  1371. \t\t\t\tdocument.getElementById(\"clientWarehouse\").style.display = \"block\";
  1372. \t\t}
  1373. \t\tfunction moveProduct(){
  1374. \t\t\tvar productId = document.getElementById('move_product_id').value;
  1375. \t\t\tvar type = document.getElementById(\"move_product_type\").value;
  1376. \t\t\t\$.post('";
  1377.         // line 844
  1378.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("user_ticket_intervention_activity_move_product", ["interventionId" => CoreExtension::getAttribute($this->env$this->source, (isset($context["intervention"]) || array_key_exists("intervention"$context) ? $context["intervention"] : (function () { throw new RuntimeError('Variable "intervention" does not exist.'844$this->source); })()), "id", [], "any"falsefalsefalse844)]), "html"nulltrue);
  1379.         yield "', {productId:productId, type: type}, function(response){ 
  1380. \t\t\t\tif(response.code == 200 && response.success){
  1381. \t\t\t\t\tprintAlertSuccess('Prodotto spostato correttamente!');
  1382. \t\t\t\t\t\$('#modalWarehouseOther').modal('hide');
  1383. \t\t\t\t\tonBlurManageBarcode(document.getElementById(\"move_type\").value);
  1384. \t\t\t\t}
  1385. \t\t\t}, \"json\");
  1386. \t\t}
  1387. \t\tfunction submitForm(){
  1388. \t\t\ttriggerLoading();
  1389. \t\t\t\$('#form').submit();
  1390. \t\t}
  1391. \t\tfunction updateCanSubmitField(type, value){
  1392. \t\t\tswitch(type){
  1393. \t\t\t\tcase 'producer_withdraw': 
  1394. \t\t\t\tcase 'supplier_withdraw': 
  1395. \t\t\t\t\tdocument.getElementById('can_submit_withdraw').value = value;
  1396. \t\t\t\t\tbreak;
  1397. \t\t\t\tcase 'producer_installation': 
  1398. \t\t\t\tcase 'supplier_installation':
  1399. \t\t\t\t\tdocument.getElementById('can_submit_installation').value = value;
  1400. \t\t\t\t\tbreak;
  1401. \t\t\t\tcase 'producer_actual': 
  1402. \t\t\t\tcase 'supplier_actual':
  1403. \t\t\t\t\tdocument.getElementById('can_submit_actual').value = value;
  1404. \t\t\t\t\tbreak;
  1405. \t\t\t\tdefault: break;
  1406. \t\t\t}
  1407. \t\t}
  1408. \t\tfunction updateButtonSubmit(){
  1409. \t\t\tvar csW = document.getElementById('can_submit_withdraw').value;
  1410. \t\t\tvar csA = document.getElementById('can_submit_actual').value;
  1411. \t\t\tvar csI = document.getElementById('can_submit_installation').value;
  1412. \t\t\tvar buttonSubmit = document.getElementById('button_submit');
  1413. \t\t\tif(csW == 1 && csA == 1 && csI == 1){
  1414. \t\t\t\tbuttonSubmit.className = \"button button-3d button-small button-green\";
  1415. \t\t\t\tbuttonSubmit.href = \"javascript: submitForm()\";
  1416. \t\t\t}
  1417. \t\t\telse{
  1418. \t\t\t\tbuttonSubmit.className = \"button button-3d button-small button-grey\";
  1419. \t\t\t\tbuttonSubmit.href = \"javascript: void()\";
  1420. \t\t\t}
  1421. \t\t}
  1422. \t</script>
  1423. ";
  1424.         
  1425.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  1426.         
  1427.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  1428.         return; yield '';
  1429.     }
  1430.     /**
  1431.      * @codeCoverageIgnore
  1432.      */
  1433.     public function getTemplateName()
  1434.     {
  1435.         return "role/user/ticket/intervention/activity/single.html.twig";
  1436.     }
  1437.     /**
  1438.      * @codeCoverageIgnore
  1439.      */
  1440.     public function isTraitable()
  1441.     {
  1442.         return false;
  1443.     }
  1444.     /**
  1445.      * @codeCoverageIgnore
  1446.      */
  1447.     public function getDebugInfo()
  1448.     {
  1449.         return array (  1451 => 844,  1380 => 776,  1371 => 770,  1294 => 702,  1146 => 559,  1106 => 522,  1081 => 506,  1076 => 503,  1029 => 458,  1003 => 443,  997 => 439,  935 => 378,  931 => 376,  928 => 375,  924 => 373,  921 => 372,  917 => 370,  915 => 369,  912 => 368,  908 => 366,  906 => 365,  902 => 363,  895 => 362,  893 => 361,  888 => 360,  878 => 359,  847 => 337,  843 => 335,  838 => 332,  836 => 331,  830 => 327,  822 => 325,  818 => 323,  816 => 322,  780 => 291,  735 => 249,  731 => 248,  727 => 247,  722 => 245,  718 => 244,  714 => 243,  710 => 242,  706 => 241,  701 => 239,  697 => 238,  693 => 237,  689 => 236,  685 => 235,  681 => 234,  676 => 232,  672 => 231,  668 => 230,  664 => 229,  660 => 228,  656 => 227,  649 => 222,  644 => 220,  640 => 219,  635 => 218,  628 => 214,  621 => 210,  617 => 209,  612 => 206,  606 => 204,  599 => 200,  592 => 196,  588 => 195,  583 => 192,  580 => 191,  574 => 189,  567 => 185,  560 => 181,  556 => 180,  551 => 177,  548 => 176,  545 => 175,  543 => 174,  538 => 172,  534 => 171,  529 => 170,  520 => 166,  513 => 162,  509 => 161,  504 => 158,  498 => 156,  491 => 152,  484 => 148,  480 => 147,  475 => 144,  472 => 143,  466 => 141,  459 => 137,  452 => 133,  448 => 132,  443 => 129,  440 => 128,  437 => 127,  435 => 126,  430 => 124,  426 => 123,  421 => 122,  412 => 116,  405 => 112,  401 => 111,  396 => 108,  390 => 106,  383 => 102,  376 => 98,  372 => 97,  367 => 94,  364 => 93,  358 => 91,  351 => 87,  344 => 83,  340 => 82,  335 => 79,  332 => 78,  329 => 77,  322 => 72,  316 => 69,  306 => 61,  298 => 55,  293 => 52,  275 => 50,  269 => 49,  256 => 47,  241 => 43,  234 => 39,  225 => 35,  221 => 33,  217 => 31,  214 => 30,  197 => 29,  193 => 27,  191 => 26,  184 => 21,  174 => 20,  155 => 17,  141 => 14,  131 => 13,  115 => 8,  105 => 7,  85 => 5,  65 => 3,  42 => 1,);
  1450.     }
  1451.     public function getSourceContext()
  1452.     {
  1453.         return new Source("{% extends 'role/user/ticket/intervention/index.html.twig' %}
  1454. {% block title %}Ticket - Intervento - Attività{% endblock %}
  1455. {% block pageTitleH1 %}Ticket - Intervento - Attività{% endblock %}
  1456. {% block pageTitleBreadcrumb %}
  1457. \t<li class=\"breadcrumb-item\"><a href=\"{{ path ('user_ticket_sheet', {'ticketId':ticket.id}) }}\">Ticket</a></li>
  1458. \t<li class=\"breadcrumb-item\"><a href=\"javascript:void(0)\">Intervento</a></li>
  1459. \t<li class=\"breadcrumb-item\"><a href=\"javascript:void(0)\">Attività</a></li>
  1460. {% endblock %}
  1461. {% block subMenuLeft %}
  1462. \t<li class=\"nav-item\"><a class=\"nav-link\" href=\"{{ path ('user_ticket_intervention_activity_summary', {'interventionId':intervention.id}) }}\">Riassunto</a></li>
  1463. {% endblock %}
  1464. {% block subMenuRight %}
  1465. {% endblock %}
  1466. {% block interventionContent %}
  1467. \t<div class=\"row\">
  1468. \t\t<div class=\"col-12\">
  1469. \t\t\t<h4 class=\"form_title\"><a onclick=\"showClientWarehouse()\" class=\"cursor_p\">Visualizza/Nascondi magazzino cliente</a></h4>
  1470. \t\t\t<hr class=\"m_t_none\">
  1471. \t\t\t<div id=\"clientWarehouse\" style=\"display:none\">
  1472. \t\t\t\t{% if ticket.client.warehouse.products|length > 0 %}
  1473. \t\t\t\t\t<table class=\"table table_no_padding responsive_font_size\">
  1474. \t\t\t\t\t\t<tbody>
  1475. \t\t\t\t\t\t\t{% for p in ticket.client.warehouse.products %}
  1476. \t\t\t\t\t\t\t\t{% if loop.index > 1 %}
  1477. \t\t\t\t\t\t\t\t\t<tr><th colspan=\"2\" style=\"padding-top: 10px!important; padding-bottom: 10px!important;border-bottom-width: 0px;\"><hr style=\"height:1px !important; margin:0px\"></th></tr>
  1478. \t\t\t\t\t\t\t\t{% endif %}
  1479. \t\t\t\t\t\t\t\t<tr>
  1480. \t\t\t\t\t\t\t\t\t<th class=\"td_w_100p\" style=\"border-bottom: 0px\">Modello</th>
  1481. \t\t\t\t\t\t\t\t\t<td style=\"border-bottom: 0px\">{{ p.model.name }} ({{ p.model.sku }})</td>
  1482. \t\t\t\t\t\t\t\t</tr>
  1483. \t\t\t\t\t\t\t\t<tr>
  1484. \t\t\t\t\t\t\t\t\t<th style=\"border-bottom: 0px\">Termid</th>
  1485. \t\t\t\t\t\t\t\t\t<td style=\"border-bottom: 0px\">{{ p.termid }}</td>
  1486. \t\t\t\t\t\t\t\t</tr>
  1487. \t\t\t\t\t\t\t\t<tr>
  1488. \t\t\t\t\t\t\t\t\t<th style=\"border-bottom: 0px\">Matr. Produttore</th>
  1489. \t\t\t\t\t\t\t\t\t<td style=\"border-bottom: 0px\">{% if p.codeProducer != null %}<a href=\"javascript: copyToClipboard({{ p.id }}, 'producer')\" class=\"underline\" data-bs-toggle=\"tooltip\" title=\"Copia matricola\">{{ p.codeProducer }}</a>{% else %}---{% endif %}</td>
  1490. \t\t\t\t\t\t\t\t</tr>
  1491. \t\t\t\t\t\t\t\t<tr>
  1492. \t\t\t\t\t\t\t\t\t<th style=\"border-bottom: 0px\">Matr. Fornitore</th>
  1493. \t\t\t\t\t\t\t\t\t<td style=\"border-bottom: 0px\">{% if p.codeSupplier != null %}<a href=\"javascript: copyToClipboard({{ p.id }}, 'supplier')\" class=\"underline\" data-bs-toggle=\"tooltip\" title=\"Copia matricola\">{{ p.codeSupplier }}</a>{% else %}---{% endif %}</td>
  1494. \t\t\t\t\t\t\t\t</tr>
  1495. \t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"product_{{ p.id }}_producer\" value=\"{{ p.codeProducer }}\">
  1496. \t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"product_{{ p.id }}_supplier\" value=\"{{ p.codeSupplier }}\">
  1497. \t\t\t\t\t\t\t{% endfor %}
  1498. \t\t\t\t\t\t</tbody>
  1499. \t\t\t\t\t</table>
  1500. \t\t\t\t{% else %}
  1501. \t\t\t\t\t<div class=\"style-msg infomsg\">
  1502. \t\t\t\t\t\t<div class=\"sb-msg responsive_font_size\">
  1503. \t\t\t\t\t\t\t<i class=\"icon-info-sign\"></i><strong>Info:</strong> Nessuna matricola registrata presente su questo cliente!
  1504. \t\t\t\t\t\t</div>
  1505. \t\t\t\t\t</div>
  1506. \t\t\t\t{% endif %}
  1507. \t\t\t</div>
  1508. \t\t</div>
  1509. \t</div>
  1510. \t<input type=\"hidden\" id=\"can_submit_withdraw\" value=\"0\">
  1511. \t<input type=\"hidden\" id=\"can_submit_installation\" value=\"0\">
  1512. \t<input type=\"hidden\" id=\"can_submit_actual\" value=\"0\">
  1513. \t{{ form_start(form, {'attr': {'novalidate': 'novalidate', 'id':'form'}}) }} 
  1514. \t\t<div class=\"row\">
  1515. \t\t\t<div class=\"col-12\">
  1516. \t\t\t\t<h4 class=\"form_title\">Dettaglia l'attività: {{ activityType.value }}</h4>
  1517. \t\t\t\t<hr class=\"m_t_none\">
  1518. \t\t\t</div>
  1519. \t\t</div>
  1520. \t\t{# Ritiro #}
  1521. \t\t{% if activityType.producerWithdrawMandatory or activityType.supplierWithdrawMandatory %}
  1522. \t\t\t{% if activityType.producerWithdrawMandatory %}
  1523. \t\t\t\t<div class=\"row form-group\">
  1524. \t\t\t\t\t<div class=\"col-10 col-lg-11\">
  1525. \t\t\t\t\t\t<label class=\"form_label\">Ritiro - Matricola produttore*</label>
  1526. \t\t\t\t\t\t<div {{ form_errors(form.producerWithdraw) }}>
  1527. \t\t\t\t\t\t\t{{ form_widget(form.producerWithdraw, {'attr':{'inputmode':'search', 'onKeyDown':'updateButtonSubmit()', 'onBlur':'onBlurManageBarcode(\"producer_withdraw\")'}}) }}
  1528. \t\t\t\t\t\t</div>
  1529. \t\t\t\t\t</div>
  1530. \t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
  1531. \t\t\t\t\t\t<a href=\"javascript:openScanditModal('producer_withdraw', 'produttore')\"><img src=\"{{ asset (icon_frame) }}\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Scansiona\"></a>
  1532. \t\t\t\t\t</div>
  1533. \t\t\t\t</div>
  1534. \t\t\t{% else %}
  1535. \t\t\t\t{{ form_widget(form.producerWithdraw, {'attr':{'class':'display_n'}}) }}
  1536. \t\t\t{% endif %}
  1537. \t\t\t{% if activityType.supplierWithdrawMandatory %}
  1538. \t\t\t\t<div class=\"row form-group\">
  1539. \t\t\t\t\t<div class=\"col-10 col-lg-11\">
  1540. \t\t\t\t\t\t<label class=\"form_label\">Ritiro - Matricola fornitore*</label>
  1541. \t\t\t\t\t\t<div {{ form_errors(form.supplierWithdraw) }}>
  1542. \t\t\t\t\t\t\t{{ form_widget(form.supplierWithdraw, {'attr':{'onKeyDown':'updateButtonSubmit()', 'onBlur':'onBlurManageBarcode(\"supplier_withdraw\")'}}) }}
  1543. \t\t\t\t\t\t</div>
  1544. \t\t\t\t\t</div>
  1545. \t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
  1546. \t\t\t\t\t\t<a href=\"javascript:openScanditModal('supplier_withdraw', 'fornitore')\"><img src=\"{{ asset (icon_frame) }}\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Scansiona\"></a>
  1547. \t\t\t\t\t</div>
  1548. \t\t\t\t</div>
  1549. \t\t\t{% else %}
  1550. \t\t\t\t{{ form_widget(form.supplierWithdraw, {'attr':{'class':'display_n'}}) }}
  1551. \t\t\t{% endif %}
  1552. \t\t\t<div class=\"row form-group\" id=\"row_model_withdraw\">
  1553. \t\t\t\t<div class=\"col-10 col-lg-11\">
  1554. \t\t\t\t\t<label class=\"form_label\">Ritiro - Modello</label>
  1555. \t\t\t\t\t<div {{ form_errors(form.modelWithdraw) }}>
  1556. \t\t\t\t\t\t{{ form_widget(form.modelWithdraw, {'attr':{'class':'form-control', 'readonly':true}} ) }}
  1557. \t\t\t\t\t</div>
  1558. \t\t\t\t</div>
  1559. \t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
  1560. \t\t\t\t\t<a href=\"javascript: selectFromWarehouse('withdraw')\"><img src=\"{{ asset (icon_selection) }}\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Seleziona\"></a>
  1561. \t\t\t\t</div>
  1562. \t\t\t\t<div class=\"col-12 switch\" id=\"row_component_withdraw\" style=\"display: none\">
  1563. \t\t\t\t</div>
  1564. \t\t\t</div>
  1565. \t\t{% else %}
  1566. \t\t\t{{ form_widget(form.modelWithdraw, {'attr':{'class':'display_n'}}) }}
  1567. \t\t\t{{ form_widget(form.producerWithdraw, {'attr':{'class':'display_n'}}) }}
  1568. \t\t\t{{ form_widget(form.supplierWithdraw, {'attr':{'class':'display_n'}}) }}
  1569. \t\t{% endif %}
  1570. \t\t{# Installazione #}
  1571. \t\t{% if activityType.producerInstallationMandatory or activityType.supplierInstallationMandatory %}
  1572. \t\t\t{% if activityType.producerInstallationMandatory %}
  1573. \t\t\t\t<div class=\"row form-group\">
  1574. \t\t\t\t\t<div class=\"col-10 col-lg-11\">
  1575. \t\t\t\t\t\t<label class=\"form_label\">Installazione - Matricola produttore*</label>
  1576. \t\t\t\t\t\t<div {{ form_errors(form.producerInstallation) }}>
  1577. \t\t\t\t\t\t\t{{ form_widget(form.producerInstallation, {'attr':{'inputmode':'search','onKeyDown':'updateButtonSubmit()', 'onBlur':'onBlurManageBarcode(\"producer_installation\")'}}) }}
  1578. \t\t\t\t\t\t</div>
  1579. \t\t\t\t\t</div>
  1580. \t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
  1581. \t\t\t\t\t\t<a href=\"javascript:openScanditModal('producer_installation', 'produttore')\"><img src=\"{{ asset (icon_frame) }}\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Scansiona\"></a>
  1582. \t\t\t\t\t</div>
  1583. \t\t\t\t</div>
  1584. \t\t\t{% else %}
  1585. \t\t\t\t{{ form_widget(form.producerInstallation, {'attr':{'class':'display_n'}}) }}
  1586. \t\t\t{% endif %}
  1587. \t\t\t{% if activityType.supplierInstallationMandatory %}
  1588. \t\t\t\t<div class=\"row form-group\">
  1589. \t\t\t\t\t<div class=\"col-10 col-lg-11\">
  1590. \t\t\t\t\t\t<label class=\"form_label\">Installazione - Matricola fornitore*</label>
  1591. \t\t\t\t\t\t<div {{ form_errors(form.supplierInstallation) }}>
  1592. \t\t\t\t\t\t\t{{ form_widget(form.supplierInstallation, {'attr':{'onKeyDown':'updateButtonSubmit()', 'onBlur':'onBlurManageBarcode(\"supplier_installation\")'}}) }}
  1593. \t\t\t\t\t\t</div>
  1594. \t\t\t\t\t</div>
  1595. \t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
  1596. \t\t\t\t\t\t<a href=\"javascript:openScanditModal('supplier_installation', 'fornitore')\"><img src=\"{{ asset (icon_frame) }}\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Scansiona\"></a>
  1597. \t\t\t\t\t</div>
  1598. \t\t\t\t</div>
  1599. \t\t\t{% else %}
  1600. \t\t\t\t{{ form_widget(form.supplierInstallation, {'attr':{'class':'display_n'}}) }}
  1601. \t\t\t{% endif %}
  1602. \t\t\t<div class=\"row form-group\" id=\"row_model_installation\">
  1603. \t\t\t\t<div class=\"col-10 col-lg-11\">
  1604. \t\t\t\t\t<label class=\"form_label\">Installazione - Prodotto</label>
  1605. \t\t\t\t\t<div {{ form_errors(form.modelInstallation) }}>
  1606. \t\t\t\t\t\t{{ form_widget(form.modelInstallation, {'attr':{'readonly':true}} ) }}
  1607. \t\t\t\t\t</div>
  1608. \t\t\t\t</div>
  1609. \t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
  1610. \t\t\t\t\t<a href=\"tel:{{ company.phoneSupportTechnician }}\"><img class=\"icon_red m_t_33p\" width=\"38\" src=\"{{ asset (icon_telephone) }}\" data-bs-toggle=\"tooltip\" title=\"Ho un problema\"/></a>
  1611. \t\t\t\t</div>
  1612. \t\t\t</div>
  1613. \t\t{% else %}
  1614. \t\t\t{{ form_widget(form.modelInstallation, {'attr':{'class':'display_n'}}) }}
  1615. \t\t\t{{ form_widget(form.producerInstallation, {'attr':{'class':'display_n'}}) }}
  1616. \t\t\t{{ form_widget(form.supplierInstallation, {'attr':{'class':'display_n'}}) }}
  1617. \t\t{% endif %}
  1618. \t\t{# Attuale #}
  1619. \t\t{% if activityType.producerActualMandatory or activityType.supplierActualMandatory %}
  1620. \t\t\t{% if activityType.producerActualMandatory %}
  1621. \t\t\t\t<div class=\"row form-group\">
  1622. \t\t\t\t\t<div class=\"col-10 col-lg-11\">
  1623. \t\t\t\t\t\t<label class=\"form_label\">Attuale - Matricola produttore*</label>
  1624. \t\t\t\t\t\t<div {{ form_errors(form.producerActual) }}>
  1625. \t\t\t\t\t\t\t{{ form_widget(form.producerActual, {'attr':{'inputmode':'search', 'onKeyDown':'updateButtonSubmit()', 'onBlur':'onBlurManageBarcode(\"producer_actual\")'}}) }}
  1626. \t\t\t\t\t\t</div>
  1627. \t\t\t\t\t</div>
  1628. \t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
  1629. \t\t\t\t\t\t<a href=\"javascript:openScanditModal('producer_actual', 'produttore')\"><img src=\"{{ asset (icon_frame) }}\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Scansiona\"></a>
  1630. \t\t\t\t\t</div>
  1631. \t\t\t\t</div>
  1632. \t\t\t{% else %}
  1633. \t\t\t\t{{ form_widget(form.producerActual, {'attr':{'class':'display_n'}}) }}
  1634. \t\t\t{% endif %}
  1635. \t\t\t{% if activityType.supplierActualMandatory %}
  1636. \t\t\t\t<div class=\"row form-group\">
  1637. \t\t\t\t\t<div class=\"col-10 col-lg-11\">
  1638. \t\t\t\t\t\t<label class=\"form_label\">Attuale - Matricola fornitore*</label>
  1639. \t\t\t\t\t\t<div {{ form_errors(form.supplierActual) }}>
  1640. \t\t\t\t\t\t\t{{ form_widget(form.supplierActual, {'attr':{'onKeyDown':'updateButtonSubmit()', 'onBlur':'onBlurManageBarcode(\"supplier_actual\")'}}) }}
  1641. \t\t\t\t\t\t</div>
  1642. \t\t\t\t\t</div>
  1643. \t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
  1644. \t\t\t\t\t\t<a href=\"javascript:openScanditModal('supplier_actual', 'fornitore')\"><img src=\"{{ asset (icon_frame) }}\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Scansiona\"></a>
  1645. \t\t\t\t\t</div>
  1646. \t\t\t\t</div>
  1647. \t\t\t{% else %}
  1648. \t\t\t\t{{ form_widget(form.supplierActual, {'attr':{'class':'display_n'}}) }}
  1649. \t\t\t{% endif %}
  1650. \t\t\t<div class=\"row form-group\" id=\"row_model_actual\">
  1651. \t\t\t\t<div class=\"col-10 col-lg-11\">
  1652. \t\t\t\t\t<label class=\"form_label\">Attuale - Modello</label>
  1653. \t\t\t\t\t<div {{ form_errors(form.modelActual) }}>
  1654. \t\t\t\t\t\t{{ form_widget(form.modelActual, {'attr':{'readonly':true}} ) }}
  1655. \t\t\t\t\t</div>
  1656. \t\t\t\t</div>
  1657. \t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
  1658. \t\t\t\t\t<a href=\"javascript: selectFromWarehouse('actual')\"><img src=\"{{ asset (icon_selection) }}\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Seleziona\"></a>
  1659. \t\t\t\t</div>
  1660. \t\t\t</div>
  1661. \t\t{% else %}
  1662. \t\t\t{{ form_widget(form.modelActual, {'attr':{'class':'display_n'}}) }}
  1663. \t\t\t{{ form_widget(form.producerActual, {'attr':{'class':'display_n'}}) }}
  1664. \t\t\t{{ form_widget(form.supplierActual, {'attr':{'class':'display_n'}}) }}
  1665. \t\t{% endif %}
  1666. \t\t<div class=\"row m_t_50p\">
  1667. \t\t\t<div class=\"col-12 txt_a_c\">
  1668. \t\t\t\t<a id=\"button_submit\" href=\"javascript: void()\" class=\"button button-3d button-small button-grey\">Inserisci</a>
  1669. \t\t\t</div>
  1670. \t\t</div>
  1671. \t\t{{ form_widget(form.productWithdrawId) }}
  1672. \t\t{{ form_widget(form.modelWithdrawId) }}
  1673. \t\t{{ form_widget(form.scanOrManualProducerWithdraw) }}
  1674. \t\t{{ form_widget(form.scanOrManualProducerWithdrawCode) }}
  1675. \t\t{{ form_widget(form.scanOrManualSupplierWithdraw) }}
  1676. \t\t{{ form_widget(form.scanOrManualSupplierWithdrawCode) }}
  1677. \t\t{{ form_widget(form.productActualId) }}
  1678. \t\t{{ form_widget(form.modelActualId) }}
  1679. \t\t{{ form_widget(form.scanOrManualProducerActual) }}
  1680. \t\t{{ form_widget(form.scanOrManualProducerActualCode) }}
  1681. \t\t{{ form_widget(form.scanOrManualSupplierActual) }}
  1682. \t\t{{ form_widget(form.scanOrManualSupplierActualCode) }}
  1683. \t\t{{ form_widget(form.productInstallationId) }}
  1684. \t\t{{ form_widget(form.scanOrManualProducerInstallation) }}
  1685. \t\t{{ form_widget(form.scanOrManualProducerInstallationCode) }}
  1686. \t\t{{ form_widget(form.scanOrManualSupplierInstallation) }}
  1687. \t\t{{ form_widget(form.scanOrManualSupplierInstallationCode) }}
  1688. \t\t
  1689. \t\t<input type=\"hidden\" name=\"activityTypeId\" value=\"{{ activityType.id }}\">
  1690. \t\t<input type=\"hidden\" name=\"ticketId\" value=\"{{ ticket.id }}\">
  1691. \t{{ form_end(form) }}
  1692. \t<div id=\"selectProductModal\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\">
  1693. \t\t<div class=\"modal-dialog modal-lg\" role=\"document\">
  1694. \t\t\t<div class=\"modal-content\">
  1695. \t\t\t\t<div class=\"modal-header\"><h3 class=\"modal-title\">Seleziona prodotto dal magazzino cliente</h3></div>
  1696. \t\t\t\t<div class=\"modal-body\">
  1697. \t\t\t\t\t<div class=\"row\">
  1698. \t\t\t\t\t\t<div class=\"col-12 overflow_a\">
  1699. \t\t\t\t\t\t\t<table id=\"table_products\" class=\"table table-sm responsive_font_size\">
  1700. \t\t\t\t\t\t\t\t<thead>
  1701. \t\t\t\t\t\t\t\t\t<tr>
  1702. \t\t\t\t\t\t\t\t\t\t<td colspan=\"2\"><input type=\"text\" class=\"form-control font_12\" id=\"filter_search_product\" onKeyPress=\"searchProducts()\" onBlur=\"searchProducts()\"/></td>
  1703. \t\t\t\t\t\t\t\t\t</tr>
  1704. \t\t\t\t\t\t\t\t</thead>
  1705. \t\t\t\t\t\t\t\t<tbody id=\"tbody_products\">
  1706. \t\t\t\t\t\t\t\t</tbody>
  1707. \t\t\t\t\t\t\t</table>
  1708. \t\t\t\t\t\t</div>
  1709. \t\t\t\t\t</div>
  1710. \t\t\t\t</div>
  1711. \t\t\t\t<div class=\"modal-footer txt_a_c\">
  1712. \t\t\t\t\t<a href=\"javascript:void(0)\" class=\"button button-3d button-mini button-pr\" data-bs-dismiss=\"modal\">Chiudi</a>
  1713. \t\t\t\t</div>
  1714. \t\t\t</div>
  1715. \t\t</div>
  1716. \t</div>
  1717. \t<div id=\"selectModelModal\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\">
  1718. \t\t<div class=\"modal-dialog modal-lg\" role=\"document\">
  1719. \t\t\t<div class=\"modal-content\">
  1720. \t\t\t\t<div class=\"modal-header\"><h3 class=\"modal-title\">Seleziona modello</h3></div>
  1721. \t\t\t\t<div class=\"modal-body\">
  1722. \t\t\t\t\t<div class=\"row\">
  1723. \t\t\t\t\t\t<div class=\"col-12 overflow_a\">
  1724. \t\t\t\t\t\t\t<table id=\"table_models\" class=\"table table-sm responsive_font_size\">
  1725. \t\t\t\t\t\t\t\t<thead>
  1726. \t\t\t\t\t\t\t\t\t<tr>
  1727. \t\t\t\t\t\t\t\t\t\t<td colspan=\"5\" class=\"txt_a_c\"><a href=\"javascript: updateSelectCodeModal('products')\" class=\"button button-3d button-mini button-pr\">Cerca prodotto nel magazzino cliente</a></td>
  1728. \t\t\t\t\t\t\t\t\t</tr>
  1729. \t\t\t\t\t\t\t\t\t<tr>
  1730. \t\t\t\t\t\t\t\t\t\t<td><input type=\"text\" class=\"form-control font_12\" id=\"filter_search_model\" onKeyPress=\"searchModels()\" onBlur=\"searchModels()\"/></td>
  1731. \t\t\t\t\t\t\t\t\t\t<td class=\"td_action\"><a href=\"tel:{{ company.phoneSupportTechnician }}\" data-bs-toggle=\"tooltip\" title=\"Richiedi inserimento nuovo\"><img class=\"icon_red\" src=\"{{ asset (icon_telephone) }}\" /></a></td>
  1732. \t\t\t\t\t\t\t\t\t</tr>
  1733. \t\t\t\t\t\t\t\t</thead>
  1734. \t\t\t\t\t\t\t\t<tbody id=\"tbody_models\">
  1735. \t\t\t\t\t\t\t\t</tbody>
  1736. \t\t\t\t\t\t\t</table>
  1737. \t\t\t\t\t\t</div>
  1738. \t\t\t\t\t</div>
  1739. \t\t\t\t</div>
  1740. \t\t\t\t<div class=\"modal-footer txt_a_c\">
  1741. \t\t\t\t\t<a href=\"javascript:void(0)\" class=\"button button-3d button-mini button-pr\" data-bs-dismiss=\"modal\">Chiudi</a>
  1742. \t\t\t\t</div>
  1743. \t\t\t</div>
  1744. \t\t</div>
  1745. \t</div>
  1746. \t<input type=\"hidden\" id=\"selected_type\">
  1747. \t<input type=\"hidden\" id=\"scanned_type\">
  1748. \t<div id=\"modalWarehouseOther\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\">
  1749. \t\t<div class=\"modal-dialog\" role=\"document\">
  1750. \t\t\t<div class=\"modal-content\">
  1751. \t\t\t\t<div class=\"modal-header\"><h3 class=\"modal-title\">Magazzino non corrispondente</h3></div>\t\t\t
  1752. \t\t\t\t<div class=\"modal-body\">
  1753. \t\t\t\t\t<input type=\"hidden\" id=\"move_product_id\">
  1754. \t\t\t\t\t<input type=\"hidden\" id=\"move_type\">
  1755. \t\t\t\t\t<div class=\"row\">
  1756. \t\t\t\t\t\t<div class=\"col-12 txt_a_c\">
  1757. \t\t\t\t\t\t\t<input type=\"hidden\" id=\"move_product_type\" />
  1758. \t\t\t\t\t\t\t<label class=\"modal_subtitle\">Attenzione!</label>
  1759. \t\t\t\t\t\t\t<p class=\"modal_paragraph\">La matricola corrisponde a un prodotto che è presente nel magazzino <span id=\"move_warehouse_nickname\" class=\"f_w_b\"></span>!</p>
  1760. \t\t\t\t\t\t\t{% if app.user.accountTypology != \"technician\" %}
  1761. \t\t\t\t\t\t\t\t<p class=\"modal_paragraph\">Cliccando sul bottone <a class='button button-3d button-mini button-green' href='javascript:void(0)'>sposta</a> lo inserirai nel magazzino corretto per poter chiudere l'intervento.<br>Si è sicuri di voler proseguire?</p>
  1762. \t\t\t\t\t\t\t{% else %}
  1763. \t\t\t\t\t\t\t\t<a href=\"tel:{{ company.phoneSupportTechnician }}\"><img class=\"icon_red m_t_33p\" width=\"38\" src=\"{{ asset (icon_telephone) }}\" data-bs-toggle=\"tooltip\" title=\"Ho un problema\"/></a>
  1764. \t\t\t\t\t\t\t{% endif %}
  1765. \t\t\t\t\t\t</div>
  1766. \t\t\t\t\t</div>
  1767. \t\t\t\t</div>
  1768. \t\t\t\t<div class=\"modal-footer\">
  1769. \t\t\t\t\t{% if app.user.accountTypology != \"technician\" %}
  1770. \t\t\t\t\t\t<a href=\"javascript:void(0)\" class=\"button button-3d button-mini button-red f_left\" data-bs-dismiss=\"modal\">Annulla</a>
  1771. \t\t\t\t\t\t<a href=\"javascript:moveProduct()\" class=\"button button-3d button-mini button-green f_right\">Sposta</a>
  1772. \t\t\t\t\t{% else %}
  1773. \t\t\t\t\t\t<a href=\"javascript:void(0)\" class=\"button button-3d button-mini button-red\" data-bs-dismiss=\"modal\">Annulla</a>
  1774. \t\t\t\t\t{% endif %}
  1775. \t\t\t\t</div>
  1776. \t\t\t</div>
  1777. \t\t</div>
  1778. \t</div>
  1779. \t<div id=\"scanditReaderModal\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\">
  1780. \t\t<div class=\"modal-dialog modal-lg\" role=\"document\">
  1781. \t\t\t<div class=\"modal-content\">
  1782. \t\t\t\t<div class=\"modal-header\"><h3 class=\"modal-title\">Inquadra matricola <span id=\"scandit_code_type\" class=\"color_w\"></span></h3></div>                
  1783. \t\t\t\t<div class=\"modal-body\">
  1784. \t\t\t\t\t<input type=\"hidden\" id=\"scandit_reader_active\" value=\"0\">
  1785. \t\t\t\t\t<div id=\"data-capture-view\"></div>
  1786. \t\t\t\t\t<a id=\"scandit_button_scan\" href=\"javascript: scanditUpdateScan(1)\" class=\"button button-3d button-mini button-green\" style=\"position: fixed; bottom: 30%; right: 10px;\">Attiva scansione</a>
  1787. \t\t\t\t</div>
  1788. \t\t\t\t<div class=\"modal-footer txt_a_c\">
  1789. \t\t\t\t\t<a href=\"javascript:void(0)\" class=\"button button-3d button-mini button-pr\" data-bs-dismiss=\"modal\">Chiudi</a>
  1790. \t\t\t\t</div>
  1791. \t\t\t</div>
  1792. \t\t</div>
  1793. \t</div>
  1794. {% endblock %}
  1795. {% block javascripts %}
  1796. \t{{ parent() }}
  1797. \t{% include 'components/js/scandit_js.html.twig' with {'action':'intervention'} %}
  1798. \t{% if activityType.pos %}{% set posAccessory = \"POS\" %}{% else %}{% set posAccessory = \"Accessorio\" %}{% endif %}
  1799. \t<script>
  1800. \t\t\$(document).ready(function(){
  1801. \t\t\t{% if activityType.producerWithdrawMandatory or activityType.supplierWithdrawMandatory %}
  1802. \t\t\t\tshowWithdrawModelComponent(document.getElementById('form_intervention_activity_modelWithdrawId').value);
  1803. \t\t\t{% endif %}
  1804. \t\t\t{% if activityType.producerWithdrawMandatory == false and activityType.supplierWithdrawMandatory == false %}
  1805. \t\t\t\tupdateCanSubmitField(\"producer_withdraw\", 1);
  1806. \t\t\t{% endif %}
  1807. \t\t\t{% if activityType.producerActualMandatory == false and activityType.supplierActualMandatory == false %}
  1808. \t\t\t\tupdateCanSubmitField(\"producer_actual\", 1);
  1809. \t\t\t{% endif %}
  1810. \t\t\t{% if activityType.producerInstallationMandatory == false and activityType.supplierInstallationMandatory == false %}
  1811. \t\t\t\tupdateCanSubmitField(\"producer_installation\", 1);
  1812. \t\t\t{% endif %}
  1813. \t\t\tupdateButtonSubmit();
  1814. \t\t});
  1815. \t\t\t
  1816. \t\tdocument.body.addEventListener(\"keypress\", function(e) {
  1817. \t\t\tif(e.key == 'Enter' || e.key == 'Tab'){
  1818. \t\t\t\tswitch(document.activeElement.id){
  1819. \t\t\t\t\tcase 'form_intervention_activity_producerWithdraw': var type = 'producer_withdraw'; break;
  1820. \t\t\t\t\tcase 'form_intervention_activity_supplierWithdraw': var type = 'supplier_withdraw'; break;
  1821. \t\t\t\t\tcase 'form_intervention_activity_producerInstallation': var type = 'producer_installation'; break;
  1822. \t\t\t\t\tcase 'form_intervention_activity_supplierInstallation': var type = 'supplier_installation'; break;
  1823. \t\t\t\t\tcase 'form_intervention_activity_producerActual': var type = 'producer_actual'; break;
  1824. \t\t\t\t\tcase 'form_intervention_activity_supplierActual': var type = 'supplier_actual'; break;
  1825. \t\t\t\t\tdefault: break;
  1826. \t\t\t\t}
  1827. \t\t\t\tdocument.activeElement.blur();
  1828. \t\t\t}
  1829. \t\t});
  1830. \t\t
  1831. \t\tfunction openScanditModal(type, label){
  1832. \t\t\tdocument.getElementById('scanned_type').value = type;
  1833. \t\t\tdocument.getElementById('scandit_code_type').innerHTML = label;
  1834. \t\t\t\$('#scanditReaderModal').modal({backdrop: 'static', keyboard: false}).modal(\"show\");
  1835. \t\t}
  1836. \t\t
  1837. \t\tfunction closeModal(){
  1838. \t\t\tdocument.getElementById('scandit_reader_active').value = 0;
  1839. \t\t\t\$('#scanditReaderModal').modal('hide');
  1840. \t\t}
  1841. \t\t
  1842. \t\tfunction selectFromWarehouse(type){
  1843. \t\t\tvar typeVal = '';
  1844. \t\t\tdocument.getElementById('selected_type').value = type;
  1845. \t\t\tswitch(type){
  1846. \t\t\t\tcase 'actual': typeVal = 'Actual'; break;
  1847. \t\t\t\tcase 'withdraw': typeVal = 'Withdraw'; break;
  1848. \t\t\t\tdefault: break;
  1849. \t\t\t}
  1850. \t\t\tif(document.getElementById('form_intervention_activity_producer' + typeVal).value != '' || document.getElementById('form_intervention_activity_supplier' + typeVal).value != ''){
  1851. \t\t\t\tsearchModels();
  1852. \t\t\t\t\$('#selectModelModal').modal({backdrop: 'static', keyboard: false}).modal(\"show\");
  1853. \t\t\t}
  1854. \t\t\telse{
  1855. \t\t\t\tsearchProducts();
  1856. \t\t\t\t\$('#selectProductModal').modal({backdrop: 'static', keyboard: false}).modal(\"show\");
  1857. \t\t\t}\t\t
  1858. \t\t}
  1859. \t\tfunction updateSelectCodeModal(table){
  1860. \t\t\tif(table == 'models'){
  1861. \t\t\t\tsearchModels();
  1862. \t\t\t\t\$('#selectProductModal').modal('hide');
  1863. \t\t\t\t\$('#selectModelModal').modal({backdrop: 'static', keyboard: false}).modal(\"show\");
  1864. \t\t\t}
  1865. \t\t\telse{
  1866. \t\t\t\tsearchProducts();
  1867. \t\t\t\t\$('#selectModelModal').modal('hide');
  1868. \t\t\t\t\$('#selectProductModal').modal({backdrop: 'static', keyboard: false}).modal(\"show\");
  1869. \t\t\t}
  1870. \t\t}
  1871. \t\t{# PRODUCTS #}
  1872. \t\tfunction searchProducts(){
  1873. \t\t\tvar type = document.getElementById('selected_type').value;
  1874. \t\t\tvar filter = document.getElementById('filter_search_product').value;
  1875. \t\t\t\$.post('{{ path (\"user_ticket_intervention_activity_product_search\") }}', {ticketId:\"{{ ticket.id }}\", interventionId:\"{{ intervention.id }}\", activityTypeId:\"{{ activityType.id }}\", type:type, filter: filter, isPos:\"{{ isPos }}\"}, function(response){ 
  1876. \t\t\t\tif(response.code == 200 && response.success){
  1877. \t\t\t\t\tvar tbody = document.getElementById('tbody_products');
  1878. \t\t\t\t\ttbody.innerHTML = '';
  1879. \t\t\t\t\tvar products = JSON.parse(response.products);
  1880. \t\t\t\t\t
  1881. \t\t\t\t\tif(products.length > 0){
  1882. \t\t\t\t\t\tfor(i=0; i<products.length; i++){
  1883. \t\t\t\t\t\t\tvar tr = document.createElement('tr');
  1884. \t\t\t\t\t\t\tvar td = document.createElement('td');
  1885. \t\t\t\t\t\t\tvar tdSel = document.createElement('td');
  1886. \t\t\t\t\t\t\ttd.innerHTML = '<table class=\"table table_no_padding b_none m_b_none\"><tr><th class=\"td_w_120p\">Modello</th><td id=\"model_' + products[i].id + '\">' + products[i].modelName + '</td></tr><tr><th>Matr. produttore</th><td id=\"code_producer_' + products[i].id + '\">' + products[i].codeProducer + '</td></tr><tr><th id=\"code_supplier_' + products[i].id + '\">Matr. fornitore</th><td>' + products[i].codeSupplier + '</td></tr></table>';
  1887. \t\t\t\t\t\t\ttdSel.className = 'td_action';
  1888. \t\t\t\t\t\t\ttdSel.innerHTML = '<a href=\"javascript: selectProduct(' + products[i].id + ')\" data-bs-toggle=\"tooltip\" title=\"Seleziona\"><img class=\"icon_green\" src=\"{{ asset (icon_select) }}\" /></a>';
  1889. \t\t\t\t\t\t\ttr.appendChild(td);
  1890. \t\t\t\t\t\t\ttr.appendChild(tdSel);
  1891. \t\t\t\t\t\t\ttbody.appendChild(tr);
  1892. \t\t\t\t\t\t}
  1893. \t\t\t\t\t}
  1894. \t\t\t\t\telse{
  1895. \t\t\t\t\t\tvar tr = document.createElement('tr');
  1896. \t\t\t\t\t\tvar td = document.createElement('td');
  1897. \t\t\t\t\t\ttd.setAttribute('colspan', '2');
  1898. \t\t\t\t\t\ttd.innerHTML = 'La ricerca non ha trovato prodotti, <a href=\"javascript: updateSelectCodeModal(\\'models\\')\" class=\"button button-3d button-mini button-pr\">Inserisci nuovo modello</a>';
  1899. \t\t\t\t\t\ttr.appendChild(td);
  1900. \t\t\t\t\t\ttbody.appendChild(tr);
  1901. \t\t\t\t\t}
  1902. \t\t\t\t}
  1903. \t\t\t}, \"json\");
  1904. \t\t}
  1905. \t\tfunction selectProduct(productId){
  1906. \t\t\tif(document.getElementById('selected_type').value == 'withdraw'){
  1907. \t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdrawId').value = null;
  1908. \t\t\t\tdocument.getElementById('form_intervention_activity_productWithdrawId').value = productId;
  1909. \t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdraw').value = document.getElementById('model_' + productId).innerHTML;
  1910. \t\t\t\tdocument.getElementById('form_intervention_activity_producerWithdraw').value = document.getElementById('code_producer_' + productId).innerHTML;
  1911. \t\t\t\tdocument.getElementById('form_intervention_activity_supplierWithdraw').value = document.getElementById('code_supplier_' + productId).innerHTML;
  1912. \t\t\t}
  1913. \t\t\tif(document.getElementById('selected_type').value == 'installation'){
  1914. \t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallationId').value = null;
  1915. \t\t\t\tdocument.getElementById('form_intervention_activity_productInstallationId').value = productId;
  1916. \t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallation').value = document.getElementById('model_' + productId).innerHTML;
  1917. \t\t\t\tdocument.getElementById('form_intervention_activity_producerInstallation').value = document.getElementById('code_producer_' + productId).innerHTML;
  1918. \t\t\t\tdocument.getElementById('form_intervention_activity_supplierInstallation').value = document.getElementById('code_supplier_' + productId).innerHTML;
  1919. \t\t\t}
  1920. \t\t\tif(document.getElementById('selected_type').value == 'actual'){
  1921. \t\t\t\tdocument.getElementById('form_intervention_activity_modelActualId').value = null;
  1922. \t\t\t\tdocument.getElementById('form_intervention_activity_productActualId').value = productId;
  1923. \t\t\t\tdocument.getElementById('form_intervention_activity_modelActual').value = document.getElementById('model_' + productId).innerHTML;
  1924. \t\t\t\tdocument.getElementById('form_intervention_activity_producerActual').value = document.getElementById('code_producer_' + productId).innerHTML;
  1925. \t\t\t\tdocument.getElementById('form_intervention_activity_supplierActual').value = document.getElementById('code_supplier_' + productId).innerHTML;
  1926. \t\t\t}
  1927. \t\t\t\$('#selectProductModal').modal({backdrop: 'static', keyboard: false}).modal(\"hide\");
  1928. \t\t}
  1929. \t\t{# MODELS #}
  1930. \t\tfunction searchModels(){
  1931. \t\t\tvar filter = document.getElementById('filter_search_model').value;
  1932. \t\t\t\$.post('{{ path (\"user_ticket_intervention_activity_model_search\") }}', {interventionId: \"{{ intervention.id }}\", activityTypeId:\"{{ activityType.id }}\", isPos:\"{{ isPos }}\", filter: filter}, function(response){ 
  1933. \t\t\t\tif(response.code == 200 && response.success){
  1934. \t\t\t\t\tvar tbody = document.getElementById('tbody_models');
  1935. \t\t\t\t\ttbody.innerHTML = '';
  1936. \t\t\t\t\tvar models = JSON.parse(response.models);
  1937. \t\t\t\t\t
  1938. \t\t\t\t\tif(models.length > 0){
  1939. \t\t\t\t\t\tfor(i=0; i<models.length; i++){
  1940. \t\t\t\t\t\t\tvar tr = document.createElement('tr');
  1941. \t\t\t\t\t\t\tvar td = document.createElement('td');
  1942. \t\t\t\t\t\t\tvar tdName = document.createElement('td');
  1943. \t\t\t\t\t\t\tvar tdSel = document.createElement('td');
  1944. \t\t\t\t\t\t\t
  1945. \t\t\t\t\t\t\ttd.innerHTML = '<table class=\"table table_no_padding b_none m_b_none\"><tr><th class=\"td_w_70p\">Modello</th><td id=\"name_' + models[i].id + '\">' + models[i].name + '<td><tr><th>Cat/S.Cat</th><td>' + models[i].category + '/' + models[i].subcategory + '</td></tr><tr><th>Produttore</th><td>' + models[i].producer + '</td></tr></table>';
  1946. \t\t\t\t\t\t\ttdSel.className = 'td_action';
  1947. \t\t\t\t\t\t\ttdSel.innerHTML = '<a href=\"javascript: selectModel(' + models[i].id + ')\" data-bs-toggle=\"tooltip\" title=\"Seleziona\"><img class=\"icon_green\" src=\"{{ asset (icon_select) }}\" /></a>';
  1948. \t\t\t\t\t\t\ttr.appendChild(td);
  1949. \t\t\t\t\t\t\ttr.appendChild(tdSel);
  1950. \t\t\t\t\t\t\ttbody.appendChild(tr);
  1951. \t\t\t\t\t\t}
  1952. \t\t\t\t\t}
  1953. \t\t\t\t\telse{
  1954. \t\t\t\t\t\tvar tr = document.createElement('tr');
  1955. \t\t\t\t\t\tvar td = document.createElement('td');
  1956. \t\t\t\t\t\ttd.setAttribute('colspan', '2');
  1957. \t\t\t\t\t\ttd.innerHTML = 'La ricerca non ha trovato modelli. Controlla la correttezza della ricerca o richiedi di inserire il modello attraverso il pulsante telefono.';
  1958. \t\t\t\t\t\ttr.appendChild(td);
  1959. \t\t\t\t\t\ttbody.appendChild(tr);
  1960. \t\t\t\t\t}
  1961. \t\t\t\t}
  1962. \t\t\t}, \"json\");
  1963. \t\t}
  1964. \t\tfunction selectModel(modelId){
  1965. \t\t\tif(document.getElementById('selected_type').value == 'withdraw'){
  1966. \t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdrawId').value = modelId;
  1967. \t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdraw').value = document.getElementById('name_' + modelId).innerHTML;
  1968. \t\t\t\tshowWithdrawModelComponent(modelId);
  1969. \t\t\t}
  1970. \t\t\tif(document.getElementById('selected_type').value == 'installation'){
  1971. \t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallationId').value = modelId;
  1972. \t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallation').value = document.getElementById('name_' + modelId).innerHTML;
  1973. \t\t\t}
  1974. \t\t\tif(document.getElementById('selected_type').value == 'actual'){
  1975. \t\t\t\tdocument.getElementById('form_intervention_activity_modelActualId').value = modelId;
  1976. \t\t\t\tdocument.getElementById('form_intervention_activity_modelActual').value = document.getElementById('name_' + modelId).innerHTML;
  1977. \t\t\t}
  1978. \t\t\t\$('#selectModelModal').modal({backdrop: 'static', keyboard: false}).modal(\"hide\");
  1979. \t\t}
  1980. \t\tfunction showWithdrawModelComponent(modelId){
  1981. \t\t\t\$.post('{{ path (\"user_ticket_intervention_activity_model_components\") }}', {activityTypeId: \"{{ activityType.id }}\", modelId: modelId}, function(response){ 
  1982. \t\t\t\tif(response.code == 200 && response.success){
  1983. \t\t\t\t\tvar components = JSON.parse(response.components);
  1984. \t\t\t\t\t
  1985. \t\t\t\t\tvar rowComponent = document.getElementById('row_component_withdraw');
  1986. \t\t\t\t\trowComponent.innerHTML = '';
  1987. \t\t\t\t\trowComponent.className = 'col-12 switch m_t_20p';
  1988. \t\t\t\t\tvar table = document.createElement('table');
  1989. \t\t\t\t\ttable.className = \"table b_none table_no_padding m_none\";
  1990. \t\t\t\t\tif(components.length == 0){
  1991. \t\t\t\t\t\tvar tr = document.createElement('tr');
  1992. \t\t\t\t\t\ttr.innerHTML = '<td style=\"border-bottom: 2px solid #fff!important;\"><label class=\"m_b_none l_s_none f_w_500 p_tb_0p\">Nessun componente associato a questo modello</label></td>';
  1993. \t\t\t\t\t\ttable.appendChild(tr);
  1994. \t\t\t\t\t}
  1995. \t\t\t\t\telse{
  1996. \t\t\t\t\t\tvar label = document.createElement('label');
  1997. \t\t\t\t\t\tlabel.className = 'm_b_none l_s_none f_w_500';
  1998. \t\t\t\t\t\tlabel.innerHTML = 'Seleziona i componenti che hai ritirato insieme al prodotto/modello';
  1999. \t\t\t\t\t\tfor(i=0; i<components.length; i++){
  2000. \t\t\t\t\t\t\tvar tr = document.createElement('tr');
  2001. \t\t\t\t\t\t\ttr.innerHTML = '<td class=\"td_w_40p\" style=\"border-bottom: 2px solid #fff!important;\"><input id=\"component_' + components[i].id + '\" class=\"switch-toggle switch-flat-mini switch-toggle-flat\" type=\"checkbox\" name=\"component_' + components[i].id + '\"><label for=\"component_' + components[i].id + '\" class=\"m_b_none p_tb_0p\"></label></td><td class=\"txt_a_l\" style=\"border-bottom: 2px solid #fff!important;\"><label class=\"m_b_none l_s_none f_w_500 p_tb_0p\">' + components[i].name + '</label></td>';
  2002. \t\t\t\t\t\t\ttable.appendChild(tr);
  2003. \t\t\t\t\t\t}
  2004. \t\t\t\t\t\trowComponent.appendChild(label);
  2005. \t\t\t\t\t}
  2006. \t\t\t\t\trowComponent.appendChild(table);
  2007. \t\t\t\t\trowComponent.style.display = 'block';
  2008. \t\t\t\t}
  2009. \t\t\t}, \"json\");
  2010. \t\t}
  2011. \t\t
  2012. \t\tfunction onBlurManageBarcode(type){
  2013. \t\t\tdocument.getElementById(\"move_type\").value = type;
  2014. \t\t\tswitch(type){
  2015. \t\t\t\tcase 'producer_withdraw': 
  2016. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"withdraw\";
  2017. \t\t\t\t\tvar codeTypeLabel = \"produttore\";
  2018. \t\t\t\t\tvar code = document.getElementById('form_intervention_activity_producerWithdraw').value;
  2019. \t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualProducerWithdrawCode').value != code){
  2020. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerWithdrawCode').value = code;
  2021. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerWithdraw').value = 'manual';
  2022. \t\t\t\t\t}
  2023. \t\t\t\t\tbreak;
  2024. \t\t\t\tcase 'supplier_withdraw': 
  2025. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"withdraw\";
  2026. \t\t\t\t\tvar codeTypeLabel = \"fornitore\";
  2027. \t\t\t\t\tvar code = document.getElementById('form_intervention_activity_supplierWithdraw').value;
  2028. \t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualSupplierWithdrawCode').value != code){
  2029. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierWithdrawCode').value = code;
  2030. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierWithdraw').value = 'manual';
  2031. \t\t\t\t\t}
  2032. \t\t\t\t\tbreak;
  2033. \t\t\t\tcase 'producer_installation': 
  2034. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"installation\";
  2035. \t\t\t\t\tvar codeTypeLabel = \"produttore\";
  2036. \t\t\t\t\tvar code = document.getElementById('form_intervention_activity_producerInstallation').value;
  2037. \t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualProducerInstallationCode').value != code){
  2038. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerInstallationCode').value = code;
  2039. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerInstallation').value = 'manual';
  2040. \t\t\t\t\t}
  2041. \t\t\t\t\tbreak;
  2042. \t\t\t\tcase 'supplier_installation': 
  2043. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"installation\";
  2044. \t\t\t\t\tvar codeTypeLabel = \"fornitore\";
  2045. \t\t\t\t\tvar code = document.getElementById('form_intervention_activity_supplierInstallation').value;
  2046. \t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualSupplierInstallationCode').value != code){
  2047. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierInstallationCode').value = code;
  2048. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierInstallation').value = 'manual';
  2049. \t\t\t\t\t}
  2050. \t\t\t\t\tbreak;
  2051. \t\t\t\tcase 'producer_actual': 
  2052. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"actual\";
  2053. \t\t\t\t\tvar codeTypeLabel = \"produttore\";
  2054. \t\t\t\t\tvar code = document.getElementById('form_intervention_activity_producerActual').value;
  2055. \t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualProducerActualCode').value != code){
  2056. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerActualCode').value = code;
  2057. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerActual').value = 'manual';
  2058. \t\t\t\t\t}
  2059. \t\t\t\t\tbreak;
  2060. \t\t\t\tcase 'supplier_actual': 
  2061. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"actual\";
  2062. \t\t\t\t\tvar codeTypeLabel = \"fornitore\";
  2063. \t\t\t\t\tvar code = document.getElementById('form_intervention_activity_supplierActual').value;
  2064. \t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualSupplierActualCode').value != code){
  2065. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierActualCode').value = code;
  2066. \t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierActual').value = 'manual';
  2067. \t\t\t\t\t}
  2068. \t\t\t\t\tbreak;
  2069. \t\t\t\tdefault: break;
  2070. \t\t\t}
  2071. \t\t\tcheckCodePost(type, code, codeTypeLabel);
  2072. \t\t}
  2073. \t\tfunction manageBarcode(code){
  2074. \t\t\tvar type = document.getElementById('scanned_type').value;
  2075. \t\t\tswitch(type){
  2076. \t\t\t\tcase 'producer_withdraw':
  2077. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"withdraw\";
  2078. \t\t\t\t\tvar codeTypeLabel = \"produttore\";
  2079. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerWithdrawCode').value = code;
  2080. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerWithdraw').value = 'scan';
  2081. \t\t\t\t\tbreak;
  2082. \t\t\t\tcase 'supplier_withdraw': 
  2083. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"withdraw\";
  2084. \t\t\t\t\tvar codeTypeLabel = \"fornitore\";
  2085. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierWithdrawCode').value = code;
  2086. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierWithdraw').value = 'scan';
  2087. \t\t\t\t\tbreak;
  2088. \t\t\t\tcase 'producer_installation':
  2089. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"installation\";
  2090. \t\t\t\t\tvar codeTypeLabel = \"produttore\";
  2091. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerInstallationCode').value = code;
  2092. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerInstallation').value = 'scan';
  2093. \t\t\t\t\tbreak;
  2094. \t\t\t\tcase 'supplier_installation': 
  2095. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"installation\";
  2096. \t\t\t\t\tvar codeTypeLabel = \"fornitore\";
  2097. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierInstallationCode').value = code;
  2098. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierInstallation').value = 'scan';
  2099. \t\t\t\t\tbreak;
  2100. \t\t\t\tcase 'producer_actual':
  2101. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"actual\";
  2102. \t\t\t\t\tvar codeTypeLabel = \"produttore\";
  2103. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerActualCode').value = code;
  2104. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerActual').value = 'scan';
  2105. \t\t\t\t\tbreak;
  2106. \t\t\t\tcase 'supplier_actual': 
  2107. \t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"actual\";
  2108. \t\t\t\t\tvar codeTypeLabel = \"fornitore\";
  2109. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierActualCode').value = code;
  2110. \t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierActual').value = 'scan';
  2111. \t\t\t\t\tbreak;
  2112. \t\t\t\tdefault: break;
  2113. \t\t\t}
  2114. \t\t\tcheckCodePost(type, code, codeTypeLabel);
  2115. \t\t}
  2116. \t\t
  2117. \t\tfunction checkCodePost(type, code, codeTypeLabel){
  2118. \t\t\tvar code = code.toUpperCase();
  2119. \t\t\t\$.post('{{ path (\"user_ticket_intervention_activity_product_search_code\") }}', {ticketId:\"{{ ticket.id }}\", interventionId:\"{{ intervention.id }}\", activityTypeId:\"{{ activityType.id }}\", type:type, code:code}, function(response){ 
  2120. \t\t\t\tvar response = JSON.parse(response);
  2121. \t\t\t\tvar canSubmit = false;
  2122. \t\t\t\tif(response.code == 200 && response.success)
  2123. \t\t\t\t{
  2124. \t\t\t\t\tif(response.found){
  2125. \t\t\t\t\t\t// Se trovato prodotto
  2126. \t\t\t\t\t\tvar product = JSON.parse(response.product);
  2127. \t\t\t\t\t\tif(product.posAccessoryOk){
  2128. \t\t\t\t\t\t\t// Se POS o Accessorio coerente con il tipo di attività
  2129. \t\t\t\t\t\t\tif(product.supplierOk){
  2130. \t\t\t\t\t\t\t\t// Se il fornitore è tra quelli del prodotto
  2131. \t\t\t\t\t\t\t\tif(product.otherWarehouse == 1){
  2132. \t\t\t\t\t\t\t\t\t// Se non è nel magazzino corretto
  2133. \t\t\t\t\t\t\t\t\tif(product.canMove == 1){
  2134. \t\t\t\t\t\t\t\t\t\tdocument.getElementById('move_product_id').value = product.id;
  2135. \t\t\t\t\t\t\t\t\t\tdocument.getElementById('move_warehouse_nickname').innerHTML = product.otherWarehouseNickname;
  2136. \t\t\t\t\t\t\t\t\t\t\$('#modalWarehouseOther').modal({backdrop: 'static', keyboard: false}).modal('show');
  2137. \t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
  2138. \t\t\t\t\t\t\t\t\t}
  2139. \t\t\t\t\t\t\t\t\telse{
  2140. \t\t\t\t\t\t\t\t\t\t// Se installazione e non posso muovere
  2141. \t\t\t\t\t\t\t\t\t\tprintAlertWarning(\"Il prodotto trovato con codice \" + codeTypeLabel + \" \\\"\" + code + \"\\\" non può essere spostato perché non è nello stato corretto!\");
  2142. \t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
  2143. \t\t\t\t\t\t\t\t\t}
  2144. \t\t\t\t\t\t\t\t}
  2145. \t\t\t\t\t\t\t\telse{
  2146. \t\t\t\t\t\t\t\t\t// Se in magazzino corretto
  2147. \t\t\t\t\t\t\t\t\tswitch(type){
  2148. \t\t\t\t\t\t\t\t\t\tcase 'producer_withdraw': 
  2149. \t\t\t\t\t\t\t\t\t\tcase 'supplier_withdraw': 
  2150. \t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_productWithdrawId').value = product.id;
  2151. \t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdraw').value = product.model;
  2152. \t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerWithdraw').value = product.codeProducer;
  2153. \t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierWithdraw').value = product.codeSupplier;
  2154. \t\t\t\t\t\t\t\t\t\t\tshowWithdrawModelComponent(product.model.id);
  2155. \t\t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
  2156. \t\t\t\t\t\t\t\t\t\t\tbreak;
  2157. \t\t\t\t\t\t\t\t\t\tcase 'producer_installation': 
  2158. \t\t\t\t\t\t\t\t\t\tcase 'supplier_installation':
  2159. \t\t\t\t\t\t\t\t\t\t\t// Faccio canMove solo qua perché negli altri 2 casi è sul magazzino cliente e non hanno i trasferimenti
  2160. \t\t\t\t\t\t\t\t\t\t\tif(product.canMove == 1){
  2161. \t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_productInstallationId').value = product.id;
  2162. \t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallation').value = product.model;
  2163. \t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerInstallation').value = product.codeProducer;
  2164. \t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierInstallation').value = product.codeSupplier;
  2165. \t\t\t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
  2166. \t\t\t\t\t\t\t\t\t\t\t}
  2167. \t\t\t\t\t\t\t\t\t\t\telse{
  2168. \t\t\t\t\t\t\t\t\t\t\t\t// Se installazione e non posso muovere
  2169. \t\t\t\t\t\t\t\t\t\t\t\tprintAlertWarning(\"Il prodotto trovato con codice \" + codeTypeLabel + \" \\\"\" + code + \"\\\" non può essere spostato perché non è in stato disponibile!\");
  2170. \t\t\t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
  2171. \t\t\t\t\t\t\t\t\t\t\t}
  2172. \t\t\t\t\t\t\t\t\t\t\tbreak;
  2173. \t\t\t\t\t\t\t\t\t\tcase 'producer_actual': 
  2174. \t\t\t\t\t\t\t\t\t\tcase 'supplier_actual':
  2175. \t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_productActualId').value = product.id;
  2176. \t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelActual').value = product.model;
  2177. \t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerActual').value = product.codeProducer;
  2178. \t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierActual').value = product.codeSupplier;
  2179. \t\t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
  2180. \t\t\t\t\t\t\t\t\t\t\tbreak;
  2181. \t\t\t\t\t\t\t\t\t\tdefault: break;
  2182. \t\t\t\t\t\t\t\t\t}
  2183. \t\t\t\t\t\t\t\t}
  2184. \t\t\t\t\t\t\t}
  2185. \t\t\t\t\t\t\telse{
  2186. \t\t\t\t\t\t\t\t// Se fornitore ticket non è tra i fornitori prodotto
  2187. \t\t\t\t\t\t\t\tprintAlertWarning(\"Il prodotto trovato con codice \" + codeTypeLabel + \" \\\"\" + code + \"\\\" non può essere usato per il fornitore {{ ticket.supplier.name }}!\");
  2188. \t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
  2189. \t\t\t\t\t\t\t}
  2190. \t\t\t\t\t\t}
  2191. \t\t\t\t\t\telse{
  2192. \t\t\t\t\t\t\t// Se POS o Accessorio non coerente con l'attività
  2193. \t\t\t\t\t\t\tprintAlertWarning(\"Il prodotto trovato con codice \" + codeTypeLabel + \" \\\"\" + code + \"\\\" non può essere usato per questo tipo di intervento, selezionare un {{ posAccessory }}!\");
  2194. \t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
  2195. \t\t\t\t\t\t}
  2196. \t\t\t\t\t}
  2197. \t\t\t\t\telse{
  2198. \t\t\t\t\t\t// Se non ho trovato prodotto
  2199. \t\t\t\t\t\tif(code != ''){
  2200. \t\t\t\t\t\t\tswitch(type){
  2201. \t\t\t\t\t\t\t\tcase 'producer_withdraw': 
  2202. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerWithdraw').value = code;
  2203. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdraw').value = '';
  2204. \t\t\t\t\t\t\t\t\tdocument.getElementById('row_component_withdraw').className = 'col-12';
  2205. \t\t\t\t\t\t\t\t\tdocument.getElementById('row_component_withdraw').innerHTML = '';
  2206. \t\t\t\t\t\t\t\t\tprintAlertInfo(\"Il codice \" + codeTypeLabel + \" è utilizzabile, seleziona il modello prima di proseguire!\");
  2207. \t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
  2208. \t\t\t\t\t\t\t\t\tbreak;
  2209. \t\t\t\t\t\t\t\tcase 'supplier_withdraw': 
  2210. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierWithdraw').value = code;
  2211. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdraw').value = '';
  2212. \t\t\t\t\t\t\t\t\tdocument.getElementById('row_component_withdraw').className = 'col-12';
  2213. \t\t\t\t\t\t\t\t\tdocument.getElementById('row_component_withdraw').innerHTML = '';
  2214. \t\t\t\t\t\t\t\t\tprintAlertInfo(\"Il codice \" + codeTypeLabel + \" è utilizzabile, seleziona il modello prima di proseguire!\");
  2215. \t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
  2216. \t\t\t\t\t\t\t\t\tbreak;
  2217. \t\t\t\t\t\t\t\tcase 'producer_installation':
  2218. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerInstallation').value = code;
  2219. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallation').value = '';
  2220. \t\t\t\t\t\t\t\t\tprintAlertWarning(\"Nessun prodotto trovato con codice \" + codeTypeLabel + \" nel magazzino tecnico!\");
  2221. \t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
  2222. \t\t\t\t\t\t\t\t\tbreak;
  2223. \t\t\t\t\t\t\t\tcase 'supplier_installation':
  2224. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierInstallation').value = code;
  2225. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallation').value = '';
  2226. \t\t\t\t\t\t\t\t\tprintAlertWarning(\"Nessun prodotto trovato con codice \" + codeTypeLabel + \" nel magazzino tecnico!\");
  2227. \t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
  2228. \t\t\t\t\t\t\t\t\tbreak;
  2229. \t\t\t\t\t\t\t\tcase 'producer_actual': 
  2230. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerActual').value = code;
  2231. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelActual').value = '';
  2232. \t\t\t\t\t\t\t\t\tprintAlertInfo(\"Il codice \" + codeTypeLabel + \" è utilizzabile, seleziona il modello prima di proseguire!\");
  2233. \t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
  2234. \t\t\t\t\t\t\t\t\tbreak;
  2235. \t\t\t\t\t\t\t\tcase 'supplier_actual': 
  2236. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierActual').value = code;
  2237. \t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelActual').value = '';
  2238. \t\t\t\t\t\t\t\t\tprintAlertInfo(\"Il codice \" + codeTypeLabel + \" è utilizzabile, seleziona il modello prima di proseguire!\");
  2239. \t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
  2240. \t\t\t\t\t\t\t\t\tbreak;
  2241. \t\t\t\t\t\t\t\tdefault: break;
  2242. \t\t\t\t\t\t\t}
  2243. \t\t\t\t\t\t}
  2244. \t\t\t\t\t}
  2245. \t\t\t\t}
  2246. \t\t\t\tcloseModal();
  2247. \t\t\t\tupdateButtonSubmit();
  2248. \t\t\t});
  2249. \t\t}
  2250. \t\tfunction showClientWarehouse(){
  2251. \t\t\tif(document.getElementById(\"clientWarehouse\").style.display == \"block\")
  2252. \t\t\t\tdocument.getElementById(\"clientWarehouse\").style.display = \"none\";
  2253. \t\t\telse
  2254. \t\t\t\tdocument.getElementById(\"clientWarehouse\").style.display = \"block\";
  2255. \t\t}
  2256. \t\tfunction moveProduct(){
  2257. \t\t\tvar productId = document.getElementById('move_product_id').value;
  2258. \t\t\tvar type = document.getElementById(\"move_product_type\").value;
  2259. \t\t\t\$.post('{{ path (\"user_ticket_intervention_activity_move_product\", {\"interventionId\": intervention.id }) }}', {productId:productId, type: type}, function(response){ 
  2260. \t\t\t\tif(response.code == 200 && response.success){
  2261. \t\t\t\t\tprintAlertSuccess('Prodotto spostato correttamente!');
  2262. \t\t\t\t\t\$('#modalWarehouseOther').modal('hide');
  2263. \t\t\t\t\tonBlurManageBarcode(document.getElementById(\"move_type\").value);
  2264. \t\t\t\t}
  2265. \t\t\t}, \"json\");
  2266. \t\t}
  2267. \t\tfunction submitForm(){
  2268. \t\t\ttriggerLoading();
  2269. \t\t\t\$('#form').submit();
  2270. \t\t}
  2271. \t\tfunction updateCanSubmitField(type, value){
  2272. \t\t\tswitch(type){
  2273. \t\t\t\tcase 'producer_withdraw': 
  2274. \t\t\t\tcase 'supplier_withdraw': 
  2275. \t\t\t\t\tdocument.getElementById('can_submit_withdraw').value = value;
  2276. \t\t\t\t\tbreak;
  2277. \t\t\t\tcase 'producer_installation': 
  2278. \t\t\t\tcase 'supplier_installation':
  2279. \t\t\t\t\tdocument.getElementById('can_submit_installation').value = value;
  2280. \t\t\t\t\tbreak;
  2281. \t\t\t\tcase 'producer_actual': 
  2282. \t\t\t\tcase 'supplier_actual':
  2283. \t\t\t\t\tdocument.getElementById('can_submit_actual').value = value;
  2284. \t\t\t\t\tbreak;
  2285. \t\t\t\tdefault: break;
  2286. \t\t\t}
  2287. \t\t}
  2288. \t\tfunction updateButtonSubmit(){
  2289. \t\t\tvar csW = document.getElementById('can_submit_withdraw').value;
  2290. \t\t\tvar csA = document.getElementById('can_submit_actual').value;
  2291. \t\t\tvar csI = document.getElementById('can_submit_installation').value;
  2292. \t\t\tvar buttonSubmit = document.getElementById('button_submit');
  2293. \t\t\tif(csW == 1 && csA == 1 && csI == 1){
  2294. \t\t\t\tbuttonSubmit.className = \"button button-3d button-small button-green\";
  2295. \t\t\t\tbuttonSubmit.href = \"javascript: submitForm()\";
  2296. \t\t\t}
  2297. \t\t\telse{
  2298. \t\t\t\tbuttonSubmit.className = \"button button-3d button-small button-grey\";
  2299. \t\t\t\tbuttonSubmit.href = \"javascript: void()\";
  2300. \t\t\t}
  2301. \t\t}
  2302. \t</script>
  2303. {% endblock %}""role/user/ticket/intervention/activity/single.html.twig""/var/www/vhosts/eposmanager.software/templates/role/user/ticket/intervention/activity/single.html.twig");
  2304.     }
  2305. }