<?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;
use Twig\TemplateWrapper;
/* workhour/paidView.html.twig */
class __TwigTemplate_ac5b8beddb32523bb1789f6cb3f55831 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'page_content' => [$this, 'block_page_content'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "@!EasyAdmin/page/content.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$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", "workhour/paidView.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "workhour/paidView.html.twig"));
$this->parent = $this->load("@!EasyAdmin/page/content.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
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_page_content(array $context, array $blocks = []): iterable
{
$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", "page_content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_content"));
// line 4
yield "<div class=\"payview\">
\t<h2>";
// line 5
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["worker"]) || array_key_exists("worker", $context) ? $context["worker"] : (function () { throw new RuntimeError('Variable "worker" does not exist.', 5, $this->source); })()), "html", null, true);
yield "
\t\t<select id=\"workerDateSelect\" class=\"form-control form-control-sm col-3 d-inline ml-auto\" style=\"width: 30%; float:right;\" onchange=\"changeYear()\">
\t\t\t";
// line 7
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["workerDates"]) || array_key_exists("workerDates", $context) ? $context["workerDates"] : (function () { throw new RuntimeError('Variable "workerDates" does not exist.', 7, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["w"]) {
// line 8
yield "\t\t\t\t<option ";
yield ((((isset($context["selectedDate"]) || array_key_exists("selectedDate", $context) ? $context["selectedDate"] : (function () { throw new RuntimeError('Variable "selectedDate" does not exist.', 8, $this->source); })()) && ($context["w"] == (isset($context["selectedDate"]) || array_key_exists("selectedDate", $context) ? $context["selectedDate"] : (function () { throw new RuntimeError('Variable "selectedDate" does not exist.', 8, $this->source); })())))) ? ("selected") : (""));
yield " data-url=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $this->extensions['EasyCorp\Bundle\EasyAdminBundle\Twig\EasyAdminTwigExtension']->getAdminUrlGenerator(), "setController", ["App\\Controller\\Admin\\WorkersCrudController"], "method", false, false, false, 8), "setAction", ["actionPaid"], "method", false, false, false, 8), "setEntityId", [CoreExtension::getAttribute($this->env, $this->source, (isset($context["worker"]) || array_key_exists("worker", $context) ? $context["worker"] : (function () { throw new RuntimeError('Variable "worker" does not exist.', 8, $this->source); })()), "id", [], "any", false, false, false, 8)], "method", false, false, false, 8) . "&date=") . Twig\Extension\CoreExtension::urlencode($context["w"])), "html", null, true);
yield "\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["w"], "html", null, true);
yield "</option>
\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['w'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 10
yield "\t\t</select>
\t\t";
// line 11
if ((($tmp = (isset($context["isAdmin"]) || array_key_exists("isAdmin", $context) ? $context["isAdmin"] : (function () { throw new RuntimeError('Variable "isAdmin" does not exist.', 11, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 12
yield "\t\t<select id=\"workerSelect\" class=\"form-control form-control-sm col-3 d-inline ml-auto\" style=\"width: 30%; float:right;\" onchange=\"changeWorker()\">
\t\t\t";
// line 13
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["workers"]) || array_key_exists("workers", $context) ? $context["workers"] : (function () { throw new RuntimeError('Variable "workers" does not exist.', 13, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["w"]) {
// line 14
yield "\t\t\t\t<option ";
yield (((CoreExtension::getAttribute($this->env, $this->source, $context["w"], "id", [], "any", false, false, false, 14) == CoreExtension::getAttribute($this->env, $this->source, (isset($context["worker"]) || array_key_exists("worker", $context) ? $context["worker"] : (function () { throw new RuntimeError('Variable "worker" does not exist.', 14, $this->source); })()), "id", [], "any", false, false, false, 14))) ? ("selected") : (""));
yield " value=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["w"], "id", [], "any", false, false, false, 14), "html", null, true);
yield "\" ";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["w"], "id", [], "any", false, false, false, 14) == CoreExtension::getAttribute($this->env, $this->source, (isset($context["worker"]) || array_key_exists("worker", $context) ? $context["worker"] : (function () { throw new RuntimeError('Variable "worker" does not exist.', 14, $this->source); })()), "id", [], "any", false, false, false, 14))) {
yield "selected";
}
yield " data-url=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $this->extensions['EasyCorp\Bundle\EasyAdminBundle\Twig\EasyAdminTwigExtension']->getAdminUrlGenerator(), "setController", ["App\\Controller\\Admin\\WorkersCrudController"], "method", false, false, false, 14), "setAction", ["actionPaid"], "method", false, false, false, 14), "setEntityId", [CoreExtension::getAttribute($this->env, $this->source, $context["w"], "id", [], "any", false, false, false, 14)], "method", false, false, false, 14) . "?date=") . Twig\Extension\CoreExtension::urlencode((((isset($context["selectedDate"]) || array_key_exists("selectedDate", $context) ? $context["selectedDate"] : (function () { throw new RuntimeError('Variable "selectedDate" does not exist.', 14, $this->source); })())) ? ($context["selectedDate"]) : ((((CoreExtension::getAttribute($this->env, $this->source, ($context["workerDates"] ?? null), 0, [], "array", true, true, false, 14) && !(null === CoreExtension::getAttribute($this->env, $this->source, (isset($context["workerDates"]) || array_key_exists("workerDates", $context) ? $context["workerDates"] : (function () { throw new RuntimeError('Variable "workerDates" does not exist.', 14, $this->source); })()), 0, [], "array", false, false, false, 14)))) ? (CoreExtension::getAttribute($this->env, $this->source, (isset($context["workerDates"]) || array_key_exists("workerDates", $context) ? $context["workerDates"] : (function () { throw new RuntimeError('Variable "workerDates" does not exist.', 14, $this->source); })()), 0, [], "array", false, false, false, 14)) : ("")))))), "html", null, true);
yield "\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["w"], "fullName", [], "any", false, false, false, 14), "html", null, true);
yield "</option>
\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['w'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
yield "\t\t</select>
\t\t";
}
// line 18
yield "\t</h2>\t\t<table class=\"table\">
\t\t";
// line 19
$context["sum"] = 0;
// line 20
yield "\t\t";
$context["sumHour"] = 0;
// line 21
yield "\t\t";
$context["sumOther"] = 0;
// line 22
yield "\t\t\t<tr>
\t\t\t\t<th width=\"20px\">Fizetve</th>
\t\t\t\t<th>Projekt</th>
\t\t\t\t<th>Idő</th>
\t\t\t\t<th>Órabér</th>
\t\t\t\t<th>Egyéb költség</th>
\t\t\t\t<th>Összesen</th>
\t\t\t\t<th>Nap</th>
\t\t\t\t<th>Létrehozva</th>
\t\t\t</tr>
\t\t\t";
// line 32
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["hours"]) || array_key_exists("hours", $context) ? $context["hours"] : (function () { throw new RuntimeError('Variable "hours" does not exist.', 32, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["hour"]) {
// line 33
yield "\t\t\t<tr id=\"row-";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "id", [], "any", false, false, false, 33), "html", null, true);
yield "\">
\t\t\t\t<td class=\"text-center\"><span class=\"fa text-success fa-";
// line 34
yield (((CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "payed", [], "any", false, false, false, 34) == true)) ? ("coins") : (""));
yield "\"></span></td>\t
\t\t\t\t";
// line 35
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "project", [], "any", false, false, false, 35)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 36
yield " \t";
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "project", [], "any", false, false, false, 36), "customer", [], "any", false, false, false, 36)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 37
yield "\t\t\t\t\t <td>(";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "project", [], "any", false, false, false, 37), "customer", [], "any", false, false, false, 37), "name", [], "any", false, false, false, 37), "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["hour"], "project", [], "any", false, false, false, 37), "name", [], "any", false, false, false, 37), "html", null, true);
yield " - ";
yield CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "note", [], "any", false, false, false, 37);
yield "</td>\t
";
} else {
// line 39
yield " <td>";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "project", [], "any", false, false, false, 39), "name", [], "any", false, false, false, 39), "html", null, true);
yield " - ";
yield CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "note", [], "any", false, false, false, 39);
yield "</td>\t
";
}
// line 41
yield " ";
} else {
// line 42
yield "\t\t\t\t\t<td>";
yield CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "note", [], "any", false, false, false, 42);
yield "</td>\t
\t\t\t\t";
}
// line 44
yield "\t\t\t\t<td id=\"hour-";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "id", [], "any", false, false, false, 44), "html", null, true);
yield "\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "hours", [], "any", false, false, false, 44), "html", null, true);
yield " ó</td>\t
\t\t\t\t<td id=\"hp-";
// line 45
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "id", [], "any", false, false, false, 45), "html", null, true);
yield "\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extra\Intl\IntlExtension']->formatCurrency(CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "payedHourPrice", [], "any", false, false, false, 45), "HUF", ["rounding_mode" => "floor", "fraction_digit" => 0]), "html", null, true);
yield "</td>
\t\t\t\t<td id=\"other-";
// line 46
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "id", [], "any", false, false, false, 46), "html", null, true);
yield "\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extra\Intl\IntlExtension']->formatCurrency(CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "otherPrice", [], "any", false, false, false, 46), "HUF", ["rounding_mode" => "floor", "fraction_digit" => 0]), "html", null, true);
yield "</td>\t
\t\t\t\t<td class=\"text-right\" style=\"padding-right: 3rem !important;\" id=\"sum-";
// line 47
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "id", [], "any", false, false, false, 47), "html", null, true);
yield "\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extra\Intl\IntlExtension']->formatCurrency(((CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "hours", [], "any", false, false, false, 47) * CoreExtension::getAttribute($this->env, $this->source, (isset($context["worker"]) || array_key_exists("worker", $context) ? $context["worker"] : (function () { throw new RuntimeError('Variable "worker" does not exist.', 47, $this->source); })()), "priceHour", [], "any", false, false, false, 47)) + CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "otherPrice", [], "any", false, false, false, 47)), "HUF", ["rounding_mode" => "floor", "fraction_digit" => 0]), "html", null, true);
yield "</td>\t
\t\t\t\t<td>";
// line 48
yield (((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "day", [], "any", false, false, false, 48)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "day", [], "any", false, false, false, 48), "format", ["Y-m-d"], "method", false, false, false, 48), "html", null, true)) : ("-"));
yield "</td>\t
\t\t\t\t<td>";
// line 49
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "created", [], "any", false, false, false, 49), "format", ["Y-m-d"], "method", false, false, false, 49), "html", null, true);
yield "</td>\t
\t\t\t\t";
// line 50
$context["sumHour"] = ((isset($context["sumHour"]) || array_key_exists("sumHour", $context) ? $context["sumHour"] : (function () { throw new RuntimeError('Variable "sumHour" does not exist.', 50, $this->source); })()) + CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "hours", [], "any", false, false, false, 50));
// line 51
yield "\t\t\t\t";
$context["sum"] = ((isset($context["sum"]) || array_key_exists("sum", $context) ? $context["sum"] : (function () { throw new RuntimeError('Variable "sum" does not exist.', 51, $this->source); })()) + (CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "hours", [], "any", false, false, false, 51) * CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "payedHourPrice", [], "any", false, false, false, 51)));
// line 52
yield "\t\t\t\t";
$context["sumOther"] = ((isset($context["sumOther"]) || array_key_exists("sumOther", $context) ? $context["sumOther"] : (function () { throw new RuntimeError('Variable "sumOther" does not exist.', 52, $this->source); })()) + (((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "otherPrice", [], "any", false, false, false, 52)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? (CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "otherPrice", [], "any", false, false, false, 52)) : (0)));
// line 53
yield "\t\t\t</tr>
\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['hour'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 55
yield "\t\t\t<tfoot style=\"background-color: #fafafafa\">
\t\t\t\t<tr>
\t\t\t\t\t<td colspan=\"2\"><strong>Összesen</strong></td>
\t\t\t\t\t<td id=\"sumHours\" >";
// line 58
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["sumHour"]) || array_key_exists("sumHour", $context) ? $context["sumHour"] : (function () { throw new RuntimeError('Variable "sumHour" does not exist.', 58, $this->source); })()), "html", null, true);
yield "</td>
\t\t\t\t\t<td></td>
\t\t\t\t\t<td></td>
\t\t\t\t\t<td></td>
\t\t\t\t\t<td></td>
\t\t\t\t</tr>
\t\t\t\t<tr>
\t\t\t\t\t<td colspan=\"2\"><strong>Fizetendő óra</strong></td>
\t\t\t\t\t<td id=\"sumHoursPrice\">";
// line 66
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extra\Intl\IntlExtension']->formatCurrency((isset($context["sum"]) || array_key_exists("sum", $context) ? $context["sum"] : (function () { throw new RuntimeError('Variable "sum" does not exist.', 66, $this->source); })()), "HUF", ["fraction_digit" => 0], "hu"), "html", null, true);
yield "</td>
\t\t\t\t\t<td></td>
\t\t\t\t\t<td></td>
\t\t\t\t\t<td></td>
\t\t\t\t\t<td></td>
\t\t\t\t</tr>
\t\t\t\t<tr>
\t\t\t\t\t<td colspan=\"2\"><strong>Egyéb költség</strong></td>
\t\t\t\t\t<td id=\"sumOther\">";
// line 74
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extra\Intl\IntlExtension']->formatCurrency((isset($context["sumOther"]) || array_key_exists("sumOther", $context) ? $context["sumOther"] : (function () { throw new RuntimeError('Variable "sumOther" does not exist.', 74, $this->source); })()), "HUF", ["fraction_digit" => 0], "hu"), "html", null, true);
yield "</td>
\t\t\t\t\t<td></td>
\t\t\t\t\t<td></td>
\t\t\t\t\t<td></td>
\t\t\t\t\t<td></td>
\t\t\t\t</tr>
\t\t\t\t<tr>
\t\t\t\t\t<td colspan=\"2\"><strong>Teljes fizetendő összeg</strong></td>
\t\t\t\t\t<td><strong id=\"sumTotalStrong\">";
// line 82
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extra\Intl\IntlExtension']->formatCurrency(((isset($context["sum"]) || array_key_exists("sum", $context) ? $context["sum"] : (function () { throw new RuntimeError('Variable "sum" does not exist.', 82, $this->source); })()) + (isset($context["sumOther"]) || array_key_exists("sumOther", $context) ? $context["sumOther"] : (function () { throw new RuntimeError('Variable "sumOther" does not exist.', 82, $this->source); })())), "HUF", ["fraction_digit" => 0], "hu"), "html", null, true);
yield "</strong></td>
\t\t\t\t\t<td><input type=\"hidden\" name=\"sumTotal\" id=\"sumTotal\" value=\"";
// line 83
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((isset($context["sum"]) || array_key_exists("sum", $context) ? $context["sum"] : (function () { throw new RuntimeError('Variable "sum" does not exist.', 83, $this->source); })()) + (isset($context["sumOther"]) || array_key_exists("sumOther", $context) ? $context["sumOther"] : (function () { throw new RuntimeError('Variable "sumOther" does not exist.', 83, $this->source); })())), "html", null, true);
yield "\"></td>
\t\t\t\t\t<td></td>
\t\t\t\t\t<td></td>
\t\t\t\t\t<td></td>
\t\t\t\t</tr>
\t\t\t</tfoot>
\t\t</table>
<script type=\"text/javascript\">
\t(function(){
\t\twindow.changeWorker = function(){
\t\t\tvar select = document.getElementById('workerSelect');
\t\t\tvar dateSelect = document.getElementById('workerDateSelect');
\t\t\tvar selectedDate = dateSelect ? dateSelect.value : '';
\t\t\tvar url = select.options[select.selectedIndex].dataset.url;
\t\t\tif (url && selectedDate) {
\t\t\t\tvar target = new URL(url, window.location.origin);
\t\t\t\ttarget.searchParams.set('date', selectedDate);
\t\t\t\twindow.location.href = target.toString();
\t\t\t\treturn;
\t\t\t}
\t\t\tif (url) {
\t\t\t\twindow.location.href = url;
\t\t\t}
\t\t};
\t\twindow.changeYear = function(){
\t\t\tvar select = document.getElementById('workerDateSelect');
\t\t\tvar url = select.options[select.selectedIndex].dataset.url;
\t\t\tif (url) {
\t\t\t\twindow.location.href = url;
\t\t\t}
\t\t};
\t})();
\tfunction check(){
\t\t\$('#sumTotal').val(0);
\t\tvar total = 0;
\t\tvar sumHours = 0;
\t\tvar sumHoursPrice = 0;
\t\tvar sumOther = 0;
\t\tvar priceHour = parseInt(\$('#priceHour').val())
\t\t\$('.hour-checkbox:checked').each(function(key,chk){
\t\t\tvar price = parseInt(\$('#sum-'+chk.value).html())
\t\t\tvar other = parseInt(\$('#other-'+chk.value).html())
\t\t\tvar hour = parseFloat(\$('#hour-'+chk.value).html())
\t\t\ttotal = total + price;
\t\t\tif(other > 0){
\t\t\t\tsumOther = sumOther + other;
\t\t\t}
\t\t\tsumHours = sumHours + hour;
\t\t\tsumHoursPrice = sumHoursPrice + (hour*priceHour);
\t\t\t\$('#sumTotalStrong').html(total);
\t\t\t\$('#sumOther').html(sumOther);
\t\t\t\$('#sumHours').html(sumHours);
\t\t\t\$('#sumHoursPrice').html(sumHoursPrice);
\t\t})
\t}
</script>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "workhour/paidView.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 294 => 83, 290 => 82, 279 => 74, 268 => 66, 257 => 58, 252 => 55, 245 => 53, 242 => 52, 239 => 51, 237 => 50, 233 => 49, 229 => 48, 223 => 47, 217 => 46, 211 => 45, 204 => 44, 198 => 42, 195 => 41, 187 => 39, 177 => 37, 174 => 36, 172 => 35, 168 => 34, 163 => 33, 159 => 32, 147 => 22, 144 => 21, 141 => 20, 139 => 19, 136 => 18, 132 => 16, 113 => 14, 109 => 13, 106 => 12, 104 => 11, 101 => 10, 88 => 8, 84 => 7, 79 => 5, 76 => 4, 63 => 3, 40 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% extends '@!EasyAdmin/page/content.html.twig' %}
{% block page_content %}
<div class=\"payview\">
\t<h2>{{worker}}
\t\t<select id=\"workerDateSelect\" class=\"form-control form-control-sm col-3 d-inline ml-auto\" style=\"width: 30%; float:right;\" onchange=\"changeYear()\">
\t\t\t{% for w in workerDates %}
\t\t\t\t<option {{ (selectedDate and w == selectedDate) ? 'selected' : '' }} data-url=\"{{ (ea_url().setController('App\\\\Controller\\\\Admin\\\\WorkersCrudController').setAction('actionPaid').setEntityId(worker.id)) ~ '&date=' ~ w|url_encode }}\">{{w}}</option>
\t\t\t{% endfor %}
\t\t</select>
\t\t{% if isAdmin %}
\t\t<select id=\"workerSelect\" class=\"form-control form-control-sm col-3 d-inline ml-auto\" style=\"width: 30%; float:right;\" onchange=\"changeWorker()\">
\t\t\t{% for w in workers %}
\t\t\t\t<option {{ w.id == worker.id ? 'selected' : '' }} value=\"{{w.id}}\" {% if w.id == worker.id %}selected{% endif %} data-url=\"{{ (ea_url().setController('App\\\\Controller\\\\Admin\\\\WorkersCrudController').setAction('actionPaid').setEntityId(w.id)) ~ '?date=' ~ ((selectedDate ?: (workerDates[0] ?? ''))|url_encode) }}\">{{w.fullName}}</option>
\t\t\t{% endfor %}
\t\t</select>
\t\t{% endif %}
\t</h2>\t\t<table class=\"table\">
\t\t{% set sum=0 %}
\t\t{% set sumHour=0 %}
\t\t{% set sumOther=0 %}
\t\t\t<tr>
\t\t\t\t<th width=\"20px\">Fizetve</th>
\t\t\t\t<th>Projekt</th>
\t\t\t\t<th>Idő</th>
\t\t\t\t<th>Órabér</th>
\t\t\t\t<th>Egyéb költség</th>
\t\t\t\t<th>Összesen</th>
\t\t\t\t<th>Nap</th>
\t\t\t\t<th>Létrehozva</th>
\t\t\t</tr>
\t\t\t{% for hour in hours %}
\t\t\t<tr id=\"row-{{hour.id}}\">
\t\t\t\t<td class=\"text-center\"><span class=\"fa text-success fa-{{(hour.payed == true)? \"coins\": \"\"}}\"></span></td>\t
\t\t\t\t{% if hour.project %}
\t{% if hour.project.customer %}
\t\t\t\t\t <td>({{hour.project.customer.name}}) {{hour.project.name}} - {{hour.note|raw}}</td>\t
{% else %}
<td>{{hour.project.name}} - {{hour.note|raw}}</td>\t
{% endif %}
{% else %}
\t\t\t\t\t<td>{{hour.note|raw}}</td>\t
\t\t\t\t{% endif %}
\t\t\t\t<td id=\"hour-{{hour.id}}\">{{hour.hours}} ó</td>\t
\t\t\t\t<td id=\"hp-{{hour.id}}\">{{hour.payedHourPrice|format_currency('HUF', {rounding_mode: 'floor', fraction_digit: 0})}}</td>
\t\t\t\t<td id=\"other-{{hour.id}}\">{{hour.otherPrice|format_currency('HUF', {rounding_mode: 'floor', fraction_digit: 0})}}</td>\t
\t\t\t\t<td class=\"text-right\" style=\"padding-right: 3rem !important;\" id=\"sum-{{hour.id}}\">{{((hour.hours*worker.priceHour)+hour.otherPrice)|format_currency('HUF', {rounding_mode: 'floor', fraction_digit: 0})}}</td>\t
\t\t\t\t<td>{{hour.day?hour.day.format('Y-m-d'):'-'}}</td>\t
\t\t\t\t<td>{{hour.created.format('Y-m-d')}}</td>\t
\t\t\t\t{% set sumHour = sumHour + hour.hours %}
\t\t\t\t{% set sum = sum + (hour.hours * hour.payedHourPrice) %}
\t\t\t\t{% set sumOther = sumOther + (hour.otherPrice?hour.otherPrice:0) %}
\t\t\t</tr>
\t\t\t{% endfor %}
\t\t\t<tfoot style=\"background-color: #fafafafa\">
\t\t\t\t<tr>
\t\t\t\t\t<td colspan=\"2\"><strong>Összesen</strong></td>
\t\t\t\t\t<td id=\"sumHours\" >{{sumHour}}</td>
\t\t\t\t\t<td></td>
\t\t\t\t\t<td></td>
\t\t\t\t\t<td></td>
\t\t\t\t\t<td></td>
\t\t\t\t</tr>
\t\t\t\t<tr>
\t\t\t\t\t<td colspan=\"2\"><strong>Fizetendő óra</strong></td>
\t\t\t\t\t<td id=\"sumHoursPrice\">{{(sum)|format_currency('HUF',{fraction_digit: 0}, locale='hu')}}</td>
\t\t\t\t\t<td></td>
\t\t\t\t\t<td></td>
\t\t\t\t\t<td></td>
\t\t\t\t\t<td></td>
\t\t\t\t</tr>
\t\t\t\t<tr>
\t\t\t\t\t<td colspan=\"2\"><strong>Egyéb költség</strong></td>
\t\t\t\t\t<td id=\"sumOther\">{{sumOther|format_currency('HUF',{fraction_digit: 0}, locale='hu')}}</td>
\t\t\t\t\t<td></td>
\t\t\t\t\t<td></td>
\t\t\t\t\t<td></td>
\t\t\t\t\t<td></td>
\t\t\t\t</tr>
\t\t\t\t<tr>
\t\t\t\t\t<td colspan=\"2\"><strong>Teljes fizetendő összeg</strong></td>
\t\t\t\t\t<td><strong id=\"sumTotalStrong\">{{((sum)+sumOther)|format_currency('HUF',{fraction_digit: 0}, locale='hu')}}</strong></td>
\t\t\t\t\t<td><input type=\"hidden\" name=\"sumTotal\" id=\"sumTotal\" value=\"{{(sum)+sumOther}}\"></td>
\t\t\t\t\t<td></td>
\t\t\t\t\t<td></td>
\t\t\t\t\t<td></td>
\t\t\t\t</tr>
\t\t\t</tfoot>
\t\t</table>
<script type=\"text/javascript\">
\t(function(){
\t\twindow.changeWorker = function(){
\t\t\tvar select = document.getElementById('workerSelect');
\t\t\tvar dateSelect = document.getElementById('workerDateSelect');
\t\t\tvar selectedDate = dateSelect ? dateSelect.value : '';
\t\t\tvar url = select.options[select.selectedIndex].dataset.url;
\t\t\tif (url && selectedDate) {
\t\t\t\tvar target = new URL(url, window.location.origin);
\t\t\t\ttarget.searchParams.set('date', selectedDate);
\t\t\t\twindow.location.href = target.toString();
\t\t\t\treturn;
\t\t\t}
\t\t\tif (url) {
\t\t\t\twindow.location.href = url;
\t\t\t}
\t\t};
\t\twindow.changeYear = function(){
\t\t\tvar select = document.getElementById('workerDateSelect');
\t\t\tvar url = select.options[select.selectedIndex].dataset.url;
\t\t\tif (url) {
\t\t\t\twindow.location.href = url;
\t\t\t}
\t\t};
\t})();
\tfunction check(){
\t\t\$('#sumTotal').val(0);
\t\tvar total = 0;
\t\tvar sumHours = 0;
\t\tvar sumHoursPrice = 0;
\t\tvar sumOther = 0;
\t\tvar priceHour = parseInt(\$('#priceHour').val())
\t\t\$('.hour-checkbox:checked').each(function(key,chk){
\t\t\tvar price = parseInt(\$('#sum-'+chk.value).html())
\t\t\tvar other = parseInt(\$('#other-'+chk.value).html())
\t\t\tvar hour = parseFloat(\$('#hour-'+chk.value).html())
\t\t\ttotal = total + price;
\t\t\tif(other > 0){
\t\t\t\tsumOther = sumOther + other;
\t\t\t}
\t\t\tsumHours = sumHours + hour;
\t\t\tsumHoursPrice = sumHoursPrice + (hour*priceHour);
\t\t\t\$('#sumTotalStrong').html(total);
\t\t\t\$('#sumOther').html(sumOther);
\t\t\t\$('#sumHours').html(sumHours);
\t\t\t\$('#sumHoursPrice').html(sumHoursPrice);
\t\t})
\t}
</script>
</div>
{% endblock page_content %}", "workhour/paidView.html.twig", "/home/gortech.hu/domains/munka.gortech.hu/public_html/erp/templates/workhour/paidView.html.twig");
}
}