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

/* timesheet/layout-listing.html.twig */
class __TwigTemplate_339cdf145dc3fdcaf9f29590ac594984b10b913e042fc6fb7f9642c42d0345de extends Template
{
    private $source;
    private $macros = [];

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

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

        $this->blocks = [
            'page_search' => [$this, 'block_page_search'],
            'main_before' => [$this, 'block_main_before'],
            'main' => [$this, 'block_main'],
        ];
        $macros["_self"] = $this->macros["_self"] = $this;
    }

    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", "timesheet/layout-listing.html.twig", 2)->unwrap();
        // line 3
        $macros["tables"] = $this->macros["tables"] = $this->loadTemplate("macros/datatables.html.twig", "timesheet/layout-listing.html.twig", 3)->unwrap();
        // line 4
        $macros["toolbar"] = $this->macros["toolbar"] = $this->loadTemplate("macros/toolbar.html.twig", "timesheet/layout-listing.html.twig", 4)->unwrap();
        // line 6
        if ( !(isset($context["showSummary"]) || array_key_exists("showSummary", $context))) {
            // line 7
            $context["showSummary"] = false;
        }
        // line 9
        if ( !(isset($context["showStartEndTime"]) || array_key_exists("showStartEndTime", $context))) {
            // line 10
            $context["showStartEndTime"] = true;
        }
        // line 13
        $context["columns"] = ["id" => ["class" => "alwaysVisible multiCheckbox", "orderBy" => false, "title" => false, "html_before" => twig_call_macro($macros["tables"], "macro_datatable_multiupdate_all", [], 14, $context, $this->getSourceContext())], "date" => ["class" => "alwaysVisible", "orderBy" => "begin"]];
        // line 18
        if (($context["showStartEndTime"] ?? null)) {
            // line 19
            $context["columns"] = twig_array_merge(($context["columns"] ?? null), ["starttime" => ["class" => "hidden-xs", "orderBy" => "begin"], "endtime" => ["class" => "hidden-xs", "orderBy" => "end"]]);
        }
        // line 24
        $context["columns"] = twig_array_merge(($context["columns"] ?? null), ["duration" => ""]);
        // line 25
        if (($context["canSeeRate"] ?? null)) {
            // line 26
            $context["columns"] = twig_array_merge(($context["columns"] ?? null), ["rate" => ""]);
        }
        // line 28
        $context["columns"] = twig_array_merge(($context["columns"] ?? null), ["customer" => ["class" => "hidden-xs hidden-sm hidden-md"], "project" => ["class" => "hidden-xs hidden-sm hidden-md"], "activity" => ["class" => "hidden-xs hidden-sm"], "description" => ["class" => "hidden-xs hidden-sm"]]);
        // line 34
        if (($context["canSeeUsername"] ?? null)) {
            // line 35
            $context["columns"] = twig_array_merge(($context["columns"] ?? null), ["username" => ["class" => "hidden-xs", "orderBy" => false]]);
        }
        // line 39
        $context["columns"] = twig_array_merge(($context["columns"] ?? null), ["tags" => ["class" => "hidden-xs hidden-sm", "orderBy" => false]]);
        // line 42
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["metaColumns"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["field"]) {
            // line 43
            $context["columns"] = twig_array_merge(($context["columns"] ?? null), [("mf_" . twig_get_attribute($this->env, $this->source,             // line 44
$context["field"], "name", [], "any", false, false, false, 44)) => ["title" => twig_get_attribute($this->env, $this->source, $context["field"], "label", [], "any", false, false, false, 44), "class" => "hidden-xs hidden-sm", "orderBy" => false]]);
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['field'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 47
        $context["columns"] = twig_array_merge(($context["columns"] ?? null), ["actions" => ["class" => "actions alwaysVisible"]]);
        // line 1
        $this->parent = $this->loadTemplate("base.html.twig", "timesheet/layout-listing.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 51
    public function block_page_search($context, array $blocks = [])
    {
        $macros = $this->macros;
        echo twig_call_macro($macros["toolbar"], "macro_dropDownSearch", [($context["toolbarForm"] ?? null)], 51, $context, $this->getSourceContext());
    }

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

    // line 57
    public function block_main($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 58
        echo "
    ";
        // line 59
        if (0 === twig_compare(twig_get_attribute($this->env, $this->source, ($context["entries"] ?? null), "count", [], "any", false, false, false, 59), 0)) {
            // line 60
            echo "        ";
            echo twig_call_macro($macros["widgets"], "macro_nothing_found", ["kimai.timesheetUpdate"], 60, $context, $this->getSourceContext());
            echo "
    ";
        } else {
            // line 62
            echo "        ";
            echo twig_call_macro($macros["tables"], "macro_datatable_header", [($context["tableName"] ?? null), ($context["columns"] ?? null), ($context["query"] ?? null), ["striped" =>  !($context["showSummary"] ?? null), "reload" => "kimai.timesheetUpdate"]], 62, $context, $this->getSourceContext());
            echo "

        ";
            // line 64
            $context["checkOverlappingDesc"] = false;
            // line 65
            echo "        ";
            $context["checkOverlappingAsc"] = false;
            // line 66
            echo "        ";
            if ((0 === twig_compare(twig_get_attribute($this->env, $this->source, ($context["query"] ?? null), "orderBy", [], "any", false, false, false, 66), "begin") || 0 === twig_compare(twig_get_attribute($this->env, $this->source, ($context["query"] ?? null), "orderBy", [], "any", false, false, false, 66), "end"))) {
                // line 67
                echo "            ";
                $context["checkOverlappingDesc"] = 0 === twig_compare(twig_get_attribute($this->env, $this->source, ($context["query"] ?? null), "order", [], "any", false, false, false, 67), "DESC");
                // line 68
                echo "            ";
                $context["checkOverlappingAsc"] =  !($context["checkOverlappingDesc"] ?? null);
                // line 69
                echo "        ";
            }
            // line 70
            echo "
        ";
            // line 71
            $context["day"] = null;
            // line 72
            echo "        ";
            $context["dayDuration"] = 0;
            // line 73
            echo "        ";
            $context["dayRate"] = [];
            // line 74
            echo "        ";
            $context["lastEntry"] = null;
            // line 75
            echo "        ";
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["entries"] ?? null));
            $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["entry"]) {
                // line 76
                $context["customerCurrency"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["entry"], "project", [], "any", false, false, false, 76), "customer", [], "any", false, false, false, 76), "currency", [], "any", false, false, false, 76);
                // line 77
                if ((($context["day"] ?? null) === null)) {
                    // line 78
                    $context["day"] = $this->extensions['App\Twig\DateExtensions']->dateShort(twig_get_attribute($this->env, $this->source, $context["entry"], "begin", [], "any", false, false, false, 78));
                    // line 79
                    echo "            ";
                }
                // line 80
                if ((($context["showSummary"] ?? null) &&  !(($context["day"] ?? null) === $this->extensions['App\Twig\DateExtensions']->dateShort(twig_get_attribute($this->env, $this->source, $context["entry"], "begin", [], "any", false, false, false, 80))))) {
                    // line 81
                    echo twig_call_macro($macros["_self"], "macro_summary", [($context["day"] ?? null), ($context["dayDuration"] ?? null), ($context["dayRate"] ?? null), ($context["columns"] ?? null), ($context["canSeeRate"] ?? null), ($context["canSeeUsername"] ?? null), ($context["showStartEndTime"] ?? null), ($context["tableName"] ?? null), ($context["metaColumns"] ?? null)], 81, $context, $this->getSourceContext());
                    echo "
                ";
                    // line 82
                    $context["day"] = $this->extensions['App\Twig\DateExtensions']->dateShort(twig_get_attribute($this->env, $this->source, $context["entry"], "begin", [], "any", false, false, false, 82));
                    // line 83
                    echo "                ";
                    $context["dayDuration"] = 0;
                    // line 84
                    echo "                ";
                    $context["dayRate"] = [];
                }
                // line 86
                $context["class"] = "";
                // line 87
                echo "            ";
                if ((($context["checkOverlappingDesc"] ?? null) || ($context["checkOverlappingAsc"] ?? null))) {
                    // line 88
                    echo "                ";
                    if ((( !(null === ($context["lastEntry"] ?? null)) &&  !(null === twig_get_attribute($this->env, $this->source, $context["entry"], "end", [], "any", false, false, false, 88))) && (twig_get_attribute($this->env, $this->source, $context["entry"], "user", [], "any", false, false, false, 88) === twig_get_attribute($this->env, $this->source, ($context["lastEntry"] ?? null), "user", [], "any", false, false, false, 88)))) {
                        // line 89
                        echo "                    ";
                        if ((($context["checkOverlappingDesc"] ?? null) && 1 === twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["entry"], "end", [], "any", false, false, false, 89), "timestamp", [], "any", false, false, false, 89), twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["lastEntry"] ?? null), "begin", [], "any", false, false, false, 89), "timestamp", [], "any", false, false, false, 89)))) {
                            // line 90
                            echo "                        ";
                            $context["class"] = (($context["class"] ?? null) . " overlapping");
                            // line 91
                            echo "                    ";
                        } elseif ((($context["checkOverlappingAsc"] ?? null) && -1 === twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["entry"], "begin", [], "any", false, false, false, 91), "timestamp", [], "any", false, false, false, 91), twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["lastEntry"] ?? null), "end", [], "any", false, false, false, 91), "timestamp", [], "any", false, false, false, 91)))) {
                            // line 92
                            echo "                        ";
                            $context["class"] = (($context["class"] ?? null) . " overlapping");
                            // line 93
                            echo "                    ";
                        }
                        // line 94
                        echo "                ";
                    }
                    // line 95
                    echo "            ";
                }
                // line 96
                echo "            ";
                if ( !twig_get_attribute($this->env, $this->source, $context["entry"], "end", [], "any", false, false, false, 96)) {
                    // line 97
                    echo "                ";
                    $context["class"] = (($context["class"] ?? null) . " recording");
                    // line 98
                    echo "            ";
                }
                // line 99
                echo "            <tr";
                if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("edit", $context["entry"])) {
                    echo " class=\"modal-ajax-form open-edit";
                    echo twig_escape_filter($this->env, ($context["class"] ?? null), "html", null, true);
                    echo "\" data-href=\"";
                    echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(($context["editRoute"] ?? null), ["id" => twig_get_attribute($this->env, $this->source, $context["entry"], "id", [], "any", false, false, false, 99)]), "html", null, true);
                    echo "\"";
                }
                echo ">
                <td class=\"text-nowrap\">
                    ";
                // line 101
                if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("edit", $context["entry"]) || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("delete", $context["entry"]))) {
                    // line 102
                    echo "                        ";
                    echo twig_call_macro($macros["tables"], "macro_datatable_multiupdate_row", [twig_get_attribute($this->env, $this->source, $context["entry"], "id", [], "any", false, false, false, 102)], 102, $context, $this->getSourceContext());
                    echo "
                    ";
                }
                // line 104
                echo "                </td>
                <td class=\"text-nowrap ";
                // line 105
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "date"], 105, $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"], "begin", [], "any", false, false, false, 105)), "html", null, true);
                echo "</td>

                ";
                // line 107
                if (($context["showStartEndTime"] ?? null)) {
                    // line 108
                    echo "                    <td class=\"text-nowrap ";
                    echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "starttime"], 108, $context, $this->getSourceContext());
                    echo "\">";
                    echo twig_escape_filter($this->env, $this->extensions['App\Twig\DateExtensions']->time(twig_get_attribute($this->env, $this->source, $context["entry"], "begin", [], "any", false, false, false, 108)), "html", null, true);
                    echo "</td>
                    <td class=\"text-nowrap ";
                    // line 109
                    echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "endtime"], 109, $context, $this->getSourceContext());
                    echo "\">
                        ";
                    // line 110
                    if (twig_get_attribute($this->env, $this->source, $context["entry"], "end", [], "any", false, false, false, 110)) {
                        // line 111
                        echo "                            ";
                        echo twig_escape_filter($this->env, $this->extensions['App\Twig\DateExtensions']->time(twig_get_attribute($this->env, $this->source, $context["entry"], "end", [], "any", false, false, false, 111)), "html", null, true);
                        echo "
                        ";
                    } else {
                        // line 113
                        echo "                            &dash;
                        ";
                    }
                    // line 115
                    echo "                    </td>
                ";
                }
                // line 117
                echo "
                ";
                // line 118
                if (twig_get_attribute($this->env, $this->source, $context["entry"], "end", [], "any", false, false, false, 118)) {
                    // line 119
                    echo "                    <td class=\"text-nowrap ";
                    echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "duration"], 119, $context, $this->getSourceContext());
                    echo "\">";
                    echo twig_escape_filter($this->env, $this->extensions['App\Twig\LocaleExtensions']->duration(twig_get_attribute($this->env, $this->source, $context["entry"], "duration", [], "any", false, false, false, 119)), "html", null, true);
                    echo "</td>
                ";
                } else {
                    // line 121
                    echo "                    <td class=\"text-nowrap ";
                    echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "duration"], 121, $context, $this->getSourceContext());
                    echo "\">
                        <i data-since=\"";
                    // line 122
                    echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["entry"], "begin", [], "any", false, false, false, 122), "format", [0 => twig_constant("DATE_ISO8601")], "method", false, false, false, 122), "html", null, true);
                    echo "\" data-format=\"";
                    echo twig_escape_filter($this->env, $this->extensions['App\Twig\DateExtensions']->getDurationFormat(), "html", null, true);
                    echo "\">";
                    echo twig_escape_filter($this->env, $this->extensions['App\Twig\LocaleExtensions']->duration($context["entry"]), "html", null, true);
                    echo "</i>
                    </td>
                ";
                }
                // line 125
                echo "
                ";
                // line 126
                if (($context["canSeeRate"] ?? null)) {
                    // line 127
                    echo "                    <td class=\"text-nowrap ";
                    echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "rate"], 127, $context, $this->getSourceContext());
                    echo "\">
                        ";
                    // line 128
                    if (( !twig_get_attribute($this->env, $this->source, $context["entry"], "end", [], "any", false, false, false, 128) ||  !$this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("view_rate", $context["entry"]))) {
                        // line 129
                        echo "                            &dash;
                        ";
                    } else {
                        // line 131
                        echo "                            ";
                        echo twig_escape_filter($this->env, $this->extensions['App\Twig\LocaleExtensions']->money(twig_get_attribute($this->env, $this->source, $context["entry"], "rate", [], "any", false, false, false, 131), twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["entry"], "project", [], "any", false, false, false, 131), "customer", [], "any", false, false, false, 131), "currency", [], "any", false, false, false, 131)), "html", null, true);
                        echo "
                        ";
                    }
                    // line 133
                    echo "                    </td>
                ";
                }
                // line 135
                echo "
                <td class=\"";
                // line 136
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "customer"], 136, $context, $this->getSourceContext());
                echo "\">
                    ";
                // line 137
                echo twig_call_macro($macros["widgets"], "macro_label_customer", [twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["entry"], "project", [], "any", false, false, false, 137), "customer", [], "any", false, false, false, 137)], 137, $context, $this->getSourceContext());
                echo "
                </td>
                <td class=\"";
                // line 139
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "project"], 139, $context, $this->getSourceContext());
                echo "\">
                    ";
                // line 140
                echo twig_call_macro($macros["widgets"], "macro_label_project", [twig_get_attribute($this->env, $this->source, $context["entry"], "project", [], "any", false, false, false, 140)], 140, $context, $this->getSourceContext());
                echo "
                </td>
                <td class=\"";
                // line 142
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "activity"], 142, $context, $this->getSourceContext());
                echo "\">
                    ";
                // line 143
                echo twig_call_macro($macros["widgets"], "macro_label_activity", [twig_get_attribute($this->env, $this->source, $context["entry"], "activity", [], "any", false, false, false, 143)], 143, $context, $this->getSourceContext());
                echo "
                </td>
                <td class=\"";
                // line 145
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "description"], 145, $context, $this->getSourceContext());
                echo " timesheet-description\">
                    ";
                // line 146
                if (($context["allowMarkdown"] ?? null)) {
                    // line 147
                    echo "                        ";
                    echo $this->extensions['App\Twig\MarkdownExtension']->timesheetContent(twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["entry"], "description", [], "any", false, false, false, 147)));
                    echo "
                    ";
                } else {
                    // line 149
                    echo "                        ";
                    echo nl2br(twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["entry"], "description", [], "any", false, false, false, 149), "html", null, true));
                    echo "
                    ";
                }
                // line 151
                echo "                </td>

                ";
                // line 153
                if (($context["canSeeUsername"] ?? null)) {
                    // line 154
                    echo "                    <td class=\"";
                    echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "username"], 154, $context, $this->getSourceContext());
                    echo "\">
                        ";
                    // line 155
                    echo twig_call_macro($macros["widgets"], "macro_label_user", [twig_get_attribute($this->env, $this->source, $context["entry"], "user", [], "any", false, false, false, 155)], 155, $context, $this->getSourceContext());
                    echo "
                    </td>
                ";
                }
                // line 158
                echo "                
                <td class=\"";
                // line 159
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "tags"], 159, $context, $this->getSourceContext());
                echo "\">";
                echo twig_call_macro($macros["widgets"], "macro_tag_list", [twig_get_attribute($this->env, $this->source, $context["entry"], "tags", [], "any", false, false, false, 159)], 159, $context, $this->getSourceContext());
                echo "</td>
                ";
                // line 160
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable(($context["metaColumns"] ?? null));
                foreach ($context['_seq'] as $context["_key"] => $context["field"]) {
                    // line 161
                    echo "                    <td class=\"text-nowrap ";
                    echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), ("mf_" . twig_get_attribute($this->env, $this->source, $context["field"], "name", [], "any", false, false, false, 161))], 161, $context, $this->getSourceContext());
                    echo "\">
                        ";
                    // line 162
                    echo twig_call_macro($macros["tables"], "macro_datatable_meta_column", [$context["entry"], $context["field"]], 162, $context, $this->getSourceContext());
                    echo "
                    </td>
                ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['_key'], $context['field'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 165
                echo "                <td class=\"actions\">
                    ";
                // line 166
                $this->displayBlock("row_action", $context, $blocks);
                echo "
                </td>
            </tr>";
                // line 169
                if (twig_get_attribute($this->env, $this->source, $context["entry"], "end", [], "any", false, false, false, 169)) {
                    // line 170
                    if ( !twig_get_attribute($this->env, $this->source, ($context["dayRate"] ?? null), ($context["customerCurrency"] ?? null), [], "array", true, true, false, 170)) {
                        // line 171
                        echo "                    ";
                        $context["dayRate"] = twig_array_merge(($context["dayRate"] ?? null), [($context["customerCurrency"] ?? null) => 0]);
                        // line 172
                        echo "                ";
                    }
                    // line 173
                    echo "                ";
                    $context["dayRate"] = twig_array_merge(($context["dayRate"] ?? null), [($context["customerCurrency"] ?? null) => ((($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4 = ($context["dayRate"] ?? null)) && is_array($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4) || $__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4 instanceof ArrayAccess ? ($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4[($context["customerCurrency"] ?? null)] ?? null) : null) + twig_get_attribute($this->env, $this->source, $context["entry"], "rate", [], "any", false, false, false, 173))]);
                }
                // line 175
                $context["dayDuration"] = (($context["dayDuration"] ?? null) + twig_get_attribute($this->env, $this->source, $context["entry"], "duration", [], "any", false, false, false, 175));
                // line 176
                $context["lastEntry"] = $context["entry"];
                // line 177
                echo "        ";
                ++$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['entry'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 178
            echo "
        ";
            // line 179
            if (($context["showSummary"] ?? null)) {
                // line 180
                echo "            ";
                echo twig_call_macro($macros["_self"], "macro_summary", [($context["day"] ?? null), ($context["dayDuration"] ?? null), ($context["dayRate"] ?? null), ($context["columns"] ?? null), ($context["canSeeRate"] ?? null), ($context["canSeeUsername"] ?? null), ($context["showStartEndTime"] ?? null), ($context["tableName"] ?? null), ($context["metaColumns"] ?? null)], 180, $context, $this->getSourceContext());
                echo "
        ";
            }
            // line 182
            echo "
        ";
            // line 183
            echo twig_call_macro($macros["tables"], "macro_data_table_footer", [($context["entries"] ?? null), ($context["paginationRoute"] ?? null), ($context["multiUpdateForm"] ?? null)], 183, $context, $this->getSourceContext());
            echo "
    ";
        }
        // line 185
        echo "
";
    }

    // line 188
    public function macro_summary($__day__ = null, $__duration__ = null, $__dayRates__ = null, $__columns__ = null, $__canSeeRate__ = null, $__canSeeUsername__ = null, $__showStartEndTime__ = null, $__tableName__ = null, $__metaColumns__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = $this->env->mergeGlobals([
            "day" => $__day__,
            "duration" => $__duration__,
            "dayRates" => $__dayRates__,
            "columns" => $__columns__,
            "canSeeRate" => $__canSeeRate__,
            "canSeeUsername" => $__canSeeUsername__,
            "showStartEndTime" => $__showStartEndTime__,
            "tableName" => $__tableName__,
            "metaColumns" => $__metaColumns__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 189
            echo "    ";
            $macros["tables"] = $this->loadTemplate("macros/datatables.html.twig", "timesheet/layout-listing.html.twig", 189)->unwrap();
            // line 190
            echo "    <tr class=\"summary info\">
        <td></td>
        <td class=\"text-nowrap\">";
            // line 192
            echo twig_escape_filter($this->env, ($context["day"] ?? null), "html", null, true);
            echo "</td>
        ";
            // line 193
            if (($context["showStartEndTime"] ?? null)) {
                // line 194
                echo "            <td class=\"";
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "starttime"], 194, $context, $this->getSourceContext());
                echo "\"></td>
            <td class=\"";
                // line 195
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "endtime"], 195, $context, $this->getSourceContext());
                echo "\"></td>
        ";
            }
            // line 197
            echo "        <td class=\"text-nowrap ";
            echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "duration"], 197, $context, $this->getSourceContext());
            echo "\">";
            echo twig_escape_filter($this->env, $this->extensions['App\Twig\LocaleExtensions']->duration(($context["duration"] ?? null)), "html", null, true);
            echo "</td>
        ";
            // line 198
            if (($context["canSeeRate"] ?? null)) {
                // line 199
                echo "            <td class=\"text-nowrap ";
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "rate"], 199, $context, $this->getSourceContext());
                echo "\">
                ";
                // line 200
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable(($context["dayRates"] ?? null));
                $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["currency"] => $context["rate"]) {
                    // line 201
                    echo "                    ";
                    echo twig_escape_filter($this->env, $this->extensions['App\Twig\LocaleExtensions']->money($context["rate"], $context["currency"]), "html", null, true);
                    echo "
                    ";
                    // line 202
                    if ( !twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 202)) {
                        // line 203
                        echo "                        <br>
                    ";
                    }
                    // line 205
                    echo "                ";
                    ++$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['currency'], $context['rate'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 206
                echo "            </td>
        ";
            }
            // line 208
            echo "        <td class=\"";
            echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "customer"], 208, $context, $this->getSourceContext());
            echo "\"></td>
        <td class=\"";
            // line 209
            echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "project"], 209, $context, $this->getSourceContext());
            echo "\"></td>
        <td class=\"";
            // line 210
            echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "activity"], 210, $context, $this->getSourceContext());
            echo "\"></td>
        <td class=\"";
            // line 211
            echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "description"], 211, $context, $this->getSourceContext());
            echo "\"></td>
        ";
            // line 212
            if (($context["canSeeUsername"] ?? null)) {
                // line 213
                echo "            <td class=\"";
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "username"], 213, $context, $this->getSourceContext());
                echo "\"></td>
        ";
            }
            // line 215
            echo "        <td class=\"";
            echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), "tags"], 215, $context, $this->getSourceContext());
            echo "\"></td>
        ";
            // line 216
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["metaColumns"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["field"]) {
                // line 217
                echo "            <td class=\"";
                echo twig_call_macro($macros["tables"], "macro_data_table_column_class", [($context["tableName"] ?? null), ($context["columns"] ?? null), ("mf_" . twig_get_attribute($this->env, $this->source, $context["field"], "name", [], "any", false, false, false, 217))], 217, $context, $this->getSourceContext());
                echo "\"></td>
        ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['field'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 219
            echo "        <td class=\"actions\"></td>
    </tr>
";

            return ('' === $tmp = ob_get_contents()) ? '' : new Markup($tmp, $this->env->getCharset());
        } finally {
            ob_end_clean();
        }
    }

    public function getTemplateName()
    {
        return "timesheet/layout-listing.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  668 => 219,  659 => 217,  655 => 216,  650 => 215,  644 => 213,  642 => 212,  638 => 211,  634 => 210,  630 => 209,  625 => 208,  621 => 206,  607 => 205,  603 => 203,  601 => 202,  596 => 201,  579 => 200,  574 => 199,  572 => 198,  565 => 197,  560 => 195,  555 => 194,  553 => 193,  549 => 192,  545 => 190,  542 => 189,  521 => 188,  516 => 185,  511 => 183,  508 => 182,  502 => 180,  500 => 179,  497 => 178,  483 => 177,  481 => 176,  479 => 175,  475 => 173,  472 => 172,  469 => 171,  467 => 170,  465 => 169,  460 => 166,  457 => 165,  448 => 162,  443 => 161,  439 => 160,  433 => 159,  430 => 158,  424 => 155,  419 => 154,  417 => 153,  413 => 151,  407 => 149,  401 => 147,  399 => 146,  395 => 145,  390 => 143,  386 => 142,  381 => 140,  377 => 139,  372 => 137,  368 => 136,  365 => 135,  361 => 133,  355 => 131,  351 => 129,  349 => 128,  344 => 127,  342 => 126,  339 => 125,  329 => 122,  324 => 121,  316 => 119,  314 => 118,  311 => 117,  307 => 115,  303 => 113,  297 => 111,  295 => 110,  291 => 109,  284 => 108,  282 => 107,  275 => 105,  272 => 104,  266 => 102,  264 => 101,  252 => 99,  249 => 98,  246 => 97,  243 => 96,  240 => 95,  237 => 94,  234 => 93,  231 => 92,  228 => 91,  225 => 90,  222 => 89,  219 => 88,  216 => 87,  214 => 86,  210 => 84,  207 => 83,  205 => 82,  201 => 81,  199 => 80,  196 => 79,  194 => 78,  192 => 77,  190 => 76,  172 => 75,  169 => 74,  166 => 73,  163 => 72,  161 => 71,  158 => 70,  155 => 69,  152 => 68,  149 => 67,  146 => 66,  143 => 65,  141 => 64,  135 => 62,  129 => 60,  127 => 59,  124 => 58,  120 => 57,  113 => 54,  109 => 53,  102 => 51,  97 => 1,  95 => 47,  89 => 44,  88 => 43,  84 => 42,  82 => 39,  79 => 35,  77 => 34,  75 => 28,  72 => 26,  70 => 25,  68 => 24,  65 => 19,  63 => 18,  61 => 13,  58 => 10,  56 => 9,  53 => 7,  51 => 6,  49 => 4,  47 => 3,  45 => 2,  38 => 1,);
    }

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