<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* role/user/ticket/intervention/activity/single.html.twig */
class __TwigTemplate_91c36ed0ef6c70fd2fbda342f1d14b62 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'pageTitleH1' => [$this, 'block_pageTitleH1'],
'pageTitleBreadcrumb' => [$this, 'block_pageTitleBreadcrumb'],
'subMenuLeft' => [$this, 'block_subMenuLeft'],
'subMenuRight' => [$this, 'block_subMenuRight'],
'interventionContent' => [$this, 'block_interventionContent'],
'javascripts' => [$this, 'block_javascripts'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "role/user/ticket/intervention/index.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "role/user/ticket/intervention/activity/single.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "role/user/ticket/intervention/activity/single.html.twig"));
$this->parent = $this->loadTemplate("role/user/ticket/intervention/index.html.twig", "role/user/ticket/intervention/activity/single.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_title($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
yield "Ticket - Intervento - Attività";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
// line 5
public function block_pageTitleH1($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "pageTitleH1"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "pageTitleH1"));
yield "Ticket - Intervento - Attività";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
// line 7
public function block_pageTitleBreadcrumb($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "pageTitleBreadcrumb"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "pageTitleBreadcrumb"));
// line 8
yield "\t<li class=\"breadcrumb-item\"><a href=\"";
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", false, false, false, 8)]), "html", null, true);
yield "\">Ticket</a></li>
\t<li class=\"breadcrumb-item\"><a href=\"javascript:void(0)\">Intervento</a></li>
\t<li class=\"breadcrumb-item\"><a href=\"javascript:void(0)\">Attività</a></li>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
// line 13
public function block_subMenuLeft($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "subMenuLeft"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "subMenuLeft"));
// line 14
yield "\t<li class=\"nav-item\"><a class=\"nav-link\" href=\"";
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", false, false, false, 14)]), "html", null, true);
yield "\">Riassunto</a></li>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
// line 17
public function block_subMenuRight($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "subMenuRight"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "subMenuRight"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
// line 20
public function block_interventionContent($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "interventionContent"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "interventionContent"));
// line 21
yield "\t<div class=\"row\">
\t\t<div class=\"col-12\">
\t\t\t<h4 class=\"form_title\"><a onclick=\"showClientWarehouse()\" class=\"cursor_p\">Visualizza/Nascondi magazzino cliente</a></h4>
\t\t\t<hr class=\"m_t_none\">
\t\t\t<div id=\"clientWarehouse\" style=\"display:none\">
\t\t\t\t";
// line 26
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, 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.', 26, $this->source); })()), "client", [], "any", false, false, false, 26), "warehouse", [], "any", false, false, false, 26), "products", [], "any", false, false, false, 26)) > 0)) {
// line 27
yield "\t\t\t\t\t<table class=\"table table_no_padding responsive_font_size\">
\t\t\t\t\t\t<tbody>
\t\t\t\t\t\t\t";
// line 29
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, 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.', 29, $this->source); })()), "client", [], "any", false, false, false, 29), "warehouse", [], "any", false, false, false, 29), "products", [], "any", false, false, false, 29));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
// line 30
yield "\t\t\t\t\t\t\t\t";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 30) > 1)) {
// line 31
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>
\t\t\t\t\t\t\t\t";
}
// line 33
yield "\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t<th class=\"td_w_100p\" style=\"border-bottom: 0px\">Modello</th>
\t\t\t\t\t\t\t\t\t<td style=\"border-bottom: 0px\">";
// line 35
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["p"], "model", [], "any", false, false, false, 35), "name", [], "any", false, false, false, 35), "html", null, true);
yield " (";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["p"], "model", [], "any", false, false, false, 35), "sku", [], "any", false, false, false, 35), "html", null, true);
yield ")</td>
\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t<th style=\"border-bottom: 0px\">Termid</th>
\t\t\t\t\t\t\t\t\t<td style=\"border-bottom: 0px\">";
// line 39
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["p"], "termid", [], "any", false, false, false, 39), "html", null, true);
yield "</td>
\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t<th style=\"border-bottom: 0px\">Matr. Produttore</th>
\t\t\t\t\t\t\t\t\t<td style=\"border-bottom: 0px\">";
// line 43
if ((CoreExtension::getAttribute($this->env, $this->source, $context["p"], "codeProducer", [], "any", false, false, false, 43) != null)) {
yield "<a href=\"javascript: copyToClipboard(";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["p"], "id", [], "any", false, false, false, 43), "html", null, true);
yield ", 'producer')\" class=\"underline\" data-bs-toggle=\"tooltip\" title=\"Copia matricola\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["p"], "codeProducer", [], "any", false, false, false, 43), "html", null, true);
yield "</a>";
} else {
yield "---";
}
yield "</td>
\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t<th style=\"border-bottom: 0px\">Matr. Fornitore</th>
\t\t\t\t\t\t\t\t\t<td style=\"border-bottom: 0px\">";
// line 47
if ((CoreExtension::getAttribute($this->env, $this->source, $context["p"], "codeSupplier", [], "any", false, false, false, 47) != null)) {
yield "<a href=\"javascript: copyToClipboard(";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["p"], "id", [], "any", false, false, false, 47), "html", null, true);
yield ", 'supplier')\" class=\"underline\" data-bs-toggle=\"tooltip\" title=\"Copia matricola\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["p"], "codeSupplier", [], "any", false, false, false, 47), "html", null, true);
yield "</a>";
} else {
yield "---";
}
yield "</td>
\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"product_";
// line 49
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["p"], "id", [], "any", false, false, false, 49), "html", null, true);
yield "_producer\" value=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["p"], "codeProducer", [], "any", false, false, false, 49), "html", null, true);
yield "\">
\t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"product_";
// line 50
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["p"], "id", [], "any", false, false, false, 50), "html", null, true);
yield "_supplier\" value=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["p"], "codeSupplier", [], "any", false, false, false, 50), "html", null, true);
yield "\">
\t\t\t\t\t\t\t";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['p'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 52
yield "\t\t\t\t\t\t</tbody>
\t\t\t\t\t</table>
\t\t\t\t";
} else {
// line 55
yield "\t\t\t\t\t<div class=\"style-msg infomsg\">
\t\t\t\t\t\t<div class=\"sb-msg responsive_font_size\">
\t\t\t\t\t\t\t<i class=\"icon-info-sign\"></i><strong>Info:</strong> Nessuna matricola registrata presente su questo cliente!
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t";
}
// line 61
yield "\t\t\t</div>
\t\t</div>
\t</div>
\t<input type=\"hidden\" id=\"can_submit_withdraw\" value=\"0\">
\t<input type=\"hidden\" id=\"can_submit_installation\" value=\"0\">
\t<input type=\"hidden\" id=\"can_submit_actual\" value=\"0\">
\t";
// line 69
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"]]);
yield "
\t\t<div class=\"row\">
\t\t\t<div class=\"col-12\">
\t\t\t\t<h4 class=\"form_title\">Dettaglia l'attività: ";
// line 72
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", false, false, false, 72), "html", null, true);
yield "</h4>
\t\t\t\t<hr class=\"m_t_none\">
\t\t\t</div>
\t\t</div>
\t\t";
// line 77
yield "\t\t";
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", false, false, false, 77) || 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", false, false, false, 77))) {
// line 78
yield "\t\t\t";
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", false, false, false, 78)) {
// line 79
yield "\t\t\t\t<div class=\"row form-group\">
\t\t\t\t\t<div class=\"col-10 col-lg-11\">
\t\t\t\t\t\t<label class=\"form_label\">Ritiro - Matricola produttore*</label>
\t\t\t\t\t\t<div ";
// line 82
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", false, false, false, 82), 'errors');
yield ">
\t\t\t\t\t\t\t";
// line 83
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", false, false, false, 83), 'widget', ["attr" => ["inputmode" => "search", "onKeyDown" => "updateButtonSubmit()", "onBlur" => "onBlurManageBarcode(\"producer_withdraw\")"]]);
yield "
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
\t\t\t\t\t\t<a href=\"javascript:openScanditModal('producer_withdraw', 'produttore')\"><img src=\"";
// line 87
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", null, true);
yield "\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Scansiona\"></a>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t";
} else {
// line 91
yield "\t\t\t\t";
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", false, false, false, 91), 'widget', ["attr" => ["class" => "display_n"]]);
yield "
\t\t\t";
}
// line 93
yield "\t\t\t";
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", false, false, false, 93)) {
// line 94
yield "\t\t\t\t<div class=\"row form-group\">
\t\t\t\t\t<div class=\"col-10 col-lg-11\">
\t\t\t\t\t\t<label class=\"form_label\">Ritiro - Matricola fornitore*</label>
\t\t\t\t\t\t<div ";
// line 97
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", false, false, false, 97), 'errors');
yield ">
\t\t\t\t\t\t\t";
// line 98
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", false, false, false, 98), 'widget', ["attr" => ["onKeyDown" => "updateButtonSubmit()", "onBlur" => "onBlurManageBarcode(\"supplier_withdraw\")"]]);
yield "
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
\t\t\t\t\t\t<a href=\"javascript:openScanditModal('supplier_withdraw', 'fornitore')\"><img src=\"";
// line 102
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", null, true);
yield "\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Scansiona\"></a>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t";
} else {
// line 106
yield "\t\t\t\t";
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", false, false, false, 106), 'widget', ["attr" => ["class" => "display_n"]]);
yield "
\t\t\t";
}
// line 108
yield "\t\t\t<div class=\"row form-group\" id=\"row_model_withdraw\">
\t\t\t\t<div class=\"col-10 col-lg-11\">
\t\t\t\t\t<label class=\"form_label\">Ritiro - Modello</label>
\t\t\t\t\t<div ";
// line 111
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", false, false, false, 111), 'errors');
yield ">
\t\t\t\t\t\t";
// line 112
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", false, false, false, 112), 'widget', ["attr" => ["class" => "form-control", "readonly" => true]]);
yield "
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
\t\t\t\t\t<a href=\"javascript: selectFromWarehouse('withdraw')\"><img src=\"";
// line 116
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", null, true);
yield "\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Seleziona\"></a>
\t\t\t\t</div>
\t\t\t\t<div class=\"col-12 switch\" id=\"row_component_withdraw\" style=\"display: none\">
\t\t\t\t</div>
\t\t\t</div>
\t\t";
} else {
// line 122
yield "\t\t\t";
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", false, false, false, 122), 'widget', ["attr" => ["class" => "display_n"]]);
yield "
\t\t\t";
// line 123
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", false, false, false, 123), 'widget', ["attr" => ["class" => "display_n"]]);
yield "
\t\t\t";
// line 124
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", false, false, false, 124), 'widget', ["attr" => ["class" => "display_n"]]);
yield "
\t\t";
}
// line 126
yield "\t\t";
// line 127
yield "\t\t";
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", false, false, false, 127) || 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", false, false, false, 127))) {
// line 128
yield "\t\t\t";
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", false, false, false, 128)) {
// line 129
yield "\t\t\t\t<div class=\"row form-group\">
\t\t\t\t\t<div class=\"col-10 col-lg-11\">
\t\t\t\t\t\t<label class=\"form_label\">Installazione - Matricola produttore*</label>
\t\t\t\t\t\t<div ";
// line 132
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", false, false, false, 132), 'errors');
yield ">
\t\t\t\t\t\t\t";
// line 133
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", false, false, false, 133), 'widget', ["attr" => ["inputmode" => "search", "onKeyDown" => "updateButtonSubmit()", "onBlur" => "onBlurManageBarcode(\"producer_installation\")"]]);
yield "
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
\t\t\t\t\t\t<a href=\"javascript:openScanditModal('producer_installation', 'produttore')\"><img src=\"";
// line 137
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", null, true);
yield "\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Scansiona\"></a>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t";
} else {
// line 141
yield "\t\t\t\t";
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", false, false, false, 141), 'widget', ["attr" => ["class" => "display_n"]]);
yield "
\t\t\t";
}
// line 143
yield "\t\t\t";
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", false, false, false, 143)) {
// line 144
yield "\t\t\t\t<div class=\"row form-group\">
\t\t\t\t\t<div class=\"col-10 col-lg-11\">
\t\t\t\t\t\t<label class=\"form_label\">Installazione - Matricola fornitore*</label>
\t\t\t\t\t\t<div ";
// line 147
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", false, false, false, 147), 'errors');
yield ">
\t\t\t\t\t\t\t";
// line 148
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", false, false, false, 148), 'widget', ["attr" => ["onKeyDown" => "updateButtonSubmit()", "onBlur" => "onBlurManageBarcode(\"supplier_installation\")"]]);
yield "
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
\t\t\t\t\t\t<a href=\"javascript:openScanditModal('supplier_installation', 'fornitore')\"><img src=\"";
// line 152
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", null, true);
yield "\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Scansiona\"></a>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t";
} else {
// line 156
yield "\t\t\t\t";
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", false, false, false, 156), 'widget', ["attr" => ["class" => "display_n"]]);
yield "
\t\t\t";
}
// line 158
yield "\t\t\t<div class=\"row form-group\" id=\"row_model_installation\">
\t\t\t\t<div class=\"col-10 col-lg-11\">
\t\t\t\t\t<label class=\"form_label\">Installazione - Prodotto</label>
\t\t\t\t\t<div ";
// line 161
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", false, false, false, 161), 'errors');
yield ">
\t\t\t\t\t\t";
// line 162
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", false, false, false, 162), 'widget', ["attr" => ["readonly" => true]]);
yield "
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
\t\t\t\t\t<a href=\"tel:";
// line 166
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", false, false, false, 166), "html", null, true);
yield "\"><img class=\"icon_red m_t_33p\" width=\"38\" src=\"";
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", null, true);
yield "\" data-bs-toggle=\"tooltip\" title=\"Ho un problema\"/></a>
\t\t\t\t</div>
\t\t\t</div>
\t\t";
} else {
// line 170
yield "\t\t\t";
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", false, false, false, 170), 'widget', ["attr" => ["class" => "display_n"]]);
yield "
\t\t\t";
// line 171
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", false, false, false, 171), 'widget', ["attr" => ["class" => "display_n"]]);
yield "
\t\t\t";
// line 172
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", false, false, false, 172), 'widget', ["attr" => ["class" => "display_n"]]);
yield "
\t\t";
}
// line 174
yield "\t\t";
// line 175
yield "\t\t";
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", false, false, false, 175) || 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", false, false, false, 175))) {
// line 176
yield "\t\t\t";
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", false, false, false, 176)) {
// line 177
yield "\t\t\t\t<div class=\"row form-group\">
\t\t\t\t\t<div class=\"col-10 col-lg-11\">
\t\t\t\t\t\t<label class=\"form_label\">Attuale - Matricola produttore*</label>
\t\t\t\t\t\t<div ";
// line 180
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", false, false, false, 180), 'errors');
yield ">
\t\t\t\t\t\t\t";
// line 181
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", false, false, false, 181), 'widget', ["attr" => ["inputmode" => "search", "onKeyDown" => "updateButtonSubmit()", "onBlur" => "onBlurManageBarcode(\"producer_actual\")"]]);
yield "
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
\t\t\t\t\t\t<a href=\"javascript:openScanditModal('producer_actual', 'produttore')\"><img src=\"";
// line 185
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", null, true);
yield "\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Scansiona\"></a>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t";
} else {
// line 189
yield "\t\t\t\t";
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", false, false, false, 189), 'widget', ["attr" => ["class" => "display_n"]]);
yield "
\t\t\t";
}
// line 191
yield "\t\t\t";
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", false, false, false, 191)) {
// line 192
yield "\t\t\t\t<div class=\"row form-group\">
\t\t\t\t\t<div class=\"col-10 col-lg-11\">
\t\t\t\t\t\t<label class=\"form_label\">Attuale - Matricola fornitore*</label>
\t\t\t\t\t\t<div ";
// line 195
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", false, false, false, 195), 'errors');
yield ">
\t\t\t\t\t\t\t";
// line 196
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", false, false, false, 196), 'widget', ["attr" => ["onKeyDown" => "updateButtonSubmit()", "onBlur" => "onBlurManageBarcode(\"supplier_actual\")"]]);
yield "
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
\t\t\t\t\t\t<a href=\"javascript:openScanditModal('supplier_actual', 'fornitore')\"><img src=\"";
// line 200
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", null, true);
yield "\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Scansiona\"></a>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t";
} else {
// line 204
yield "\t\t\t\t";
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", false, false, false, 204), 'widget', ["attr" => ["class" => "display_n"]]);
yield "
\t\t\t";
}
// line 206
yield "\t\t\t<div class=\"row form-group\" id=\"row_model_actual\">
\t\t\t\t<div class=\"col-10 col-lg-11\">
\t\t\t\t\t<label class=\"form_label\">Attuale - Modello</label>
\t\t\t\t\t<div ";
// line 209
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", false, false, false, 209), 'errors');
yield ">
\t\t\t\t\t\t";
// line 210
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", false, false, false, 210), 'widget', ["attr" => ["readonly" => true]]);
yield "
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
\t\t\t\t\t<a href=\"javascript: selectFromWarehouse('actual')\"><img src=\"";
// line 214
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", null, true);
yield "\" width=\"38\" class=\"icon_pr m_t_33p\" data-bs-toggle=\"tooltip\" title=\"Seleziona\"></a>
\t\t\t\t</div>
\t\t\t</div>
\t\t";
} else {
// line 218
yield "\t\t\t";
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", false, false, false, 218), 'widget', ["attr" => ["class" => "display_n"]]);
yield "
\t\t\t";
// line 219
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", false, false, false, 219), 'widget', ["attr" => ["class" => "display_n"]]);
yield "
\t\t\t";
// line 220
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", false, false, false, 220), 'widget', ["attr" => ["class" => "display_n"]]);
yield "
\t\t";
}
// line 222
yield "\t\t<div class=\"row m_t_50p\">
\t\t\t<div class=\"col-12 txt_a_c\">
\t\t\t\t<a id=\"button_submit\" href=\"javascript: void()\" class=\"button button-3d button-small button-grey\">Inserisci</a>
\t\t\t</div>
\t\t</div>
\t\t";
// line 227
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", false, false, false, 227), 'widget');
yield "
\t\t";
// line 228
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", false, false, false, 228), 'widget');
yield "
\t\t";
// line 229
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", false, false, false, 229), 'widget');
yield "
\t\t";
// line 230
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", false, false, false, 230), 'widget');
yield "
\t\t";
// line 231
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", false, false, false, 231), 'widget');
yield "
\t\t";
// line 232
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", false, false, false, 232), 'widget');
yield "
\t\t";
// line 234
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", false, false, false, 234), 'widget');
yield "
\t\t";
// line 235
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", false, false, false, 235), 'widget');
yield "
\t\t";
// line 236
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", false, false, false, 236), 'widget');
yield "
\t\t";
// line 237
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", false, false, false, 237), 'widget');
yield "
\t\t";
// line 238
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", false, false, false, 238), 'widget');
yield "
\t\t";
// line 239
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", false, false, false, 239), 'widget');
yield "
\t\t";
// line 241
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", false, false, false, 241), 'widget');
yield "
\t\t";
// line 242
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", false, false, false, 242), 'widget');
yield "
\t\t";
// line 243
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", false, false, false, 243), 'widget');
yield "
\t\t";
// line 244
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", false, false, false, 244), 'widget');
yield "
\t\t";
// line 245
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", false, false, false, 245), 'widget');
yield "
\t\t
\t\t<input type=\"hidden\" name=\"activityTypeId\" value=\"";
// line 247
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", false, false, false, 247), "html", null, true);
yield "\">
\t\t<input type=\"hidden\" name=\"ticketId\" value=\"";
// line 248
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", false, false, false, 248), "html", null, true);
yield "\">
\t";
// line 249
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');
yield "
\t<div id=\"selectProductModal\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\">
\t\t<div class=\"modal-dialog modal-lg\" role=\"document\">
\t\t\t<div class=\"modal-content\">
\t\t\t\t<div class=\"modal-header\"><h3 class=\"modal-title\">Seleziona prodotto dal magazzino cliente</h3></div>
\t\t\t\t<div class=\"modal-body\">
\t\t\t\t\t<div class=\"row\">
\t\t\t\t\t\t<div class=\"col-12 overflow_a\">
\t\t\t\t\t\t\t<table id=\"table_products\" class=\"table table-sm responsive_font_size\">
\t\t\t\t\t\t\t\t<thead>
\t\t\t\t\t\t\t\t\t<tr>
\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>
\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t</thead>
\t\t\t\t\t\t\t\t<tbody id=\"tbody_products\">
\t\t\t\t\t\t\t\t</tbody>
\t\t\t\t\t\t\t</table>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<div class=\"modal-footer txt_a_c\">
\t\t\t\t\t<a href=\"javascript:void(0)\" class=\"button button-3d button-mini button-pr\" data-bs-dismiss=\"modal\">Chiudi</a>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
\t<div id=\"selectModelModal\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\">
\t\t<div class=\"modal-dialog modal-lg\" role=\"document\">
\t\t\t<div class=\"modal-content\">
\t\t\t\t<div class=\"modal-header\"><h3 class=\"modal-title\">Seleziona modello</h3></div>
\t\t\t\t<div class=\"modal-body\">
\t\t\t\t\t<div class=\"row\">
\t\t\t\t\t\t<div class=\"col-12 overflow_a\">
\t\t\t\t\t\t\t<table id=\"table_models\" class=\"table table-sm responsive_font_size\">
\t\t\t\t\t\t\t\t<thead>
\t\t\t\t\t\t\t\t\t<tr>
\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>
\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t\t<tr>
\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>
\t\t\t\t\t\t\t\t\t\t<td class=\"td_action\"><a href=\"tel:";
// line 291
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", false, false, false, 291), "html", null, true);
yield "\" data-bs-toggle=\"tooltip\" title=\"Richiedi inserimento nuovo\"><img class=\"icon_red\" src=\"";
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", null, true);
yield "\" /></a></td>
\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t</thead>
\t\t\t\t\t\t\t\t<tbody id=\"tbody_models\">
\t\t\t\t\t\t\t\t</tbody>
\t\t\t\t\t\t\t</table>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<div class=\"modal-footer txt_a_c\">
\t\t\t\t\t<a href=\"javascript:void(0)\" class=\"button button-3d button-mini button-pr\" data-bs-dismiss=\"modal\">Chiudi</a>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
\t<input type=\"hidden\" id=\"selected_type\">
\t<input type=\"hidden\" id=\"scanned_type\">
\t<div id=\"modalWarehouseOther\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\">
\t\t<div class=\"modal-dialog\" role=\"document\">
\t\t\t<div class=\"modal-content\">
\t\t\t\t<div class=\"modal-header\"><h3 class=\"modal-title\">Magazzino non corrispondente</h3></div>\t\t\t
\t\t\t\t<div class=\"modal-body\">
\t\t\t\t\t<input type=\"hidden\" id=\"move_product_id\">
\t\t\t\t\t<input type=\"hidden\" id=\"move_type\">
\t\t\t\t\t<div class=\"row\">
\t\t\t\t\t\t<div class=\"col-12 txt_a_c\">
\t\t\t\t\t\t\t<input type=\"hidden\" id=\"move_product_type\" />
\t\t\t\t\t\t\t<label class=\"modal_subtitle\">Attenzione!</label>
\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>
\t\t\t\t\t\t\t";
// line 322
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::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", false, false, false, 322), "accountTypology", [], "any", false, false, false, 322) != "technician")) {
// line 323
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>
\t\t\t\t\t\t\t";
} else {
// line 325
yield "\t\t\t\t\t\t\t\t<a href=\"tel:";
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", false, false, false, 325), "html", null, true);
yield "\"><img class=\"icon_red m_t_33p\" width=\"38\" src=\"";
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", null, true);
yield "\" data-bs-toggle=\"tooltip\" title=\"Ho un problema\"/></a>
\t\t\t\t\t\t\t";
}
// line 327
yield "\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<div class=\"modal-footer\">
\t\t\t\t\t";
// line 331
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::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", false, false, false, 331), "accountTypology", [], "any", false, false, false, 331) != "technician")) {
// line 332
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>
\t\t\t\t\t\t<a href=\"javascript:moveProduct()\" class=\"button button-3d button-mini button-green f_right\">Sposta</a>
\t\t\t\t\t";
} else {
// line 335
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>
\t\t\t\t\t";
}
// line 337
yield "\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
\t<div id=\"scanditReaderModal\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\">
\t\t<div class=\"modal-dialog modal-lg\" role=\"document\">
\t\t\t<div class=\"modal-content\">
\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>
\t\t\t\t<div class=\"modal-body\">
\t\t\t\t\t<input type=\"hidden\" id=\"scandit_reader_active\" value=\"0\">
\t\t\t\t\t<div id=\"data-capture-view\"></div>
\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>
\t\t\t\t</div>
\t\t\t\t<div class=\"modal-footer txt_a_c\">
\t\t\t\t\t<a href=\"javascript:void(0)\" class=\"button button-3d button-mini button-pr\" data-bs-dismiss=\"modal\">Chiudi</a>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
// line 359
public function block_javascripts($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 360
yield "\t";
yield from $this->yieldParentBlock("javascripts", $context, $blocks);
yield "
\t";
// line 361
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"]));
// line 362
yield "\t";
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", false, false, false, 362)) {
$context["posAccessory"] = "POS";
} else {
$context["posAccessory"] = "Accessorio";
}
// line 363
yield "\t<script>
\t\t\$(document).ready(function(){
\t\t\t";
// line 365
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", false, false, false, 365) || 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", false, false, false, 365))) {
// line 366
yield "\t\t\t\tshowWithdrawModelComponent(document.getElementById('form_intervention_activity_modelWithdrawId').value);
\t\t\t";
}
// line 368
yield "
\t\t\t";
// line 369
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", false, false, false, 369) == 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", false, false, false, 369) == false))) {
// line 370
yield "\t\t\t\tupdateCanSubmitField(\"producer_withdraw\", 1);
\t\t\t";
}
// line 372
yield "\t\t\t";
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", false, false, false, 372) == 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", false, false, false, 372) == false))) {
// line 373
yield "\t\t\t\tupdateCanSubmitField(\"producer_actual\", 1);
\t\t\t";
}
// line 375
yield "\t\t\t";
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", false, false, false, 375) == 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", false, false, false, 375) == false))) {
// line 376
yield "\t\t\t\tupdateCanSubmitField(\"producer_installation\", 1);
\t\t\t";
}
// line 378
yield "\t\t\tupdateButtonSubmit();
\t\t});
\t\t\t
\t\tdocument.body.addEventListener(\"keypress\", function(e) {
\t\t\tif(e.key == 'Enter' || e.key == 'Tab'){
\t\t\t\tswitch(document.activeElement.id){
\t\t\t\t\tcase 'form_intervention_activity_producerWithdraw': var type = 'producer_withdraw'; break;
\t\t\t\t\tcase 'form_intervention_activity_supplierWithdraw': var type = 'supplier_withdraw'; break;
\t\t\t\t\tcase 'form_intervention_activity_producerInstallation': var type = 'producer_installation'; break;
\t\t\t\t\tcase 'form_intervention_activity_supplierInstallation': var type = 'supplier_installation'; break;
\t\t\t\t\tcase 'form_intervention_activity_producerActual': var type = 'producer_actual'; break;
\t\t\t\t\tcase 'form_intervention_activity_supplierActual': var type = 'supplier_actual'; break;
\t\t\t\t\tdefault: break;
\t\t\t\t}
\t\t\t\tdocument.activeElement.blur();
\t\t\t}
\t\t});
\t\t
\t\tfunction openScanditModal(type, label){
\t\t\tdocument.getElementById('scanned_type').value = type;
\t\t\tdocument.getElementById('scandit_code_type').innerHTML = label;
\t\t\t\$('#scanditReaderModal').modal({backdrop: 'static', keyboard: false}).modal(\"show\");
\t\t}
\t\t
\t\tfunction closeModal(){
\t\t\tdocument.getElementById('scandit_reader_active').value = 0;
\t\t\t\$('#scanditReaderModal').modal('hide');
\t\t}
\t\t
\t\tfunction selectFromWarehouse(type){
\t\t\tvar typeVal = '';
\t\t\tdocument.getElementById('selected_type').value = type;
\t\t\tswitch(type){
\t\t\t\tcase 'actual': typeVal = 'Actual'; break;
\t\t\t\tcase 'withdraw': typeVal = 'Withdraw'; break;
\t\t\t\tdefault: break;
\t\t\t}
\t\t\tif(document.getElementById('form_intervention_activity_producer' + typeVal).value != '' || document.getElementById('form_intervention_activity_supplier' + typeVal).value != ''){
\t\t\t\tsearchModels();
\t\t\t\t\$('#selectModelModal').modal({backdrop: 'static', keyboard: false}).modal(\"show\");
\t\t\t}
\t\t\telse{
\t\t\t\tsearchProducts();
\t\t\t\t\$('#selectProductModal').modal({backdrop: 'static', keyboard: false}).modal(\"show\");
\t\t\t}\t\t
\t\t}
\t\tfunction updateSelectCodeModal(table){
\t\t\tif(table == 'models'){
\t\t\t\tsearchModels();
\t\t\t\t\$('#selectProductModal').modal('hide');
\t\t\t\t\$('#selectModelModal').modal({backdrop: 'static', keyboard: false}).modal(\"show\");
\t\t\t}
\t\t\telse{
\t\t\t\tsearchProducts();
\t\t\t\t\$('#selectModelModal').modal('hide');
\t\t\t\t\$('#selectProductModal').modal({backdrop: 'static', keyboard: false}).modal(\"show\");
\t\t\t}
\t\t}
\t\t";
// line 439
yield "\t\tfunction searchProducts(){
\t\t\tvar type = document.getElementById('selected_type').value;
\t\t\tvar filter = document.getElementById('filter_search_product').value;
\t\t\t\$.post('";
// line 443
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("user_ticket_intervention_activity_product_search");
yield "', {ticketId:\"";
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", false, false, false, 443), "html", null, true);
yield "\", interventionId:\"";
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", false, false, false, 443), "html", null, true);
yield "\", activityTypeId:\"";
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", false, false, false, 443), "html", null, true);
yield "\", type:type, filter: filter, isPos:\"";
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", null, true);
yield "\"}, function(response){
\t\t\t\tif(response.code == 200 && response.success){
\t\t\t\t\tvar tbody = document.getElementById('tbody_products');
\t\t\t\t\ttbody.innerHTML = '';
\t\t\t\t\tvar products = JSON.parse(response.products);
\t\t\t\t\t
\t\t\t\t\tif(products.length > 0){
\t\t\t\t\t\tfor(i=0; i<products.length; i++){
\t\t\t\t\t\t\tvar tr = document.createElement('tr');
\t\t\t\t\t\t\tvar td = document.createElement('td');
\t\t\t\t\t\t\tvar tdSel = document.createElement('td');
\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>';
\t\t\t\t\t\t\ttdSel.className = 'td_action';
\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=\"";
// line 458
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", null, true);
yield "\" /></a>';
\t\t\t\t\t\t\ttr.appendChild(td);
\t\t\t\t\t\t\ttr.appendChild(tdSel);
\t\t\t\t\t\t\ttbody.appendChild(tr);
\t\t\t\t\t\t}
\t\t\t\t\t}
\t\t\t\t\telse{
\t\t\t\t\t\tvar tr = document.createElement('tr');
\t\t\t\t\t\tvar td = document.createElement('td');
\t\t\t\t\t\ttd.setAttribute('colspan', '2');
\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>';
\t\t\t\t\t\ttr.appendChild(td);
\t\t\t\t\t\ttbody.appendChild(tr);
\t\t\t\t\t}
\t\t\t\t}
\t\t\t}, \"json\");
\t\t}
\t\tfunction selectProduct(productId){
\t\t\tif(document.getElementById('selected_type').value == 'withdraw'){
\t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdrawId').value = null;
\t\t\t\tdocument.getElementById('form_intervention_activity_productWithdrawId').value = productId;
\t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdraw').value = document.getElementById('model_' + productId).innerHTML;
\t\t\t\tdocument.getElementById('form_intervention_activity_producerWithdraw').value = document.getElementById('code_producer_' + productId).innerHTML;
\t\t\t\tdocument.getElementById('form_intervention_activity_supplierWithdraw').value = document.getElementById('code_supplier_' + productId).innerHTML;
\t\t\t}
\t\t\tif(document.getElementById('selected_type').value == 'installation'){
\t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallationId').value = null;
\t\t\t\tdocument.getElementById('form_intervention_activity_productInstallationId').value = productId;
\t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallation').value = document.getElementById('model_' + productId).innerHTML;
\t\t\t\tdocument.getElementById('form_intervention_activity_producerInstallation').value = document.getElementById('code_producer_' + productId).innerHTML;
\t\t\t\tdocument.getElementById('form_intervention_activity_supplierInstallation').value = document.getElementById('code_supplier_' + productId).innerHTML;
\t\t\t}
\t\t\tif(document.getElementById('selected_type').value == 'actual'){
\t\t\t\tdocument.getElementById('form_intervention_activity_modelActualId').value = null;
\t\t\t\tdocument.getElementById('form_intervention_activity_productActualId').value = productId;
\t\t\t\tdocument.getElementById('form_intervention_activity_modelActual').value = document.getElementById('model_' + productId).innerHTML;
\t\t\t\tdocument.getElementById('form_intervention_activity_producerActual').value = document.getElementById('code_producer_' + productId).innerHTML;
\t\t\t\tdocument.getElementById('form_intervention_activity_supplierActual').value = document.getElementById('code_supplier_' + productId).innerHTML;
\t\t\t}
\t\t\t\$('#selectProductModal').modal({backdrop: 'static', keyboard: false}).modal(\"hide\");
\t\t}
\t\t";
// line 503
yield "\t\tfunction searchModels(){
\t\t\tvar filter = document.getElementById('filter_search_model').value;
\t\t\t\$.post('";
// line 506
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("user_ticket_intervention_activity_model_search");
yield "', {interventionId: \"";
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", false, false, false, 506), "html", null, true);
yield "\", activityTypeId:\"";
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", false, false, false, 506), "html", null, true);
yield "\", isPos:\"";
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", null, true);
yield "\", filter: filter}, function(response){
\t\t\t\tif(response.code == 200 && response.success){
\t\t\t\t\tvar tbody = document.getElementById('tbody_models');
\t\t\t\t\ttbody.innerHTML = '';
\t\t\t\t\tvar models = JSON.parse(response.models);
\t\t\t\t\t
\t\t\t\t\tif(models.length > 0){
\t\t\t\t\t\tfor(i=0; i<models.length; i++){
\t\t\t\t\t\t\tvar tr = document.createElement('tr');
\t\t\t\t\t\t\tvar td = document.createElement('td');
\t\t\t\t\t\t\tvar tdName = document.createElement('td');
\t\t\t\t\t\t\tvar tdSel = document.createElement('td');
\t\t\t\t\t\t\t
\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>';
\t\t\t\t\t\t\ttdSel.className = 'td_action';
\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=\"";
// line 522
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", null, true);
yield "\" /></a>';
\t\t\t\t\t\t\ttr.appendChild(td);
\t\t\t\t\t\t\ttr.appendChild(tdSel);
\t\t\t\t\t\t\ttbody.appendChild(tr);
\t\t\t\t\t\t}
\t\t\t\t\t}
\t\t\t\t\telse{
\t\t\t\t\t\tvar tr = document.createElement('tr');
\t\t\t\t\t\tvar td = document.createElement('td');
\t\t\t\t\t\ttd.setAttribute('colspan', '2');
\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.';
\t\t\t\t\t\ttr.appendChild(td);
\t\t\t\t\t\ttbody.appendChild(tr);
\t\t\t\t\t}
\t\t\t\t}
\t\t\t}, \"json\");
\t\t}
\t\tfunction selectModel(modelId){
\t\t\tif(document.getElementById('selected_type').value == 'withdraw'){
\t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdrawId').value = modelId;
\t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdraw').value = document.getElementById('name_' + modelId).innerHTML;
\t\t\t\tshowWithdrawModelComponent(modelId);
\t\t\t}
\t\t\tif(document.getElementById('selected_type').value == 'installation'){
\t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallationId').value = modelId;
\t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallation').value = document.getElementById('name_' + modelId).innerHTML;
\t\t\t}
\t\t\tif(document.getElementById('selected_type').value == 'actual'){
\t\t\t\tdocument.getElementById('form_intervention_activity_modelActualId').value = modelId;
\t\t\t\tdocument.getElementById('form_intervention_activity_modelActual').value = document.getElementById('name_' + modelId).innerHTML;
\t\t\t}
\t\t\t\$('#selectModelModal').modal({backdrop: 'static', keyboard: false}).modal(\"hide\");
\t\t}
\t\tfunction showWithdrawModelComponent(modelId){
\t\t\t\$.post('";
// line 559
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("user_ticket_intervention_activity_model_components");
yield "', {activityTypeId: \"";
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", false, false, false, 559), "html", null, true);
yield "\", modelId: modelId}, function(response){
\t\t\t\tif(response.code == 200 && response.success){
\t\t\t\t\tvar components = JSON.parse(response.components);
\t\t\t\t\t
\t\t\t\t\tvar rowComponent = document.getElementById('row_component_withdraw');
\t\t\t\t\trowComponent.innerHTML = '';
\t\t\t\t\trowComponent.className = 'col-12 switch m_t_20p';
\t\t\t\t\tvar table = document.createElement('table');
\t\t\t\t\ttable.className = \"table b_none table_no_padding m_none\";
\t\t\t\t\tif(components.length == 0){
\t\t\t\t\t\tvar tr = document.createElement('tr');
\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>';
\t\t\t\t\t\ttable.appendChild(tr);
\t\t\t\t\t}
\t\t\t\t\telse{
\t\t\t\t\t\tvar label = document.createElement('label');
\t\t\t\t\t\tlabel.className = 'm_b_none l_s_none f_w_500';
\t\t\t\t\t\tlabel.innerHTML = 'Seleziona i componenti che hai ritirato insieme al prodotto/modello';
\t\t\t\t\t\tfor(i=0; i<components.length; i++){
\t\t\t\t\t\t\tvar tr = document.createElement('tr');
\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>';
\t\t\t\t\t\t\ttable.appendChild(tr);
\t\t\t\t\t\t}
\t\t\t\t\t\trowComponent.appendChild(label);
\t\t\t\t\t}
\t\t\t\t\trowComponent.appendChild(table);
\t\t\t\t\trowComponent.style.display = 'block';
\t\t\t\t}
\t\t\t}, \"json\");
\t\t}
\t\t
\t\tfunction onBlurManageBarcode(type){
\t\t\tdocument.getElementById(\"move_type\").value = type;
\t\t\tswitch(type){
\t\t\t\tcase 'producer_withdraw':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"withdraw\";
\t\t\t\t\tvar codeTypeLabel = \"produttore\";
\t\t\t\t\tvar code = document.getElementById('form_intervention_activity_producerWithdraw').value;
\t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualProducerWithdrawCode').value != code){
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerWithdrawCode').value = code;
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerWithdraw').value = 'manual';
\t\t\t\t\t}
\t\t\t\t\tbreak;
\t\t\t\tcase 'supplier_withdraw':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"withdraw\";
\t\t\t\t\tvar codeTypeLabel = \"fornitore\";
\t\t\t\t\tvar code = document.getElementById('form_intervention_activity_supplierWithdraw').value;
\t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualSupplierWithdrawCode').value != code){
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierWithdrawCode').value = code;
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierWithdraw').value = 'manual';
\t\t\t\t\t}
\t\t\t\t\tbreak;
\t\t\t\tcase 'producer_installation':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"installation\";
\t\t\t\t\tvar codeTypeLabel = \"produttore\";
\t\t\t\t\tvar code = document.getElementById('form_intervention_activity_producerInstallation').value;
\t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualProducerInstallationCode').value != code){
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerInstallationCode').value = code;
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerInstallation').value = 'manual';
\t\t\t\t\t}
\t\t\t\t\tbreak;
\t\t\t\tcase 'supplier_installation':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"installation\";
\t\t\t\t\tvar codeTypeLabel = \"fornitore\";
\t\t\t\t\tvar code = document.getElementById('form_intervention_activity_supplierInstallation').value;
\t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualSupplierInstallationCode').value != code){
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierInstallationCode').value = code;
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierInstallation').value = 'manual';
\t\t\t\t\t}
\t\t\t\t\tbreak;
\t\t\t\tcase 'producer_actual':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"actual\";
\t\t\t\t\tvar codeTypeLabel = \"produttore\";
\t\t\t\t\tvar code = document.getElementById('form_intervention_activity_producerActual').value;
\t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualProducerActualCode').value != code){
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerActualCode').value = code;
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerActual').value = 'manual';
\t\t\t\t\t}
\t\t\t\t\tbreak;
\t\t\t\tcase 'supplier_actual':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"actual\";
\t\t\t\t\tvar codeTypeLabel = \"fornitore\";
\t\t\t\t\tvar code = document.getElementById('form_intervention_activity_supplierActual').value;
\t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualSupplierActualCode').value != code){
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierActualCode').value = code;
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierActual').value = 'manual';
\t\t\t\t\t}
\t\t\t\t\tbreak;
\t\t\t\tdefault: break;
\t\t\t}
\t\t\tcheckCodePost(type, code, codeTypeLabel);
\t\t}
\t\tfunction manageBarcode(code){
\t\t\tvar type = document.getElementById('scanned_type').value;
\t\t\tswitch(type){
\t\t\t\tcase 'producer_withdraw':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"withdraw\";
\t\t\t\t\tvar codeTypeLabel = \"produttore\";
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerWithdrawCode').value = code;
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerWithdraw').value = 'scan';
\t\t\t\t\tbreak;
\t\t\t\tcase 'supplier_withdraw':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"withdraw\";
\t\t\t\t\tvar codeTypeLabel = \"fornitore\";
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierWithdrawCode').value = code;
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierWithdraw').value = 'scan';
\t\t\t\t\tbreak;
\t\t\t\tcase 'producer_installation':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"installation\";
\t\t\t\t\tvar codeTypeLabel = \"produttore\";
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerInstallationCode').value = code;
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerInstallation').value = 'scan';
\t\t\t\t\tbreak;
\t\t\t\tcase 'supplier_installation':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"installation\";
\t\t\t\t\tvar codeTypeLabel = \"fornitore\";
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierInstallationCode').value = code;
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierInstallation').value = 'scan';
\t\t\t\t\tbreak;
\t\t\t\tcase 'producer_actual':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"actual\";
\t\t\t\t\tvar codeTypeLabel = \"produttore\";
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerActualCode').value = code;
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerActual').value = 'scan';
\t\t\t\t\tbreak;
\t\t\t\tcase 'supplier_actual':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"actual\";
\t\t\t\t\tvar codeTypeLabel = \"fornitore\";
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierActualCode').value = code;
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierActual').value = 'scan';
\t\t\t\t\tbreak;
\t\t\t\tdefault: break;
\t\t\t}
\t\t\tcheckCodePost(type, code, codeTypeLabel);
\t\t}
\t\t
\t\tfunction checkCodePost(type, code, codeTypeLabel){
\t\t\tvar code = code.toUpperCase();
\t\t\t\$.post('";
// line 702
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("user_ticket_intervention_activity_product_search_code");
yield "', {ticketId:\"";
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", false, false, false, 702), "html", null, true);
yield "\", interventionId:\"";
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", false, false, false, 702), "html", null, true);
yield "\", activityTypeId:\"";
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", false, false, false, 702), "html", null, true);
yield "\", type:type, code:code}, function(response){
\t\t\t\tvar response = JSON.parse(response);
\t\t\t\tvar canSubmit = false;
\t\t\t\tif(response.code == 200 && response.success)
\t\t\t\t{
\t\t\t\t\tif(response.found){
\t\t\t\t\t\t// Se trovato prodotto
\t\t\t\t\t\tvar product = JSON.parse(response.product);
\t\t\t\t\t\tif(product.posAccessoryOk){
\t\t\t\t\t\t\t// Se POS o Accessorio coerente con il tipo di attività
\t\t\t\t\t\t\tif(product.supplierOk){
\t\t\t\t\t\t\t\t// Se il fornitore è tra quelli del prodotto
\t\t\t\t\t\t\t\tif(product.otherWarehouse == 1){
\t\t\t\t\t\t\t\t\t// Se non è nel magazzino corretto
\t\t\t\t\t\t\t\t\tif(product.canMove == 1){
\t\t\t\t\t\t\t\t\t\tdocument.getElementById('move_product_id').value = product.id;
\t\t\t\t\t\t\t\t\t\tdocument.getElementById('move_warehouse_nickname').innerHTML = product.otherWarehouseNickname;
\t\t\t\t\t\t\t\t\t\t\$('#modalWarehouseOther').modal({backdrop: 'static', keyboard: false}).modal('show');
\t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\telse{
\t\t\t\t\t\t\t\t\t\t// Se installazione e non posso muovere
\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!\");
\t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\telse{
\t\t\t\t\t\t\t\t\t// Se in magazzino corretto
\t\t\t\t\t\t\t\t\tswitch(type){
\t\t\t\t\t\t\t\t\t\tcase 'producer_withdraw':
\t\t\t\t\t\t\t\t\t\tcase 'supplier_withdraw':
\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_productWithdrawId').value = product.id;
\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdraw').value = product.model;
\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerWithdraw').value = product.codeProducer;
\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierWithdraw').value = product.codeSupplier;
\t\t\t\t\t\t\t\t\t\t\tshowWithdrawModelComponent(product.model.id);
\t\t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
\t\t\t\t\t\t\t\t\t\t\tbreak;
\t\t\t\t\t\t\t\t\t\tcase 'producer_installation':
\t\t\t\t\t\t\t\t\t\tcase 'supplier_installation':
\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
\t\t\t\t\t\t\t\t\t\t\tif(product.canMove == 1){
\t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_productInstallationId').value = product.id;
\t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallation').value = product.model;
\t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerInstallation').value = product.codeProducer;
\t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierInstallation').value = product.codeSupplier;
\t\t\t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
\t\t\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\t\t\telse{
\t\t\t\t\t\t\t\t\t\t\t\t// Se installazione e non posso muovere
\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!\");
\t\t\t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
\t\t\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\t\t\tbreak;
\t\t\t\t\t\t\t\t\t\tcase 'producer_actual':
\t\t\t\t\t\t\t\t\t\tcase 'supplier_actual':
\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_productActualId').value = product.id;
\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelActual').value = product.model;
\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerActual').value = product.codeProducer;
\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierActual').value = product.codeSupplier;
\t\t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
\t\t\t\t\t\t\t\t\t\t\tbreak;
\t\t\t\t\t\t\t\t\t\tdefault: break;
\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t}
\t\t\t\t\t\t\telse{
\t\t\t\t\t\t\t\t// Se fornitore ticket non è tra i fornitori prodotto
\t\t\t\t\t\t\t\tprintAlertWarning(\"Il prodotto trovato con codice \" + codeTypeLabel + \" \\\"\" + code + \"\\\" non può essere usato per il fornitore ";
// line 770
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, 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.', 770, $this->source); })()), "supplier", [], "any", false, false, false, 770), "name", [], "any", false, false, false, 770), "html", null, true);
yield "!\");
\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
\t\t\t\t\t\t\t}
\t\t\t\t\t\t}
\t\t\t\t\t\telse{
\t\t\t\t\t\t\t// Se POS o Accessorio non coerente con l'attività
\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 ";
// line 776
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", null, true);
yield "!\");
\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
\t\t\t\t\t\t}
\t\t\t\t\t}
\t\t\t\t\telse{
\t\t\t\t\t\t// Se non ho trovato prodotto
\t\t\t\t\t\tif(code != ''){
\t\t\t\t\t\t\tswitch(type){
\t\t\t\t\t\t\t\tcase 'producer_withdraw':
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerWithdraw').value = code;
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdraw').value = '';
\t\t\t\t\t\t\t\t\tdocument.getElementById('row_component_withdraw').className = 'col-12';
\t\t\t\t\t\t\t\t\tdocument.getElementById('row_component_withdraw').innerHTML = '';
\t\t\t\t\t\t\t\t\tprintAlertInfo(\"Il codice \" + codeTypeLabel + \" è utilizzabile, seleziona il modello prima di proseguire!\");
\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
\t\t\t\t\t\t\t\t\tbreak;
\t\t\t\t\t\t\t\tcase 'supplier_withdraw':
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierWithdraw').value = code;
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdraw').value = '';
\t\t\t\t\t\t\t\t\tdocument.getElementById('row_component_withdraw').className = 'col-12';
\t\t\t\t\t\t\t\t\tdocument.getElementById('row_component_withdraw').innerHTML = '';
\t\t\t\t\t\t\t\t\tprintAlertInfo(\"Il codice \" + codeTypeLabel + \" è utilizzabile, seleziona il modello prima di proseguire!\");
\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
\t\t\t\t\t\t\t\t\tbreak;
\t\t\t\t\t\t\t\tcase 'producer_installation':
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerInstallation').value = code;
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallation').value = '';
\t\t\t\t\t\t\t\t\tprintAlertWarning(\"Nessun prodotto trovato con codice \" + codeTypeLabel + \" nel magazzino tecnico!\");
\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
\t\t\t\t\t\t\t\t\tbreak;
\t\t\t\t\t\t\t\tcase 'supplier_installation':
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierInstallation').value = code;
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallation').value = '';
\t\t\t\t\t\t\t\t\tprintAlertWarning(\"Nessun prodotto trovato con codice \" + codeTypeLabel + \" nel magazzino tecnico!\");
\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
\t\t\t\t\t\t\t\t\tbreak;
\t\t\t\t\t\t\t\tcase 'producer_actual':
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerActual').value = code;
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelActual').value = '';
\t\t\t\t\t\t\t\t\tprintAlertInfo(\"Il codice \" + codeTypeLabel + \" è utilizzabile, seleziona il modello prima di proseguire!\");
\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
\t\t\t\t\t\t\t\t\tbreak;
\t\t\t\t\t\t\t\tcase 'supplier_actual':
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierActual').value = code;
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelActual').value = '';
\t\t\t\t\t\t\t\t\tprintAlertInfo(\"Il codice \" + codeTypeLabel + \" è utilizzabile, seleziona il modello prima di proseguire!\");
\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
\t\t\t\t\t\t\t\t\tbreak;
\t\t\t\t\t\t\t\tdefault: break;
\t\t\t\t\t\t\t}
\t\t\t\t\t\t}
\t\t\t\t\t}
\t\t\t\t}
\t\t\t\tcloseModal();
\t\t\t\tupdateButtonSubmit();
\t\t\t});
\t\t}
\t\tfunction showClientWarehouse(){
\t\t\tif(document.getElementById(\"clientWarehouse\").style.display == \"block\")
\t\t\t\tdocument.getElementById(\"clientWarehouse\").style.display = \"none\";
\t\t\telse
\t\t\t\tdocument.getElementById(\"clientWarehouse\").style.display = \"block\";
\t\t}
\t\tfunction moveProduct(){
\t\t\tvar productId = document.getElementById('move_product_id').value;
\t\t\tvar type = document.getElementById(\"move_product_type\").value;
\t\t\t\$.post('";
// line 844
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", false, false, false, 844)]), "html", null, true);
yield "', {productId:productId, type: type}, function(response){
\t\t\t\tif(response.code == 200 && response.success){
\t\t\t\t\tprintAlertSuccess('Prodotto spostato correttamente!');
\t\t\t\t\t\$('#modalWarehouseOther').modal('hide');
\t\t\t\t\tonBlurManageBarcode(document.getElementById(\"move_type\").value);
\t\t\t\t}
\t\t\t}, \"json\");
\t\t}
\t\tfunction submitForm(){
\t\t\ttriggerLoading();
\t\t\t\$('#form').submit();
\t\t}
\t\tfunction updateCanSubmitField(type, value){
\t\t\tswitch(type){
\t\t\t\tcase 'producer_withdraw':
\t\t\t\tcase 'supplier_withdraw':
\t\t\t\t\tdocument.getElementById('can_submit_withdraw').value = value;
\t\t\t\t\tbreak;
\t\t\t\tcase 'producer_installation':
\t\t\t\tcase 'supplier_installation':
\t\t\t\t\tdocument.getElementById('can_submit_installation').value = value;
\t\t\t\t\tbreak;
\t\t\t\tcase 'producer_actual':
\t\t\t\tcase 'supplier_actual':
\t\t\t\t\tdocument.getElementById('can_submit_actual').value = value;
\t\t\t\t\tbreak;
\t\t\t\tdefault: break;
\t\t\t}
\t\t}
\t\tfunction updateButtonSubmit(){
\t\t\tvar csW = document.getElementById('can_submit_withdraw').value;
\t\t\tvar csA = document.getElementById('can_submit_actual').value;
\t\t\tvar csI = document.getElementById('can_submit_installation').value;
\t\t\tvar buttonSubmit = document.getElementById('button_submit');
\t\t\tif(csW == 1 && csA == 1 && csI == 1){
\t\t\t\tbuttonSubmit.className = \"button button-3d button-small button-green\";
\t\t\t\tbuttonSubmit.href = \"javascript: submitForm()\";
\t\t\t}
\t\t\telse{
\t\t\t\tbuttonSubmit.className = \"button button-3d button-small button-grey\";
\t\t\t\tbuttonSubmit.href = \"javascript: void()\";
\t\t\t}
\t\t}
\t</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "role/user/ticket/intervention/activity/single.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% extends 'role/user/ticket/intervention/index.html.twig' %}
{% block title %}Ticket - Intervento - Attività{% endblock %}
{% block pageTitleH1 %}Ticket - Intervento - Attività{% endblock %}
{% block pageTitleBreadcrumb %}
\t<li class=\"breadcrumb-item\"><a href=\"{{ path ('user_ticket_sheet', {'ticketId':ticket.id}) }}\">Ticket</a></li>
\t<li class=\"breadcrumb-item\"><a href=\"javascript:void(0)\">Intervento</a></li>
\t<li class=\"breadcrumb-item\"><a href=\"javascript:void(0)\">Attività</a></li>
{% endblock %}
{% block subMenuLeft %}
\t<li class=\"nav-item\"><a class=\"nav-link\" href=\"{{ path ('user_ticket_intervention_activity_summary', {'interventionId':intervention.id}) }}\">Riassunto</a></li>
{% endblock %}
{% block subMenuRight %}
{% endblock %}
{% block interventionContent %}
\t<div class=\"row\">
\t\t<div class=\"col-12\">
\t\t\t<h4 class=\"form_title\"><a onclick=\"showClientWarehouse()\" class=\"cursor_p\">Visualizza/Nascondi magazzino cliente</a></h4>
\t\t\t<hr class=\"m_t_none\">
\t\t\t<div id=\"clientWarehouse\" style=\"display:none\">
\t\t\t\t{% if ticket.client.warehouse.products|length > 0 %}
\t\t\t\t\t<table class=\"table table_no_padding responsive_font_size\">
\t\t\t\t\t\t<tbody>
\t\t\t\t\t\t\t{% for p in ticket.client.warehouse.products %}
\t\t\t\t\t\t\t\t{% if loop.index > 1 %}
\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>
\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t<th class=\"td_w_100p\" style=\"border-bottom: 0px\">Modello</th>
\t\t\t\t\t\t\t\t\t<td style=\"border-bottom: 0px\">{{ p.model.name }} ({{ p.model.sku }})</td>
\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t<th style=\"border-bottom: 0px\">Termid</th>
\t\t\t\t\t\t\t\t\t<td style=\"border-bottom: 0px\">{{ p.termid }}</td>
\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t<th style=\"border-bottom: 0px\">Matr. Produttore</th>
\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>
\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t<th style=\"border-bottom: 0px\">Matr. Fornitore</th>
\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>
\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"product_{{ p.id }}_producer\" value=\"{{ p.codeProducer }}\">
\t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"product_{{ p.id }}_supplier\" value=\"{{ p.codeSupplier }}\">
\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t</tbody>
\t\t\t\t\t</table>
\t\t\t\t{% else %}
\t\t\t\t\t<div class=\"style-msg infomsg\">
\t\t\t\t\t\t<div class=\"sb-msg responsive_font_size\">
\t\t\t\t\t\t\t<i class=\"icon-info-sign\"></i><strong>Info:</strong> Nessuna matricola registrata presente su questo cliente!
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t{% endif %}
\t\t\t</div>
\t\t</div>
\t</div>
\t<input type=\"hidden\" id=\"can_submit_withdraw\" value=\"0\">
\t<input type=\"hidden\" id=\"can_submit_installation\" value=\"0\">
\t<input type=\"hidden\" id=\"can_submit_actual\" value=\"0\">
\t{{ form_start(form, {'attr': {'novalidate': 'novalidate', 'id':'form'}}) }}
\t\t<div class=\"row\">
\t\t\t<div class=\"col-12\">
\t\t\t\t<h4 class=\"form_title\">Dettaglia l'attività: {{ activityType.value }}</h4>
\t\t\t\t<hr class=\"m_t_none\">
\t\t\t</div>
\t\t</div>
\t\t{# Ritiro #}
\t\t{% if activityType.producerWithdrawMandatory or activityType.supplierWithdrawMandatory %}
\t\t\t{% if activityType.producerWithdrawMandatory %}
\t\t\t\t<div class=\"row form-group\">
\t\t\t\t\t<div class=\"col-10 col-lg-11\">
\t\t\t\t\t\t<label class=\"form_label\">Ritiro - Matricola produttore*</label>
\t\t\t\t\t\t<div {{ form_errors(form.producerWithdraw) }}>
\t\t\t\t\t\t\t{{ form_widget(form.producerWithdraw, {'attr':{'inputmode':'search', 'onKeyDown':'updateButtonSubmit()', 'onBlur':'onBlurManageBarcode(\"producer_withdraw\")'}}) }}
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
\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>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t{% else %}
\t\t\t\t{{ form_widget(form.producerWithdraw, {'attr':{'class':'display_n'}}) }}
\t\t\t{% endif %}
\t\t\t{% if activityType.supplierWithdrawMandatory %}
\t\t\t\t<div class=\"row form-group\">
\t\t\t\t\t<div class=\"col-10 col-lg-11\">
\t\t\t\t\t\t<label class=\"form_label\">Ritiro - Matricola fornitore*</label>
\t\t\t\t\t\t<div {{ form_errors(form.supplierWithdraw) }}>
\t\t\t\t\t\t\t{{ form_widget(form.supplierWithdraw, {'attr':{'onKeyDown':'updateButtonSubmit()', 'onBlur':'onBlurManageBarcode(\"supplier_withdraw\")'}}) }}
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
\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>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t{% else %}
\t\t\t\t{{ form_widget(form.supplierWithdraw, {'attr':{'class':'display_n'}}) }}
\t\t\t{% endif %}
\t\t\t<div class=\"row form-group\" id=\"row_model_withdraw\">
\t\t\t\t<div class=\"col-10 col-lg-11\">
\t\t\t\t\t<label class=\"form_label\">Ritiro - Modello</label>
\t\t\t\t\t<div {{ form_errors(form.modelWithdraw) }}>
\t\t\t\t\t\t{{ form_widget(form.modelWithdraw, {'attr':{'class':'form-control', 'readonly':true}} ) }}
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
\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>
\t\t\t\t</div>
\t\t\t\t<div class=\"col-12 switch\" id=\"row_component_withdraw\" style=\"display: none\">
\t\t\t\t</div>
\t\t\t</div>
\t\t{% else %}
\t\t\t{{ form_widget(form.modelWithdraw, {'attr':{'class':'display_n'}}) }}
\t\t\t{{ form_widget(form.producerWithdraw, {'attr':{'class':'display_n'}}) }}
\t\t\t{{ form_widget(form.supplierWithdraw, {'attr':{'class':'display_n'}}) }}
\t\t{% endif %}
\t\t{# Installazione #}
\t\t{% if activityType.producerInstallationMandatory or activityType.supplierInstallationMandatory %}
\t\t\t{% if activityType.producerInstallationMandatory %}
\t\t\t\t<div class=\"row form-group\">
\t\t\t\t\t<div class=\"col-10 col-lg-11\">
\t\t\t\t\t\t<label class=\"form_label\">Installazione - Matricola produttore*</label>
\t\t\t\t\t\t<div {{ form_errors(form.producerInstallation) }}>
\t\t\t\t\t\t\t{{ form_widget(form.producerInstallation, {'attr':{'inputmode':'search','onKeyDown':'updateButtonSubmit()', 'onBlur':'onBlurManageBarcode(\"producer_installation\")'}}) }}
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
\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>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t{% else %}
\t\t\t\t{{ form_widget(form.producerInstallation, {'attr':{'class':'display_n'}}) }}
\t\t\t{% endif %}
\t\t\t{% if activityType.supplierInstallationMandatory %}
\t\t\t\t<div class=\"row form-group\">
\t\t\t\t\t<div class=\"col-10 col-lg-11\">
\t\t\t\t\t\t<label class=\"form_label\">Installazione - Matricola fornitore*</label>
\t\t\t\t\t\t<div {{ form_errors(form.supplierInstallation) }}>
\t\t\t\t\t\t\t{{ form_widget(form.supplierInstallation, {'attr':{'onKeyDown':'updateButtonSubmit()', 'onBlur':'onBlurManageBarcode(\"supplier_installation\")'}}) }}
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
\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>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t{% else %}
\t\t\t\t{{ form_widget(form.supplierInstallation, {'attr':{'class':'display_n'}}) }}
\t\t\t{% endif %}
\t\t\t<div class=\"row form-group\" id=\"row_model_installation\">
\t\t\t\t<div class=\"col-10 col-lg-11\">
\t\t\t\t\t<label class=\"form_label\">Installazione - Prodotto</label>
\t\t\t\t\t<div {{ form_errors(form.modelInstallation) }}>
\t\t\t\t\t\t{{ form_widget(form.modelInstallation, {'attr':{'readonly':true}} ) }}
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
\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>
\t\t\t\t</div>
\t\t\t</div>
\t\t{% else %}
\t\t\t{{ form_widget(form.modelInstallation, {'attr':{'class':'display_n'}}) }}
\t\t\t{{ form_widget(form.producerInstallation, {'attr':{'class':'display_n'}}) }}
\t\t\t{{ form_widget(form.supplierInstallation, {'attr':{'class':'display_n'}}) }}
\t\t{% endif %}
\t\t{# Attuale #}
\t\t{% if activityType.producerActualMandatory or activityType.supplierActualMandatory %}
\t\t\t{% if activityType.producerActualMandatory %}
\t\t\t\t<div class=\"row form-group\">
\t\t\t\t\t<div class=\"col-10 col-lg-11\">
\t\t\t\t\t\t<label class=\"form_label\">Attuale - Matricola produttore*</label>
\t\t\t\t\t\t<div {{ form_errors(form.producerActual) }}>
\t\t\t\t\t\t\t{{ form_widget(form.producerActual, {'attr':{'inputmode':'search', 'onKeyDown':'updateButtonSubmit()', 'onBlur':'onBlurManageBarcode(\"producer_actual\")'}}) }}
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
\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>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t{% else %}
\t\t\t\t{{ form_widget(form.producerActual, {'attr':{'class':'display_n'}}) }}
\t\t\t{% endif %}
\t\t\t{% if activityType.supplierActualMandatory %}
\t\t\t\t<div class=\"row form-group\">
\t\t\t\t\t<div class=\"col-10 col-lg-11\">
\t\t\t\t\t\t<label class=\"form_label\">Attuale - Matricola fornitore*</label>
\t\t\t\t\t\t<div {{ form_errors(form.supplierActual) }}>
\t\t\t\t\t\t\t{{ form_widget(form.supplierActual, {'attr':{'onKeyDown':'updateButtonSubmit()', 'onBlur':'onBlurManageBarcode(\"supplier_actual\")'}}) }}
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
\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>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t{% else %}
\t\t\t\t{{ form_widget(form.supplierActual, {'attr':{'class':'display_n'}}) }}
\t\t\t{% endif %}
\t\t\t<div class=\"row form-group\" id=\"row_model_actual\">
\t\t\t\t<div class=\"col-10 col-lg-11\">
\t\t\t\t\t<label class=\"form_label\">Attuale - Modello</label>
\t\t\t\t\t<div {{ form_errors(form.modelActual) }}>
\t\t\t\t\t\t{{ form_widget(form.modelActual, {'attr':{'readonly':true}} ) }}
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<div class=\"col-2 col-lg-1 txt_a_c\">
\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>
\t\t\t\t</div>
\t\t\t</div>
\t\t{% else %}
\t\t\t{{ form_widget(form.modelActual, {'attr':{'class':'display_n'}}) }}
\t\t\t{{ form_widget(form.producerActual, {'attr':{'class':'display_n'}}) }}
\t\t\t{{ form_widget(form.supplierActual, {'attr':{'class':'display_n'}}) }}
\t\t{% endif %}
\t\t<div class=\"row m_t_50p\">
\t\t\t<div class=\"col-12 txt_a_c\">
\t\t\t\t<a id=\"button_submit\" href=\"javascript: void()\" class=\"button button-3d button-small button-grey\">Inserisci</a>
\t\t\t</div>
\t\t</div>
\t\t{{ form_widget(form.productWithdrawId) }}
\t\t{{ form_widget(form.modelWithdrawId) }}
\t\t{{ form_widget(form.scanOrManualProducerWithdraw) }}
\t\t{{ form_widget(form.scanOrManualProducerWithdrawCode) }}
\t\t{{ form_widget(form.scanOrManualSupplierWithdraw) }}
\t\t{{ form_widget(form.scanOrManualSupplierWithdrawCode) }}
\t\t{{ form_widget(form.productActualId) }}
\t\t{{ form_widget(form.modelActualId) }}
\t\t{{ form_widget(form.scanOrManualProducerActual) }}
\t\t{{ form_widget(form.scanOrManualProducerActualCode) }}
\t\t{{ form_widget(form.scanOrManualSupplierActual) }}
\t\t{{ form_widget(form.scanOrManualSupplierActualCode) }}
\t\t{{ form_widget(form.productInstallationId) }}
\t\t{{ form_widget(form.scanOrManualProducerInstallation) }}
\t\t{{ form_widget(form.scanOrManualProducerInstallationCode) }}
\t\t{{ form_widget(form.scanOrManualSupplierInstallation) }}
\t\t{{ form_widget(form.scanOrManualSupplierInstallationCode) }}
\t\t
\t\t<input type=\"hidden\" name=\"activityTypeId\" value=\"{{ activityType.id }}\">
\t\t<input type=\"hidden\" name=\"ticketId\" value=\"{{ ticket.id }}\">
\t{{ form_end(form) }}
\t<div id=\"selectProductModal\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\">
\t\t<div class=\"modal-dialog modal-lg\" role=\"document\">
\t\t\t<div class=\"modal-content\">
\t\t\t\t<div class=\"modal-header\"><h3 class=\"modal-title\">Seleziona prodotto dal magazzino cliente</h3></div>
\t\t\t\t<div class=\"modal-body\">
\t\t\t\t\t<div class=\"row\">
\t\t\t\t\t\t<div class=\"col-12 overflow_a\">
\t\t\t\t\t\t\t<table id=\"table_products\" class=\"table table-sm responsive_font_size\">
\t\t\t\t\t\t\t\t<thead>
\t\t\t\t\t\t\t\t\t<tr>
\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>
\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t</thead>
\t\t\t\t\t\t\t\t<tbody id=\"tbody_products\">
\t\t\t\t\t\t\t\t</tbody>
\t\t\t\t\t\t\t</table>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<div class=\"modal-footer txt_a_c\">
\t\t\t\t\t<a href=\"javascript:void(0)\" class=\"button button-3d button-mini button-pr\" data-bs-dismiss=\"modal\">Chiudi</a>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
\t<div id=\"selectModelModal\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\">
\t\t<div class=\"modal-dialog modal-lg\" role=\"document\">
\t\t\t<div class=\"modal-content\">
\t\t\t\t<div class=\"modal-header\"><h3 class=\"modal-title\">Seleziona modello</h3></div>
\t\t\t\t<div class=\"modal-body\">
\t\t\t\t\t<div class=\"row\">
\t\t\t\t\t\t<div class=\"col-12 overflow_a\">
\t\t\t\t\t\t\t<table id=\"table_models\" class=\"table table-sm responsive_font_size\">
\t\t\t\t\t\t\t\t<thead>
\t\t\t\t\t\t\t\t\t<tr>
\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>
\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t\t<tr>
\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>
\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>
\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t</thead>
\t\t\t\t\t\t\t\t<tbody id=\"tbody_models\">
\t\t\t\t\t\t\t\t</tbody>
\t\t\t\t\t\t\t</table>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<div class=\"modal-footer txt_a_c\">
\t\t\t\t\t<a href=\"javascript:void(0)\" class=\"button button-3d button-mini button-pr\" data-bs-dismiss=\"modal\">Chiudi</a>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
\t<input type=\"hidden\" id=\"selected_type\">
\t<input type=\"hidden\" id=\"scanned_type\">
\t<div id=\"modalWarehouseOther\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\">
\t\t<div class=\"modal-dialog\" role=\"document\">
\t\t\t<div class=\"modal-content\">
\t\t\t\t<div class=\"modal-header\"><h3 class=\"modal-title\">Magazzino non corrispondente</h3></div>\t\t\t
\t\t\t\t<div class=\"modal-body\">
\t\t\t\t\t<input type=\"hidden\" id=\"move_product_id\">
\t\t\t\t\t<input type=\"hidden\" id=\"move_type\">
\t\t\t\t\t<div class=\"row\">
\t\t\t\t\t\t<div class=\"col-12 txt_a_c\">
\t\t\t\t\t\t\t<input type=\"hidden\" id=\"move_product_type\" />
\t\t\t\t\t\t\t<label class=\"modal_subtitle\">Attenzione!</label>
\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>
\t\t\t\t\t\t\t{% if app.user.accountTypology != \"technician\" %}
\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>
\t\t\t\t\t\t\t{% else %}
\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>
\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<div class=\"modal-footer\">
\t\t\t\t\t{% if app.user.accountTypology != \"technician\" %}
\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>
\t\t\t\t\t\t<a href=\"javascript:moveProduct()\" class=\"button button-3d button-mini button-green f_right\">Sposta</a>
\t\t\t\t\t{% else %}
\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>
\t\t\t\t\t{% endif %}
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
\t<div id=\"scanditReaderModal\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\">
\t\t<div class=\"modal-dialog modal-lg\" role=\"document\">
\t\t\t<div class=\"modal-content\">
\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>
\t\t\t\t<div class=\"modal-body\">
\t\t\t\t\t<input type=\"hidden\" id=\"scandit_reader_active\" value=\"0\">
\t\t\t\t\t<div id=\"data-capture-view\"></div>
\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>
\t\t\t\t</div>
\t\t\t\t<div class=\"modal-footer txt_a_c\">
\t\t\t\t\t<a href=\"javascript:void(0)\" class=\"button button-3d button-mini button-pr\" data-bs-dismiss=\"modal\">Chiudi</a>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
{% endblock %}
{% block javascripts %}
\t{{ parent() }}
\t{% include 'components/js/scandit_js.html.twig' with {'action':'intervention'} %}
\t{% if activityType.pos %}{% set posAccessory = \"POS\" %}{% else %}{% set posAccessory = \"Accessorio\" %}{% endif %}
\t<script>
\t\t\$(document).ready(function(){
\t\t\t{% if activityType.producerWithdrawMandatory or activityType.supplierWithdrawMandatory %}
\t\t\t\tshowWithdrawModelComponent(document.getElementById('form_intervention_activity_modelWithdrawId').value);
\t\t\t{% endif %}
\t\t\t{% if activityType.producerWithdrawMandatory == false and activityType.supplierWithdrawMandatory == false %}
\t\t\t\tupdateCanSubmitField(\"producer_withdraw\", 1);
\t\t\t{% endif %}
\t\t\t{% if activityType.producerActualMandatory == false and activityType.supplierActualMandatory == false %}
\t\t\t\tupdateCanSubmitField(\"producer_actual\", 1);
\t\t\t{% endif %}
\t\t\t{% if activityType.producerInstallationMandatory == false and activityType.supplierInstallationMandatory == false %}
\t\t\t\tupdateCanSubmitField(\"producer_installation\", 1);
\t\t\t{% endif %}
\t\t\tupdateButtonSubmit();
\t\t});
\t\t\t
\t\tdocument.body.addEventListener(\"keypress\", function(e) {
\t\t\tif(e.key == 'Enter' || e.key == 'Tab'){
\t\t\t\tswitch(document.activeElement.id){
\t\t\t\t\tcase 'form_intervention_activity_producerWithdraw': var type = 'producer_withdraw'; break;
\t\t\t\t\tcase 'form_intervention_activity_supplierWithdraw': var type = 'supplier_withdraw'; break;
\t\t\t\t\tcase 'form_intervention_activity_producerInstallation': var type = 'producer_installation'; break;
\t\t\t\t\tcase 'form_intervention_activity_supplierInstallation': var type = 'supplier_installation'; break;
\t\t\t\t\tcase 'form_intervention_activity_producerActual': var type = 'producer_actual'; break;
\t\t\t\t\tcase 'form_intervention_activity_supplierActual': var type = 'supplier_actual'; break;
\t\t\t\t\tdefault: break;
\t\t\t\t}
\t\t\t\tdocument.activeElement.blur();
\t\t\t}
\t\t});
\t\t
\t\tfunction openScanditModal(type, label){
\t\t\tdocument.getElementById('scanned_type').value = type;
\t\t\tdocument.getElementById('scandit_code_type').innerHTML = label;
\t\t\t\$('#scanditReaderModal').modal({backdrop: 'static', keyboard: false}).modal(\"show\");
\t\t}
\t\t
\t\tfunction closeModal(){
\t\t\tdocument.getElementById('scandit_reader_active').value = 0;
\t\t\t\$('#scanditReaderModal').modal('hide');
\t\t}
\t\t
\t\tfunction selectFromWarehouse(type){
\t\t\tvar typeVal = '';
\t\t\tdocument.getElementById('selected_type').value = type;
\t\t\tswitch(type){
\t\t\t\tcase 'actual': typeVal = 'Actual'; break;
\t\t\t\tcase 'withdraw': typeVal = 'Withdraw'; break;
\t\t\t\tdefault: break;
\t\t\t}
\t\t\tif(document.getElementById('form_intervention_activity_producer' + typeVal).value != '' || document.getElementById('form_intervention_activity_supplier' + typeVal).value != ''){
\t\t\t\tsearchModels();
\t\t\t\t\$('#selectModelModal').modal({backdrop: 'static', keyboard: false}).modal(\"show\");
\t\t\t}
\t\t\telse{
\t\t\t\tsearchProducts();
\t\t\t\t\$('#selectProductModal').modal({backdrop: 'static', keyboard: false}).modal(\"show\");
\t\t\t}\t\t
\t\t}
\t\tfunction updateSelectCodeModal(table){
\t\t\tif(table == 'models'){
\t\t\t\tsearchModels();
\t\t\t\t\$('#selectProductModal').modal('hide');
\t\t\t\t\$('#selectModelModal').modal({backdrop: 'static', keyboard: false}).modal(\"show\");
\t\t\t}
\t\t\telse{
\t\t\t\tsearchProducts();
\t\t\t\t\$('#selectModelModal').modal('hide');
\t\t\t\t\$('#selectProductModal').modal({backdrop: 'static', keyboard: false}).modal(\"show\");
\t\t\t}
\t\t}
\t\t{# PRODUCTS #}
\t\tfunction searchProducts(){
\t\t\tvar type = document.getElementById('selected_type').value;
\t\t\tvar filter = document.getElementById('filter_search_product').value;
\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){
\t\t\t\tif(response.code == 200 && response.success){
\t\t\t\t\tvar tbody = document.getElementById('tbody_products');
\t\t\t\t\ttbody.innerHTML = '';
\t\t\t\t\tvar products = JSON.parse(response.products);
\t\t\t\t\t
\t\t\t\t\tif(products.length > 0){
\t\t\t\t\t\tfor(i=0; i<products.length; i++){
\t\t\t\t\t\t\tvar tr = document.createElement('tr');
\t\t\t\t\t\t\tvar td = document.createElement('td');
\t\t\t\t\t\t\tvar tdSel = document.createElement('td');
\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>';
\t\t\t\t\t\t\ttdSel.className = 'td_action';
\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>';
\t\t\t\t\t\t\ttr.appendChild(td);
\t\t\t\t\t\t\ttr.appendChild(tdSel);
\t\t\t\t\t\t\ttbody.appendChild(tr);
\t\t\t\t\t\t}
\t\t\t\t\t}
\t\t\t\t\telse{
\t\t\t\t\t\tvar tr = document.createElement('tr');
\t\t\t\t\t\tvar td = document.createElement('td');
\t\t\t\t\t\ttd.setAttribute('colspan', '2');
\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>';
\t\t\t\t\t\ttr.appendChild(td);
\t\t\t\t\t\ttbody.appendChild(tr);
\t\t\t\t\t}
\t\t\t\t}
\t\t\t}, \"json\");
\t\t}
\t\tfunction selectProduct(productId){
\t\t\tif(document.getElementById('selected_type').value == 'withdraw'){
\t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdrawId').value = null;
\t\t\t\tdocument.getElementById('form_intervention_activity_productWithdrawId').value = productId;
\t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdraw').value = document.getElementById('model_' + productId).innerHTML;
\t\t\t\tdocument.getElementById('form_intervention_activity_producerWithdraw').value = document.getElementById('code_producer_' + productId).innerHTML;
\t\t\t\tdocument.getElementById('form_intervention_activity_supplierWithdraw').value = document.getElementById('code_supplier_' + productId).innerHTML;
\t\t\t}
\t\t\tif(document.getElementById('selected_type').value == 'installation'){
\t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallationId').value = null;
\t\t\t\tdocument.getElementById('form_intervention_activity_productInstallationId').value = productId;
\t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallation').value = document.getElementById('model_' + productId).innerHTML;
\t\t\t\tdocument.getElementById('form_intervention_activity_producerInstallation').value = document.getElementById('code_producer_' + productId).innerHTML;
\t\t\t\tdocument.getElementById('form_intervention_activity_supplierInstallation').value = document.getElementById('code_supplier_' + productId).innerHTML;
\t\t\t}
\t\t\tif(document.getElementById('selected_type').value == 'actual'){
\t\t\t\tdocument.getElementById('form_intervention_activity_modelActualId').value = null;
\t\t\t\tdocument.getElementById('form_intervention_activity_productActualId').value = productId;
\t\t\t\tdocument.getElementById('form_intervention_activity_modelActual').value = document.getElementById('model_' + productId).innerHTML;
\t\t\t\tdocument.getElementById('form_intervention_activity_producerActual').value = document.getElementById('code_producer_' + productId).innerHTML;
\t\t\t\tdocument.getElementById('form_intervention_activity_supplierActual').value = document.getElementById('code_supplier_' + productId).innerHTML;
\t\t\t}
\t\t\t\$('#selectProductModal').modal({backdrop: 'static', keyboard: false}).modal(\"hide\");
\t\t}
\t\t{# MODELS #}
\t\tfunction searchModels(){
\t\t\tvar filter = document.getElementById('filter_search_model').value;
\t\t\t\$.post('{{ path (\"user_ticket_intervention_activity_model_search\") }}', {interventionId: \"{{ intervention.id }}\", activityTypeId:\"{{ activityType.id }}\", isPos:\"{{ isPos }}\", filter: filter}, function(response){
\t\t\t\tif(response.code == 200 && response.success){
\t\t\t\t\tvar tbody = document.getElementById('tbody_models');
\t\t\t\t\ttbody.innerHTML = '';
\t\t\t\t\tvar models = JSON.parse(response.models);
\t\t\t\t\t
\t\t\t\t\tif(models.length > 0){
\t\t\t\t\t\tfor(i=0; i<models.length; i++){
\t\t\t\t\t\t\tvar tr = document.createElement('tr');
\t\t\t\t\t\t\tvar td = document.createElement('td');
\t\t\t\t\t\t\tvar tdName = document.createElement('td');
\t\t\t\t\t\t\tvar tdSel = document.createElement('td');
\t\t\t\t\t\t\t
\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>';
\t\t\t\t\t\t\ttdSel.className = 'td_action';
\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>';
\t\t\t\t\t\t\ttr.appendChild(td);
\t\t\t\t\t\t\ttr.appendChild(tdSel);
\t\t\t\t\t\t\ttbody.appendChild(tr);
\t\t\t\t\t\t}
\t\t\t\t\t}
\t\t\t\t\telse{
\t\t\t\t\t\tvar tr = document.createElement('tr');
\t\t\t\t\t\tvar td = document.createElement('td');
\t\t\t\t\t\ttd.setAttribute('colspan', '2');
\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.';
\t\t\t\t\t\ttr.appendChild(td);
\t\t\t\t\t\ttbody.appendChild(tr);
\t\t\t\t\t}
\t\t\t\t}
\t\t\t}, \"json\");
\t\t}
\t\tfunction selectModel(modelId){
\t\t\tif(document.getElementById('selected_type').value == 'withdraw'){
\t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdrawId').value = modelId;
\t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdraw').value = document.getElementById('name_' + modelId).innerHTML;
\t\t\t\tshowWithdrawModelComponent(modelId);
\t\t\t}
\t\t\tif(document.getElementById('selected_type').value == 'installation'){
\t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallationId').value = modelId;
\t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallation').value = document.getElementById('name_' + modelId).innerHTML;
\t\t\t}
\t\t\tif(document.getElementById('selected_type').value == 'actual'){
\t\t\t\tdocument.getElementById('form_intervention_activity_modelActualId').value = modelId;
\t\t\t\tdocument.getElementById('form_intervention_activity_modelActual').value = document.getElementById('name_' + modelId).innerHTML;
\t\t\t}
\t\t\t\$('#selectModelModal').modal({backdrop: 'static', keyboard: false}).modal(\"hide\");
\t\t}
\t\tfunction showWithdrawModelComponent(modelId){
\t\t\t\$.post('{{ path (\"user_ticket_intervention_activity_model_components\") }}', {activityTypeId: \"{{ activityType.id }}\", modelId: modelId}, function(response){
\t\t\t\tif(response.code == 200 && response.success){
\t\t\t\t\tvar components = JSON.parse(response.components);
\t\t\t\t\t
\t\t\t\t\tvar rowComponent = document.getElementById('row_component_withdraw');
\t\t\t\t\trowComponent.innerHTML = '';
\t\t\t\t\trowComponent.className = 'col-12 switch m_t_20p';
\t\t\t\t\tvar table = document.createElement('table');
\t\t\t\t\ttable.className = \"table b_none table_no_padding m_none\";
\t\t\t\t\tif(components.length == 0){
\t\t\t\t\t\tvar tr = document.createElement('tr');
\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>';
\t\t\t\t\t\ttable.appendChild(tr);
\t\t\t\t\t}
\t\t\t\t\telse{
\t\t\t\t\t\tvar label = document.createElement('label');
\t\t\t\t\t\tlabel.className = 'm_b_none l_s_none f_w_500';
\t\t\t\t\t\tlabel.innerHTML = 'Seleziona i componenti che hai ritirato insieme al prodotto/modello';
\t\t\t\t\t\tfor(i=0; i<components.length; i++){
\t\t\t\t\t\t\tvar tr = document.createElement('tr');
\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>';
\t\t\t\t\t\t\ttable.appendChild(tr);
\t\t\t\t\t\t}
\t\t\t\t\t\trowComponent.appendChild(label);
\t\t\t\t\t}
\t\t\t\t\trowComponent.appendChild(table);
\t\t\t\t\trowComponent.style.display = 'block';
\t\t\t\t}
\t\t\t}, \"json\");
\t\t}
\t\t
\t\tfunction onBlurManageBarcode(type){
\t\t\tdocument.getElementById(\"move_type\").value = type;
\t\t\tswitch(type){
\t\t\t\tcase 'producer_withdraw':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"withdraw\";
\t\t\t\t\tvar codeTypeLabel = \"produttore\";
\t\t\t\t\tvar code = document.getElementById('form_intervention_activity_producerWithdraw').value;
\t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualProducerWithdrawCode').value != code){
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerWithdrawCode').value = code;
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerWithdraw').value = 'manual';
\t\t\t\t\t}
\t\t\t\t\tbreak;
\t\t\t\tcase 'supplier_withdraw':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"withdraw\";
\t\t\t\t\tvar codeTypeLabel = \"fornitore\";
\t\t\t\t\tvar code = document.getElementById('form_intervention_activity_supplierWithdraw').value;
\t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualSupplierWithdrawCode').value != code){
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierWithdrawCode').value = code;
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierWithdraw').value = 'manual';
\t\t\t\t\t}
\t\t\t\t\tbreak;
\t\t\t\tcase 'producer_installation':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"installation\";
\t\t\t\t\tvar codeTypeLabel = \"produttore\";
\t\t\t\t\tvar code = document.getElementById('form_intervention_activity_producerInstallation').value;
\t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualProducerInstallationCode').value != code){
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerInstallationCode').value = code;
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerInstallation').value = 'manual';
\t\t\t\t\t}
\t\t\t\t\tbreak;
\t\t\t\tcase 'supplier_installation':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"installation\";
\t\t\t\t\tvar codeTypeLabel = \"fornitore\";
\t\t\t\t\tvar code = document.getElementById('form_intervention_activity_supplierInstallation').value;
\t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualSupplierInstallationCode').value != code){
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierInstallationCode').value = code;
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierInstallation').value = 'manual';
\t\t\t\t\t}
\t\t\t\t\tbreak;
\t\t\t\tcase 'producer_actual':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"actual\";
\t\t\t\t\tvar codeTypeLabel = \"produttore\";
\t\t\t\t\tvar code = document.getElementById('form_intervention_activity_producerActual').value;
\t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualProducerActualCode').value != code){
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerActualCode').value = code;
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerActual').value = 'manual';
\t\t\t\t\t}
\t\t\t\t\tbreak;
\t\t\t\tcase 'supplier_actual':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"actual\";
\t\t\t\t\tvar codeTypeLabel = \"fornitore\";
\t\t\t\t\tvar code = document.getElementById('form_intervention_activity_supplierActual').value;
\t\t\t\t\tif(document.getElementById('form_intervention_activity_scanOrManualSupplierActualCode').value != code){
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierActualCode').value = code;
\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierActual').value = 'manual';
\t\t\t\t\t}
\t\t\t\t\tbreak;
\t\t\t\tdefault: break;
\t\t\t}
\t\t\tcheckCodePost(type, code, codeTypeLabel);
\t\t}
\t\tfunction manageBarcode(code){
\t\t\tvar type = document.getElementById('scanned_type').value;
\t\t\tswitch(type){
\t\t\t\tcase 'producer_withdraw':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"withdraw\";
\t\t\t\t\tvar codeTypeLabel = \"produttore\";
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerWithdrawCode').value = code;
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerWithdraw').value = 'scan';
\t\t\t\t\tbreak;
\t\t\t\tcase 'supplier_withdraw':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"withdraw\";
\t\t\t\t\tvar codeTypeLabel = \"fornitore\";
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierWithdrawCode').value = code;
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierWithdraw').value = 'scan';
\t\t\t\t\tbreak;
\t\t\t\tcase 'producer_installation':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"installation\";
\t\t\t\t\tvar codeTypeLabel = \"produttore\";
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerInstallationCode').value = code;
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerInstallation').value = 'scan';
\t\t\t\t\tbreak;
\t\t\t\tcase 'supplier_installation':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"installation\";
\t\t\t\t\tvar codeTypeLabel = \"fornitore\";
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierInstallationCode').value = code;
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierInstallation').value = 'scan';
\t\t\t\t\tbreak;
\t\t\t\tcase 'producer_actual':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"actual\";
\t\t\t\t\tvar codeTypeLabel = \"produttore\";
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerActualCode').value = code;
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualProducerActual').value = 'scan';
\t\t\t\t\tbreak;
\t\t\t\tcase 'supplier_actual':
\t\t\t\t\tdocument.getElementById(\"move_product_type\").value = \"actual\";
\t\t\t\t\tvar codeTypeLabel = \"fornitore\";
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierActualCode').value = code;
\t\t\t\t\tdocument.getElementById('form_intervention_activity_scanOrManualSupplierActual').value = 'scan';
\t\t\t\t\tbreak;
\t\t\t\tdefault: break;
\t\t\t}
\t\t\tcheckCodePost(type, code, codeTypeLabel);
\t\t}
\t\t
\t\tfunction checkCodePost(type, code, codeTypeLabel){
\t\t\tvar code = code.toUpperCase();
\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){
\t\t\t\tvar response = JSON.parse(response);
\t\t\t\tvar canSubmit = false;
\t\t\t\tif(response.code == 200 && response.success)
\t\t\t\t{
\t\t\t\t\tif(response.found){
\t\t\t\t\t\t// Se trovato prodotto
\t\t\t\t\t\tvar product = JSON.parse(response.product);
\t\t\t\t\t\tif(product.posAccessoryOk){
\t\t\t\t\t\t\t// Se POS o Accessorio coerente con il tipo di attività
\t\t\t\t\t\t\tif(product.supplierOk){
\t\t\t\t\t\t\t\t// Se il fornitore è tra quelli del prodotto
\t\t\t\t\t\t\t\tif(product.otherWarehouse == 1){
\t\t\t\t\t\t\t\t\t// Se non è nel magazzino corretto
\t\t\t\t\t\t\t\t\tif(product.canMove == 1){
\t\t\t\t\t\t\t\t\t\tdocument.getElementById('move_product_id').value = product.id;
\t\t\t\t\t\t\t\t\t\tdocument.getElementById('move_warehouse_nickname').innerHTML = product.otherWarehouseNickname;
\t\t\t\t\t\t\t\t\t\t\$('#modalWarehouseOther').modal({backdrop: 'static', keyboard: false}).modal('show');
\t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\telse{
\t\t\t\t\t\t\t\t\t\t// Se installazione e non posso muovere
\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!\");
\t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\telse{
\t\t\t\t\t\t\t\t\t// Se in magazzino corretto
\t\t\t\t\t\t\t\t\tswitch(type){
\t\t\t\t\t\t\t\t\t\tcase 'producer_withdraw':
\t\t\t\t\t\t\t\t\t\tcase 'supplier_withdraw':
\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_productWithdrawId').value = product.id;
\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdraw').value = product.model;
\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerWithdraw').value = product.codeProducer;
\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierWithdraw').value = product.codeSupplier;
\t\t\t\t\t\t\t\t\t\t\tshowWithdrawModelComponent(product.model.id);
\t\t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
\t\t\t\t\t\t\t\t\t\t\tbreak;
\t\t\t\t\t\t\t\t\t\tcase 'producer_installation':
\t\t\t\t\t\t\t\t\t\tcase 'supplier_installation':
\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
\t\t\t\t\t\t\t\t\t\t\tif(product.canMove == 1){
\t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_productInstallationId').value = product.id;
\t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallation').value = product.model;
\t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerInstallation').value = product.codeProducer;
\t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierInstallation').value = product.codeSupplier;
\t\t\t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
\t\t\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\t\t\telse{
\t\t\t\t\t\t\t\t\t\t\t\t// Se installazione e non posso muovere
\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!\");
\t\t\t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
\t\t\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\t\t\tbreak;
\t\t\t\t\t\t\t\t\t\tcase 'producer_actual':
\t\t\t\t\t\t\t\t\t\tcase 'supplier_actual':
\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_productActualId').value = product.id;
\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelActual').value = product.model;
\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerActual').value = product.codeProducer;
\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierActual').value = product.codeSupplier;
\t\t\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
\t\t\t\t\t\t\t\t\t\t\tbreak;
\t\t\t\t\t\t\t\t\t\tdefault: break;
\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t}
\t\t\t\t\t\t\telse{
\t\t\t\t\t\t\t\t// Se fornitore ticket non è tra i fornitori prodotto
\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 }}!\");
\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
\t\t\t\t\t\t\t}
\t\t\t\t\t\t}
\t\t\t\t\t\telse{
\t\t\t\t\t\t\t// Se POS o Accessorio non coerente con l'attività
\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 }}!\");
\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
\t\t\t\t\t\t}
\t\t\t\t\t}
\t\t\t\t\telse{
\t\t\t\t\t\t// Se non ho trovato prodotto
\t\t\t\t\t\tif(code != ''){
\t\t\t\t\t\t\tswitch(type){
\t\t\t\t\t\t\t\tcase 'producer_withdraw':
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerWithdraw').value = code;
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdraw').value = '';
\t\t\t\t\t\t\t\t\tdocument.getElementById('row_component_withdraw').className = 'col-12';
\t\t\t\t\t\t\t\t\tdocument.getElementById('row_component_withdraw').innerHTML = '';
\t\t\t\t\t\t\t\t\tprintAlertInfo(\"Il codice \" + codeTypeLabel + \" è utilizzabile, seleziona il modello prima di proseguire!\");
\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
\t\t\t\t\t\t\t\t\tbreak;
\t\t\t\t\t\t\t\tcase 'supplier_withdraw':
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierWithdraw').value = code;
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelWithdraw').value = '';
\t\t\t\t\t\t\t\t\tdocument.getElementById('row_component_withdraw').className = 'col-12';
\t\t\t\t\t\t\t\t\tdocument.getElementById('row_component_withdraw').innerHTML = '';
\t\t\t\t\t\t\t\t\tprintAlertInfo(\"Il codice \" + codeTypeLabel + \" è utilizzabile, seleziona il modello prima di proseguire!\");
\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
\t\t\t\t\t\t\t\t\tbreak;
\t\t\t\t\t\t\t\tcase 'producer_installation':
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerInstallation').value = code;
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallation').value = '';
\t\t\t\t\t\t\t\t\tprintAlertWarning(\"Nessun prodotto trovato con codice \" + codeTypeLabel + \" nel magazzino tecnico!\");
\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
\t\t\t\t\t\t\t\t\tbreak;
\t\t\t\t\t\t\t\tcase 'supplier_installation':
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierInstallation').value = code;
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelInstallation').value = '';
\t\t\t\t\t\t\t\t\tprintAlertWarning(\"Nessun prodotto trovato con codice \" + codeTypeLabel + \" nel magazzino tecnico!\");
\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 0);
\t\t\t\t\t\t\t\t\tbreak;
\t\t\t\t\t\t\t\tcase 'producer_actual':
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_producerActual').value = code;
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelActual').value = '';
\t\t\t\t\t\t\t\t\tprintAlertInfo(\"Il codice \" + codeTypeLabel + \" è utilizzabile, seleziona il modello prima di proseguire!\");
\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
\t\t\t\t\t\t\t\t\tbreak;
\t\t\t\t\t\t\t\tcase 'supplier_actual':
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_supplierActual').value = code;
\t\t\t\t\t\t\t\t\tdocument.getElementById('form_intervention_activity_modelActual').value = '';
\t\t\t\t\t\t\t\t\tprintAlertInfo(\"Il codice \" + codeTypeLabel + \" è utilizzabile, seleziona il modello prima di proseguire!\");
\t\t\t\t\t\t\t\t\tupdateCanSubmitField(type, 1);
\t\t\t\t\t\t\t\t\tbreak;
\t\t\t\t\t\t\t\tdefault: break;
\t\t\t\t\t\t\t}
\t\t\t\t\t\t}
\t\t\t\t\t}
\t\t\t\t}
\t\t\t\tcloseModal();
\t\t\t\tupdateButtonSubmit();
\t\t\t});
\t\t}
\t\tfunction showClientWarehouse(){
\t\t\tif(document.getElementById(\"clientWarehouse\").style.display == \"block\")
\t\t\t\tdocument.getElementById(\"clientWarehouse\").style.display = \"none\";
\t\t\telse
\t\t\t\tdocument.getElementById(\"clientWarehouse\").style.display = \"block\";
\t\t}
\t\tfunction moveProduct(){
\t\t\tvar productId = document.getElementById('move_product_id').value;
\t\t\tvar type = document.getElementById(\"move_product_type\").value;
\t\t\t\$.post('{{ path (\"user_ticket_intervention_activity_move_product\", {\"interventionId\": intervention.id }) }}', {productId:productId, type: type}, function(response){
\t\t\t\tif(response.code == 200 && response.success){
\t\t\t\t\tprintAlertSuccess('Prodotto spostato correttamente!');
\t\t\t\t\t\$('#modalWarehouseOther').modal('hide');
\t\t\t\t\tonBlurManageBarcode(document.getElementById(\"move_type\").value);
\t\t\t\t}
\t\t\t}, \"json\");
\t\t}
\t\tfunction submitForm(){
\t\t\ttriggerLoading();
\t\t\t\$('#form').submit();
\t\t}
\t\tfunction updateCanSubmitField(type, value){
\t\t\tswitch(type){
\t\t\t\tcase 'producer_withdraw':
\t\t\t\tcase 'supplier_withdraw':
\t\t\t\t\tdocument.getElementById('can_submit_withdraw').value = value;
\t\t\t\t\tbreak;
\t\t\t\tcase 'producer_installation':
\t\t\t\tcase 'supplier_installation':
\t\t\t\t\tdocument.getElementById('can_submit_installation').value = value;
\t\t\t\t\tbreak;
\t\t\t\tcase 'producer_actual':
\t\t\t\tcase 'supplier_actual':
\t\t\t\t\tdocument.getElementById('can_submit_actual').value = value;
\t\t\t\t\tbreak;
\t\t\t\tdefault: break;
\t\t\t}
\t\t}
\t\tfunction updateButtonSubmit(){
\t\t\tvar csW = document.getElementById('can_submit_withdraw').value;
\t\t\tvar csA = document.getElementById('can_submit_actual').value;
\t\t\tvar csI = document.getElementById('can_submit_installation').value;
\t\t\tvar buttonSubmit = document.getElementById('button_submit');
\t\t\tif(csW == 1 && csA == 1 && csI == 1){
\t\t\t\tbuttonSubmit.className = \"button button-3d button-small button-green\";
\t\t\t\tbuttonSubmit.href = \"javascript: submitForm()\";
\t\t\t}
\t\t\telse{
\t\t\t\tbuttonSubmit.className = \"button button-3d button-small button-grey\";
\t\t\t\tbuttonSubmit.href = \"javascript: void()\";
\t\t\t}
\t\t}
\t</script>
{% endblock %}", "role/user/ticket/intervention/activity/single.html.twig", "/var/www/vhosts/eposmanager.software/templates/role/user/ticket/intervention/activity/single.html.twig");
}
}