<?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;

/* invoice/listing.html.twig */
class __TwigTemplate_84dc5b25938f4d8ffc75e3361852d4e8bc9cdf86198fe86d81761689eb532ad8 extends Template
{
    private $source;
    private $macros = [];

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

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

        $this->blocks = [
            'page_title' => [$this, 'block_page_title'],
            'page_actions' => [$this, 'block_page_actions'],
            'main_before' => [$this, 'block_main_before'],
            'main' => [$this, 'block_main'],
            'javascripts' => [$this, 'block_javascripts'],
        ];
    }

    protected function doGetParent(array $context)
    {
        // line 1
        return "base.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 2
        $macros["widgets"] = $this->macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "invoice/listing.html.twig", 2)->unwrap();
        // line 3
        $macros["toolbar"] = $this->macros["toolbar"] = $this->loadTemplate("macros/toolbar.html.twig", "invoice/listing.html.twig", 3)->unwrap();
        // line 4
        $macros["tables"] = $this->macros["tables"] = $this->loadTemplate("macros/datatables.html.twig", "invoice/listing.html.twig", 4)->unwrap();
        // line 5
        $macros["actions"] = $this->macros["actions"] = $this->loadTemplate("invoice/actions.html.twig", "invoice/listing.html.twig", 5)->unwrap();
        // line 6
        $macros["macros"] = $this->macros["macros"] = $this->loadTemplate("invoice/macros.html.twig", "invoice/listing.html.twig", 6)->unwrap();
        // line 8
        $context["columns"] = ["date" => ["class" => "alwaysVisible text-nowrap", "orderBy" => false], "user" => ["class" => "hidden-xs hidden-sm text-nowrap hidden", "orderBy" => false], "customer" => ["class" => "hidden-xs hidden-sm text-nowrap", "orderBy" => false], "invoice_number" => ["class" => "hidden-xs hidden-sm text-nowrap", "title" => $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("invoice.number"), "orderBy" => false], "due_date" => ["class" => "hidden-xs text-nowrap", "title" => $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("invoice.due_days"), "orderBy" => false], "status" => ["class" => "text-center alwaysVisible text-nowrap", "orderBy" => false], "tax" => ["class" => "hidden-xs text-center text-nowrap hidden", "title" => $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("invoice.tax"), "orderBy" => false], "total_rate" => ["class" => "hidden-xs text-center text-nowrap", "orderBy" => false], "actions" => ["class" => "actions alwaysVisible", "orderBy" => false]];
        // line 20
        $context["tableName"] = "invoices";
        // line 1
        $this->parent = $this->loadTemplate("base.html.twig", "invoice/listing.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 22
    public function block_page_title($context, array $blocks = [])
    {
        $macros = $this->macros;
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("invoice.title"), "html", null, true);
    }

    // line 23
    public function block_page_actions($context, array $blocks = [])
    {
        $macros = $this->macros;
        echo twig_call_macro($macros["actions"], "macro_invoice_listing", ["index"], 23, $context, $this->getSourceContext());
    }

    // line 25
    public function block_main_before($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 26
        echo "    ";
        echo twig_call_macro($macros["tables"], "macro_data_table_column_modal", [($context["tableName"] ?? null), ($context["columns"] ?? null)], 26, $context, $this->getSourceContext());
        echo "
";
    }

    // line 29
    public function block_main($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 30
        echo "
    ";
        // line 31
        if (twig_test_empty(($context["entries"] ?? null))) {
            // line 32
            echo "        ";
            echo twig_call_macro($macros["widgets"], "macro_nothing_found", [], 32, $context, $this->getSourceContext());
            echo "
    ";
        } else {
            // line 34
            echo "        ";
            echo twig_call_macro($macros["tables"], "macro_datatable_header", [($context["tableName"] ?? null), ($context["columns"] ?? null), ($context["query"] ?? null), []], 34, $context, $this->getSourceContext());
            echo "
        ";
            // line 35
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["entries"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["entry"]) {
                // line 36
                echo "            <tr class=\"alternative-link open-edit\" data-href=\"";
                echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_invoice_download", ["id" => twig_get_attribute($this->env, $this->source, $context["entry"], "id", [], "any", false, false, false, 36)]), "html", null, true);
                echo "\">
                <td class=\"";
                // line 37
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "date"], 37, $context, $this->getSourceContext());
                echo "\">";
                echo twig_escape_filter($this->env, $this->extensions['App\Twig\DateExtensions']->dateShort(twig_get_attribute($this->env, $this->source, $context["entry"], "createdAt", [], "any", false, false, false, 37)), "html", null, true);
                echo "</td>
                <td class=\"";
                // line 38
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "user"], 38, $context, $this->getSourceContext());
                echo "\">";
                echo twig_call_macro($macros["widgets"], "macro_user_avatar", [twig_get_attribute($this->env, $this->source, $context["entry"], "user", [], "any", false, false, false, 38)], 38, $context, $this->getSourceContext());
                echo " ";
                echo twig_call_macro($macros["widgets"], "macro_username", [twig_get_attribute($this->env, $this->source, $context["entry"], "user", [], "any", false, false, false, 38)], 38, $context, $this->getSourceContext());
                echo "</td>
                <td class=\"";
                // line 39
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "customer"], 39, $context, $this->getSourceContext());
                echo "\">";
                echo twig_call_macro($macros["widgets"], "macro_label_customer", [twig_get_attribute($this->env, $this->source, $context["entry"], "customer", [], "any", false, false, false, 39)], 39, $context, $this->getSourceContext());
                echo "</td>
                <td class=\"";
                // line 40
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "invoice_number"], 40, $context, $this->getSourceContext());
                echo "\">";
                echo twig_call_macro($macros["widgets"], "macro_label", [twig_get_attribute($this->env, $this->source, $context["entry"], "invoiceNumber", [], "any", false, false, false, 40), "default"], 40, $context, $this->getSourceContext());
                echo "</td>
                <td class=\"";
                // line 41
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "due_date"], 41, $context, $this->getSourceContext());
                echo "\">";
                echo twig_call_macro($macros["macros"], "macro_invoice_due_date", [$context["entry"]], 41, $context, $this->getSourceContext());
                echo "</td>
                <td class=\"";
                // line 42
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "status"], 42, $context, $this->getSourceContext());
                echo "\">";
                echo twig_call_macro($macros["macros"], "macro_invoice_status", [$context["entry"]], 42, $context, $this->getSourceContext());
                echo "</td>
                <td class=\"";
                // line 43
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "tax"], 43, $context, $this->getSourceContext());
                echo "\">";
                echo twig_escape_filter($this->env, $this->extensions['App\Twig\LocaleExtensions']->money(twig_get_attribute($this->env, $this->source, $context["entry"], "tax", [], "any", false, false, false, 43), twig_get_attribute($this->env, $this->source, $context["entry"], "currency", [], "any", false, false, false, 43)), "html", null, true);
                echo "</td>
                <td class=\"";
                // line 44
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "total_rate"], 44, $context, $this->getSourceContext());
                echo "\">";
                echo twig_escape_filter($this->env, $this->extensions['App\Twig\LocaleExtensions']->money(twig_get_attribute($this->env, $this->source, $context["entry"], "total", [], "any", false, false, false, 44), twig_get_attribute($this->env, $this->source, $context["entry"], "currency", [], "any", false, false, false, 44)), "html", null, true);
                echo "</td>
                <td class=\"";
                // line 45
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "actions"], 45, $context, $this->getSourceContext());
                echo "\">";
                echo twig_call_macro($macros["actions"], "macro_invoice", [$context["entry"], "index"], 45, $context, $this->getSourceContext());
                echo "</td>
            </tr>
        ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['entry'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 48
            echo "        ";
            echo twig_call_macro($macros["tables"], "macro_data_table_footer", [($context["entries"] ?? null), "admin_invoice_list"], 48, $context, $this->getSourceContext());
            echo "
    ";
        }
        // line 50
        echo "
";
    }

    // line 53
    public function block_javascripts($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 54
        echo "    ";
        $this->displayParentBlock("javascripts", $context, $blocks);
        echo "
    ";
        // line 55
        if ( !(null === ($context["download"] ?? null))) {
            // line 56
            echo "    <script type=\"text/javascript\">
        document.addEventListener('kimai.initialized', function() {
            location.href = '";
            // line 58
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_invoice_download", ["id" => twig_get_attribute($this->env, $this->source, ($context["download"] ?? null), "id", [], "any", false, false, false, 58)]), "html", null, true);
            echo "';
        });
    </script>
    ";
        }
    }

    public function getTemplateName()
    {
        return "invoice/listing.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  206 => 58,  202 => 56,  200 => 55,  195 => 54,  191 => 53,  186 => 50,  180 => 48,  169 => 45,  163 => 44,  157 => 43,  151 => 42,  145 => 41,  139 => 40,  133 => 39,  125 => 38,  119 => 37,  114 => 36,  110 => 35,  105 => 34,  99 => 32,  97 => 31,  94 => 30,  90 => 29,  83 => 26,  79 => 25,  72 => 23,  65 => 22,  60 => 1,  58 => 20,  56 => 8,  54 => 6,  52 => 5,  50 => 4,  48 => 3,  46 => 2,  39 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "invoice/listing.html.twig", "/var/www/html/kimai2/templates/invoice/listing.html.twig");
    }
}
