<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;

/* extension/report/sale_order_info.twig */
class __TwigTemplate_9297eed576f68186afa6765a50c58b95 extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 1
        echo "<div class=\"row\">
  <div id=\"filter-report\" class=\"col-md-3 col-md-push-9 col-sm-12 hidden-sm hidden-xs\">
    <div class=\"panel panel-default\">
      <div class=\"panel-heading\">
        <h3 class=\"panel-title\"><i class=\"fa fa-filter\"></i> ";
        // line 5
        echo ($context["text_filter"] ?? null);
        echo "</h3>
      </div>
      <div class=\"panel-body\">
        <div class=\"form-group\">
          <label class=\"control-label\" for=\"input-date-start\">";
        // line 9
        echo ($context["entry_date_start"] ?? null);
        echo "</label>
          <div class=\"input-group date\">
            <input type=\"text\" name=\"filter_date_start\" value=\"";
        // line 11
        echo ($context["filter_date_start"] ?? null);
        echo "\" placeholder=\"";
        echo ($context["entry_date_start"] ?? null);
        echo "\" data-date-format=\"YYYY-MM-DD\" id=\"input-date-start\" class=\"form-control\" />
            <span class=\"input-group-btn\">
            <button type=\"button\" class=\"btn btn-default\"><i class=\"fa fa-calendar\"></i></button>
            </span>
          </div>
        </div>
        <div class=\"form-group\">
          <label class=\"control-label\" for=\"input-date-end\">";
        // line 18
        echo ($context["entry_date_end"] ?? null);
        echo "</label>
          <div class=\"input-group date\">
            <input type=\"text\" name=\"filter_date_end\" value=\"";
        // line 20
        echo ($context["filter_date_end"] ?? null);
        echo "\" placeholder=\"";
        echo ($context["entry_date_end"] ?? null);
        echo "\" data-date-format=\"YYYY-MM-DD\" id=\"input-date-end\" class=\"form-control\" />
            <span class=\"input-group-btn\">
            <button type=\"button\" class=\"btn btn-default\"><i class=\"fa fa-calendar\"></i></button>
            </span>
          </div>
        </div>
        <div class=\"form-group\">
          <label class=\"control-label\" for=\"input-group\">";
        // line 27
        echo ($context["entry_group"] ?? null);
        echo "</label>
          <select name=\"filter_group\" id=\"input-group\" class=\"form-control\">
                  ";
        // line 29
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["groups"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["group"]) {
            // line 30
            echo "                  ";
            if ((twig_get_attribute($this->env, $this->source, $context["group"], "value", [], "any", false, false, false, 30) == ($context["filter_group"] ?? null))) {
                // line 31
                echo "            \t  <option value=\"";
                echo twig_get_attribute($this->env, $this->source, $context["group"], "value", [], "any", false, false, false, 31);
                echo "\" selected=\"selected\">";
                echo twig_get_attribute($this->env, $this->source, $context["group"], "text", [], "any", false, false, false, 31);
                echo "</option>
                  ";
            } else {
                // line 33
                echo "            \t  <option value=\"";
                echo twig_get_attribute($this->env, $this->source, $context["group"], "value", [], "any", false, false, false, 33);
                echo "\">";
                echo twig_get_attribute($this->env, $this->source, $context["group"], "text", [], "any", false, false, false, 33);
                echo "</option>
                  ";
            }
            // line 35
            echo "                  ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['group'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 36
        echo "          </select>
        </div>
        <div class=\"form-group\">
          <label class=\"control-label\" for=\"input-status\">";
        // line 39
        echo ($context["entry_status"] ?? null);
        echo "</label>
          <select name=\"filter_order_status_id\" id=\"input-status\" class=\"form-control\">
            <option value=\"0\">";
        // line 41
        echo ($context["text_all_status"] ?? null);
        echo "</option>
                  ";
        // line 42
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["order_statuses"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["order_status"]) {
            // line 43
            echo "                  ";
            if ((twig_get_attribute($this->env, $this->source, $context["order_status"], "order_status_id", [], "any", false, false, false, 43) == ($context["filter_order_status_id"] ?? null))) {
                // line 44
                echo "            \t  <option value=\"";
                echo twig_get_attribute($this->env, $this->source, $context["order_status"], "order_status_id", [], "any", false, false, false, 44);
                echo "\" selected=\"selected\">";
                echo twig_get_attribute($this->env, $this->source, $context["order_status"], "name", [], "any", false, false, false, 44);
                echo "</option>
                  ";
            } else {
                // line 46
                echo "            \t  <option value=\"";
                echo twig_get_attribute($this->env, $this->source, $context["order_status"], "order_status_id", [], "any", false, false, false, 46);
                echo "\">";
                echo twig_get_attribute($this->env, $this->source, $context["order_status"], "name", [], "any", false, false, false, 46);
                echo "</option>
                  ";
            }
            // line 48
            echo "                  ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['order_status'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 49
        echo "          </select>
        </div>
        <div class=\"form-group text-right\">
          <button type=\"button\" id=\"button-filter\" class=\"btn btn-default\"><i class=\"fa fa-filter\"></i> ";
        // line 52
        echo ($context["button_filter"] ?? null);
        echo "</button>
        </div>
      </div>
    </div>
  </div>
  <div class=\"col-md-9 col-md-pull-3 col-sm-12\">
    <div class=\"panel panel-default\">
      <div class=\"panel-heading\">
        <h3 class=\"panel-title\"><i class=\"fa fa-bar-chart\"></i> ";
        // line 60
        echo ($context["heading_title"] ?? null);
        echo "</h3>
      </div>
      <div class=\"panel-body\">
        <div class=\"table-responsive\">
          <table class=\"table table-bordered\">
            <thead>
              <tr>
                <td class=\"text-left\">";
        // line 67
        echo ($context["column_date_start"] ?? null);
        echo "</td>
                <td class=\"text-left\">";
        // line 68
        echo ($context["column_date_end"] ?? null);
        echo "</td>
                <td class=\"text-right\">";
        // line 69
        echo ($context["column_orders"] ?? null);
        echo "</td>
                <td class=\"text-right\">";
        // line 70
        echo ($context["column_products"] ?? null);
        echo "</td>
                <td class=\"text-right\">";
        // line 71
        echo ($context["column_tax"] ?? null);
        echo "</td>
                <td class=\"text-right\">";
        // line 72
        echo ($context["column_total"] ?? null);
        echo "</td>
              </tr>
            </thead>
            <tbody>
            
            ";
        // line 77
        if (($context["orders"] ?? null)) {
            // line 78
            echo "            ";
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["orders"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["order"]) {
                // line 79
                echo "            <tr>
              <td class=\"text-left\">";
                // line 80
                echo twig_get_attribute($this->env, $this->source, $context["order"], "date_start", [], "any", false, false, false, 80);
                echo "</td>
              <td class=\"text-left\">";
                // line 81
                echo twig_get_attribute($this->env, $this->source, $context["order"], "date_end", [], "any", false, false, false, 81);
                echo "</td>
              <td class=\"text-right\">";
                // line 82
                echo twig_get_attribute($this->env, $this->source, $context["order"], "orders", [], "any", false, false, false, 82);
                echo "</td>
              <td class=\"text-right\">";
                // line 83
                echo twig_get_attribute($this->env, $this->source, $context["order"], "products", [], "any", false, false, false, 83);
                echo "</td>
              <td class=\"text-right\">";
                // line 84
                echo twig_get_attribute($this->env, $this->source, $context["order"], "tax", [], "any", false, false, false, 84);
                echo "</td>
              <td class=\"text-right\">";
                // line 85
                echo twig_get_attribute($this->env, $this->source, $context["order"], "total", [], "any", false, false, false, 85);
                echo "</td>
            </tr>
            ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['order'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 88
            echo "            ";
        } else {
            // line 89
            echo "            <tr>
              <td class=\"text-center\" colspan=\"6\">";
            // line 90
            echo ($context["text_no_results"] ?? null);
            echo "</td>
            </tr>
            ";
        }
        // line 93
        echo "            </tbody>
            
          </table>
        </div>
        <div class=\"row\">
          <div class=\"col-sm-6 text-left\">";
        // line 98
        echo ($context["pagination"] ?? null);
        echo "</div>
          <div class=\"col-sm-6 text-right\">";
        // line 99
        echo ($context["results"] ?? null);
        echo "</div>
        </div>
      </div>
    </div>
  </div>
</div>
<script type=\"text/javascript\"><!--
\$('#button-filter').on('click', function() {
\tvar url = '';
\t
\tvar filter_date_start = \$('input[name=\\'filter_date_start\\']').val();
\t
\tif (filter_date_start) {
\t\turl += '&filter_date_start=' + encodeURIComponent(filter_date_start);
\t}

\tvar filter_date_end = \$('input[name=\\'filter_date_end\\']').val();
\t
\tif (filter_date_end) {
\t\turl += '&filter_date_end=' + encodeURIComponent(filter_date_end);
\t}
\t\t
\tvar filter_group = \$('select[name=\\'filter_group\\']').val();
\t
\tif (filter_group) {
\t\turl += '&filter_group=' + encodeURIComponent(filter_group);
\t}
\t
\tvar filter_order_status_id = \$('select[name=\\'filter_order_status_id\\']').val();
\t
\tif (filter_order_status_id != 0) {
\t\turl += '&filter_order_status_id=' + encodeURIComponent(filter_order_status_id);
\t}\t

\tlocation = 'index.php?route=report/report&code=sale_order&user_token=";
        // line 133
        echo ($context["user_token"] ?? null);
        echo "' + url;
});
//--></script> 
<script type=\"text/javascript\"><!--
\$('.date').datetimepicker({
\tlanguage: '";
        // line 138
        echo ($context["datepicker"] ?? null);
        echo "',
\tpickTime: false
});
//--></script>
";
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName()
    {
        return "extension/report/sale_order_info.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable()
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  322 => 138,  314 => 133,  277 => 99,  273 => 98,  266 => 93,  260 => 90,  257 => 89,  254 => 88,  245 => 85,  241 => 84,  237 => 83,  233 => 82,  229 => 81,  225 => 80,  222 => 79,  217 => 78,  215 => 77,  207 => 72,  203 => 71,  199 => 70,  195 => 69,  191 => 68,  187 => 67,  177 => 60,  166 => 52,  161 => 49,  155 => 48,  147 => 46,  139 => 44,  136 => 43,  132 => 42,  128 => 41,  123 => 39,  118 => 36,  112 => 35,  104 => 33,  96 => 31,  93 => 30,  89 => 29,  84 => 27,  72 => 20,  67 => 18,  55 => 11,  50 => 9,  43 => 5,  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "extension/report/sale_order_info.twig", "");
    }
}
