var/cache/dev/twig/4c/4c5bf352bd3597b4d5f0b844971ead79.php line 66

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* workhour/paidView.html.twig */
  16. class __TwigTemplate_ac5b8beddb32523bb1789f6cb3f55831 extends Template
  17. {
  18. private Source $source;
  19. /**
  20. * @var array<string, Template>
  21. */
  22. private array $macros = [];
  23. public function __construct(Environment $env)
  24. {
  25. parent::__construct($env);
  26. $this->source = $this->getSourceContext();
  27. $this->blocks = [
  28. 'page_content' => [$this, 'block_page_content'],
  29. ];
  30. }
  31. protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  32. {
  33. // line 1
  34. return "@!EasyAdmin/page/content.html.twig";
  35. }
  36. protected function doDisplay(array $context, array $blocks = []): iterable
  37. {
  38. $macros = $this->macros;
  39. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  40. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "workhour/paidView.html.twig"));
  41. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  42. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "workhour/paidView.html.twig"));
  43. $this->parent = $this->load("@!EasyAdmin/page/content.html.twig", 1);
  44. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  45. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  46. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  47. }
  48. // line 3
  49. /**
  50. * @return iterable<null|scalar|\Stringable>
  51. */
  52. public function block_page_content(array $context, array $blocks = []): iterable
  53. {
  54. $macros = $this->macros;
  55. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  56. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_content"));
  57. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  58. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_content"));
  59. // line 4
  60. yield "<div class=\"payview\">
  61. \t<h2>";
  62. // line 5
  63. 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);
  64. yield "
  65. \t\t<select id=\"workerDateSelect\" class=\"form-control form-control-sm col-3 d-inline ml-auto\" style=\"width: 30%; float:right;\" onchange=\"changeYear()\">
  66. \t\t\t";
  67. // line 7
  68. $context['_parent'] = $context;
  69. $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); })()));
  70. foreach ($context['_seq'] as $context["_key"] => $context["w"]) {
  71. // line 8
  72. yield "\t\t\t\t<option ";
  73. 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") : (""));
  74. yield " data-url=\"";
  75. 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);
  76. yield "\">";
  77. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["w"], "html", null, true);
  78. yield "</option>
  79. \t\t\t";
  80. }
  81. $_parent = $context['_parent'];
  82. unset($context['_seq'], $context['_key'], $context['w'], $context['_parent']);
  83. $context = array_intersect_key($context, $_parent) + $_parent;
  84. // line 10
  85. yield "\t\t</select>
  86. \t\t";
  87. // line 11
  88. 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)) {
  89. // line 12
  90. 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()\">
  91. \t\t\t";
  92. // line 13
  93. $context['_parent'] = $context;
  94. $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); })()));
  95. foreach ($context['_seq'] as $context["_key"] => $context["w"]) {
  96. // line 14
  97. yield "\t\t\t\t<option ";
  98. 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") : (""));
  99. yield " value=\"";
  100. 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);
  101. yield "\" ";
  102. 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))) {
  103. yield "selected";
  104. }
  105. yield " data-url=\"";
  106. 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);
  107. yield "\">";
  108. 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);
  109. yield "</option>
  110. \t\t\t";
  111. }
  112. $_parent = $context['_parent'];
  113. unset($context['_seq'], $context['_key'], $context['w'], $context['_parent']);
  114. $context = array_intersect_key($context, $_parent) + $_parent;
  115. // line 16
  116. yield "\t\t</select>
  117. \t\t";
  118. }
  119. // line 18
  120. yield "\t</h2>\t\t<table class=\"table\">
  121. \t\t";
  122. // line 19
  123. $context["sum"] = 0;
  124. // line 20
  125. yield "\t\t";
  126. $context["sumHour"] = 0;
  127. // line 21
  128. yield "\t\t";
  129. $context["sumOther"] = 0;
  130. // line 22
  131. yield "\t\t\t<tr>
  132. \t\t\t\t<th width=\"20px\">Fizetve</th>
  133. \t\t\t\t<th>Projekt</th>
  134. \t\t\t\t<th>Idő</th>
  135. \t\t\t\t<th>Órabér</th>
  136. \t\t\t\t<th>Egyéb költség</th>
  137. \t\t\t\t<th>Összesen</th>
  138. \t\t\t\t<th>Nap</th>
  139. \t\t\t\t<th>Létrehozva</th>
  140. \t\t\t</tr>
  141. \t\t\t";
  142. // line 32
  143. $context['_parent'] = $context;
  144. $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); })()));
  145. foreach ($context['_seq'] as $context["_key"] => $context["hour"]) {
  146. // line 33
  147. yield "\t\t\t<tr id=\"row-";
  148. 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);
  149. yield "\">
  150. \t\t\t\t<td class=\"text-center\"><span class=\"fa text-success fa-";
  151. // line 34
  152. yield (((CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "payed", [], "any", false, false, false, 34) == true)) ? ("coins") : (""));
  153. yield "\"></span></td>\t
  154. \t\t\t\t";
  155. // line 35
  156. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "project", [], "any", false, false, false, 35)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  157. // line 36
  158. yield " \t";
  159. 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)) {
  160. // line 37
  161. yield "\t\t\t\t\t <td>(";
  162. 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);
  163. yield ") ";
  164. 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);
  165. yield " - ";
  166. yield CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "note", [], "any", false, false, false, 37);
  167. yield "</td>\t
  168. ";
  169. } else {
  170. // line 39
  171. yield " <td>";
  172. 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);
  173. yield " - ";
  174. yield CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "note", [], "any", false, false, false, 39);
  175. yield "</td>\t
  176. ";
  177. }
  178. // line 41
  179. yield " ";
  180. } else {
  181. // line 42
  182. yield "\t\t\t\t\t<td>";
  183. yield CoreExtension::getAttribute($this->env, $this->source, $context["hour"], "note", [], "any", false, false, false, 42);
  184. yield "</td>\t
  185. \t\t\t\t";
  186. }
  187. // line 44
  188. yield "\t\t\t\t<td id=\"hour-";
  189. 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);
  190. yield "\">";
  191. 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);
  192. yield " ó</td>\t
  193. \t\t\t\t<td id=\"hp-";
  194. // line 45
  195. 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);
  196. yield "\">";
  197. 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);
  198. yield "</td>
  199. \t\t\t\t<td id=\"other-";
  200. // line 46
  201. 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);
  202. yield "\">";
  203. 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);
  204. yield "</td>\t
  205. \t\t\t\t<td class=\"text-right\" style=\"padding-right: 3rem !important;\" id=\"sum-";
  206. // line 47
  207. 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);
  208. yield "\">";
  209. 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);
  210. yield "</td>\t
  211. \t\t\t\t<td>";
  212. // line 48
  213. 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)) : ("-"));
  214. yield "</td>\t
  215. \t\t\t\t<td>";
  216. // line 49
  217. 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);
  218. yield "</td>\t
  219. \t\t\t\t";
  220. // line 50
  221. $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));
  222. // line 51
  223. yield "\t\t\t\t";
  224. $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)));
  225. // line 52
  226. yield "\t\t\t\t";
  227. $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)));
  228. // line 53
  229. yield "\t\t\t</tr>
  230. \t\t\t";
  231. }
  232. $_parent = $context['_parent'];
  233. unset($context['_seq'], $context['_key'], $context['hour'], $context['_parent']);
  234. $context = array_intersect_key($context, $_parent) + $_parent;
  235. // line 55
  236. yield "\t\t\t<tfoot style=\"background-color: #fafafafa\">
  237. \t\t\t\t<tr>
  238. \t\t\t\t\t<td colspan=\"2\"><strong>Összesen</strong></td>
  239. \t\t\t\t\t<td id=\"sumHours\" >";
  240. // line 58
  241. 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);
  242. yield "</td>
  243. \t\t\t\t\t<td></td>
  244. \t\t\t\t\t<td></td>
  245. \t\t\t\t\t<td></td>
  246. \t\t\t\t\t<td></td>
  247. \t\t\t\t</tr>
  248. \t\t\t\t<tr>
  249. \t\t\t\t\t<td colspan=\"2\"><strong>Fizetendő óra</strong></td>
  250. \t\t\t\t\t<td id=\"sumHoursPrice\">";
  251. // line 66
  252. 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);
  253. yield "</td>
  254. \t\t\t\t\t<td></td>
  255. \t\t\t\t\t<td></td>
  256. \t\t\t\t\t<td></td>
  257. \t\t\t\t\t<td></td>
  258. \t\t\t\t</tr>
  259. \t\t\t\t<tr>
  260. \t\t\t\t\t<td colspan=\"2\"><strong>Egyéb költség</strong></td>
  261. \t\t\t\t\t<td id=\"sumOther\">";
  262. // line 74
  263. 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);
  264. yield "</td>
  265. \t\t\t\t\t<td></td>
  266. \t\t\t\t\t<td></td>
  267. \t\t\t\t\t<td></td>
  268. \t\t\t\t\t<td></td>
  269. \t\t\t\t</tr>
  270. \t\t\t\t<tr>
  271. \t\t\t\t\t<td colspan=\"2\"><strong>Teljes fizetendő összeg</strong></td>
  272. \t\t\t\t\t<td><strong id=\"sumTotalStrong\">";
  273. // line 82
  274. 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);
  275. yield "</strong></td>
  276. \t\t\t\t\t<td><input type=\"hidden\" name=\"sumTotal\" id=\"sumTotal\" value=\"";
  277. // line 83
  278. 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);
  279. yield "\"></td>
  280. \t\t\t\t\t<td></td>
  281. \t\t\t\t\t<td></td>
  282. \t\t\t\t\t<td></td>
  283. \t\t\t\t</tr>
  284. \t\t\t</tfoot>
  285. \t\t</table>
  286. <script type=\"text/javascript\">
  287. \t(function(){
  288. \t\twindow.changeWorker = function(){
  289. \t\t\tvar select = document.getElementById('workerSelect');
  290. \t\t\tvar dateSelect = document.getElementById('workerDateSelect');
  291. \t\t\tvar selectedDate = dateSelect ? dateSelect.value : '';
  292. \t\t\tvar url = select.options[select.selectedIndex].dataset.url;
  293. \t\t\tif (url && selectedDate) {
  294. \t\t\t\tvar target = new URL(url, window.location.origin);
  295. \t\t\t\ttarget.searchParams.set('date', selectedDate);
  296. \t\t\t\twindow.location.href = target.toString();
  297. \t\t\t\treturn;
  298. \t\t\t}
  299. \t\t\tif (url) {
  300. \t\t\t\twindow.location.href = url;
  301. \t\t\t}
  302. \t\t};
  303. \t\twindow.changeYear = function(){
  304. \t\t\tvar select = document.getElementById('workerDateSelect');
  305. \t\t\tvar url = select.options[select.selectedIndex].dataset.url;
  306. \t\t\tif (url) {
  307. \t\t\t\twindow.location.href = url;
  308. \t\t\t}
  309. \t\t};
  310. \t})();
  311. \tfunction check(){
  312. \t\t\$('#sumTotal').val(0);
  313. \t\tvar total = 0;
  314. \t\tvar sumHours = 0;
  315. \t\tvar sumHoursPrice = 0;
  316. \t\tvar sumOther = 0;
  317. \t\tvar priceHour = parseInt(\$('#priceHour').val())
  318. \t\t\$('.hour-checkbox:checked').each(function(key,chk){
  319. \t\t\tvar price = parseInt(\$('#sum-'+chk.value).html())
  320. \t\t\tvar other = parseInt(\$('#other-'+chk.value).html())
  321. \t\t\tvar hour = parseFloat(\$('#hour-'+chk.value).html())
  322. \t\t\ttotal = total + price;
  323. \t\t\tif(other > 0){
  324. \t\t\t\tsumOther = sumOther + other;
  325. \t\t\t}
  326. \t\t\tsumHours = sumHours + hour;
  327. \t\t\tsumHoursPrice = sumHoursPrice + (hour*priceHour);
  328. \t\t\t\$('#sumTotalStrong').html(total);
  329. \t\t\t\$('#sumOther').html(sumOther);
  330. \t\t\t\$('#sumHours').html(sumHours);
  331. \t\t\t\$('#sumHoursPrice').html(sumHoursPrice);
  332. \t\t})
  333. \t}
  334. </script>
  335. </div>
  336. ";
  337. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  338. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  339. yield from [];
  340. }
  341. /**
  342. * @codeCoverageIgnore
  343. */
  344. public function getTemplateName(): string
  345. {
  346. return "workhour/paidView.html.twig";
  347. }
  348. /**
  349. * @codeCoverageIgnore
  350. */
  351. public function isTraitable(): bool
  352. {
  353. return false;
  354. }
  355. /**
  356. * @codeCoverageIgnore
  357. */
  358. public function getDebugInfo(): array
  359. {
  360. 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,);
  361. }
  362. public function getSourceContext(): Source
  363. {
  364. return new Source("{% extends '@!EasyAdmin/page/content.html.twig' %}
  365. {% block page_content %}
  366. <div class=\"payview\">
  367. \t<h2>{{worker}}
  368. \t\t<select id=\"workerDateSelect\" class=\"form-control form-control-sm col-3 d-inline ml-auto\" style=\"width: 30%; float:right;\" onchange=\"changeYear()\">
  369. \t\t\t{% for w in workerDates %}
  370. \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>
  371. \t\t\t{% endfor %}
  372. \t\t</select>
  373. \t\t{% if isAdmin %}
  374. \t\t<select id=\"workerSelect\" class=\"form-control form-control-sm col-3 d-inline ml-auto\" style=\"width: 30%; float:right;\" onchange=\"changeWorker()\">
  375. \t\t\t{% for w in workers %}
  376. \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>
  377. \t\t\t{% endfor %}
  378. \t\t</select>
  379. \t\t{% endif %}
  380. \t</h2>\t\t<table class=\"table\">
  381. \t\t{% set sum=0 %}
  382. \t\t{% set sumHour=0 %}
  383. \t\t{% set sumOther=0 %}
  384. \t\t\t<tr>
  385. \t\t\t\t<th width=\"20px\">Fizetve</th>
  386. \t\t\t\t<th>Projekt</th>
  387. \t\t\t\t<th>Idő</th>
  388. \t\t\t\t<th>Órabér</th>
  389. \t\t\t\t<th>Egyéb költség</th>
  390. \t\t\t\t<th>Összesen</th>
  391. \t\t\t\t<th>Nap</th>
  392. \t\t\t\t<th>Létrehozva</th>
  393. \t\t\t</tr>
  394. \t\t\t{% for hour in hours %}
  395. \t\t\t<tr id=\"row-{{hour.id}}\">
  396. \t\t\t\t<td class=\"text-center\"><span class=\"fa text-success fa-{{(hour.payed == true)? \"coins\": \"\"}}\"></span></td>\t
  397. \t\t\t\t{% if hour.project %}
  398. \t{% if hour.project.customer %}
  399. \t\t\t\t\t <td>({{hour.project.customer.name}}) {{hour.project.name}} - {{hour.note|raw}}</td>\t
  400. {% else %}
  401. <td>{{hour.project.name}} - {{hour.note|raw}}</td>\t
  402. {% endif %}
  403. {% else %}
  404. \t\t\t\t\t<td>{{hour.note|raw}}</td>\t
  405. \t\t\t\t{% endif %}
  406. \t\t\t\t<td id=\"hour-{{hour.id}}\">{{hour.hours}} ó</td>\t
  407. \t\t\t\t<td id=\"hp-{{hour.id}}\">{{hour.payedHourPrice|format_currency('HUF', {rounding_mode: 'floor', fraction_digit: 0})}}</td>
  408. \t\t\t\t<td id=\"other-{{hour.id}}\">{{hour.otherPrice|format_currency('HUF', {rounding_mode: 'floor', fraction_digit: 0})}}</td>\t
  409. \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
  410. \t\t\t\t<td>{{hour.day?hour.day.format('Y-m-d'):'-'}}</td>\t
  411. \t\t\t\t<td>{{hour.created.format('Y-m-d')}}</td>\t
  412. \t\t\t\t{% set sumHour = sumHour + hour.hours %}
  413. \t\t\t\t{% set sum = sum + (hour.hours * hour.payedHourPrice) %}
  414. \t\t\t\t{% set sumOther = sumOther + (hour.otherPrice?hour.otherPrice:0) %}
  415. \t\t\t</tr>
  416. \t\t\t{% endfor %}
  417. \t\t\t<tfoot style=\"background-color: #fafafafa\">
  418. \t\t\t\t<tr>
  419. \t\t\t\t\t<td colspan=\"2\"><strong>Összesen</strong></td>
  420. \t\t\t\t\t<td id=\"sumHours\" >{{sumHour}}</td>
  421. \t\t\t\t\t<td></td>
  422. \t\t\t\t\t<td></td>
  423. \t\t\t\t\t<td></td>
  424. \t\t\t\t\t<td></td>
  425. \t\t\t\t</tr>
  426. \t\t\t\t<tr>
  427. \t\t\t\t\t<td colspan=\"2\"><strong>Fizetendő óra</strong></td>
  428. \t\t\t\t\t<td id=\"sumHoursPrice\">{{(sum)|format_currency('HUF',{fraction_digit: 0}, locale='hu')}}</td>
  429. \t\t\t\t\t<td></td>
  430. \t\t\t\t\t<td></td>
  431. \t\t\t\t\t<td></td>
  432. \t\t\t\t\t<td></td>
  433. \t\t\t\t</tr>
  434. \t\t\t\t<tr>
  435. \t\t\t\t\t<td colspan=\"2\"><strong>Egyéb költség</strong></td>
  436. \t\t\t\t\t<td id=\"sumOther\">{{sumOther|format_currency('HUF',{fraction_digit: 0}, locale='hu')}}</td>
  437. \t\t\t\t\t<td></td>
  438. \t\t\t\t\t<td></td>
  439. \t\t\t\t\t<td></td>
  440. \t\t\t\t\t<td></td>
  441. \t\t\t\t</tr>
  442. \t\t\t\t<tr>
  443. \t\t\t\t\t<td colspan=\"2\"><strong>Teljes fizetendő összeg</strong></td>
  444. \t\t\t\t\t<td><strong id=\"sumTotalStrong\">{{((sum)+sumOther)|format_currency('HUF',{fraction_digit: 0}, locale='hu')}}</strong></td>
  445. \t\t\t\t\t<td><input type=\"hidden\" name=\"sumTotal\" id=\"sumTotal\" value=\"{{(sum)+sumOther}}\"></td>
  446. \t\t\t\t\t<td></td>
  447. \t\t\t\t\t<td></td>
  448. \t\t\t\t\t<td></td>
  449. \t\t\t\t</tr>
  450. \t\t\t</tfoot>
  451. \t\t</table>
  452. <script type=\"text/javascript\">
  453. \t(function(){
  454. \t\twindow.changeWorker = function(){
  455. \t\t\tvar select = document.getElementById('workerSelect');
  456. \t\t\tvar dateSelect = document.getElementById('workerDateSelect');
  457. \t\t\tvar selectedDate = dateSelect ? dateSelect.value : '';
  458. \t\t\tvar url = select.options[select.selectedIndex].dataset.url;
  459. \t\t\tif (url && selectedDate) {
  460. \t\t\t\tvar target = new URL(url, window.location.origin);
  461. \t\t\t\ttarget.searchParams.set('date', selectedDate);
  462. \t\t\t\twindow.location.href = target.toString();
  463. \t\t\t\treturn;
  464. \t\t\t}
  465. \t\t\tif (url) {
  466. \t\t\t\twindow.location.href = url;
  467. \t\t\t}
  468. \t\t};
  469. \t\twindow.changeYear = function(){
  470. \t\t\tvar select = document.getElementById('workerDateSelect');
  471. \t\t\tvar url = select.options[select.selectedIndex].dataset.url;
  472. \t\t\tif (url) {
  473. \t\t\t\twindow.location.href = url;
  474. \t\t\t}
  475. \t\t};
  476. \t})();
  477. \tfunction check(){
  478. \t\t\$('#sumTotal').val(0);
  479. \t\tvar total = 0;
  480. \t\tvar sumHours = 0;
  481. \t\tvar sumHoursPrice = 0;
  482. \t\tvar sumOther = 0;
  483. \t\tvar priceHour = parseInt(\$('#priceHour').val())
  484. \t\t\$('.hour-checkbox:checked').each(function(key,chk){
  485. \t\t\tvar price = parseInt(\$('#sum-'+chk.value).html())
  486. \t\t\tvar other = parseInt(\$('#other-'+chk.value).html())
  487. \t\t\tvar hour = parseFloat(\$('#hour-'+chk.value).html())
  488. \t\t\ttotal = total + price;
  489. \t\t\tif(other > 0){
  490. \t\t\t\tsumOther = sumOther + other;
  491. \t\t\t}
  492. \t\t\tsumHours = sumHours + hour;
  493. \t\t\tsumHoursPrice = sumHoursPrice + (hour*priceHour);
  494. \t\t\t\$('#sumTotalStrong').html(total);
  495. \t\t\t\$('#sumOther').html(sumOther);
  496. \t\t\t\$('#sumHours').html(sumHours);
  497. \t\t\t\$('#sumHoursPrice').html(sumHoursPrice);
  498. \t\t})
  499. \t}
  500. </script>
  501. </div>
  502. {% endblock page_content %}", "workhour/paidView.html.twig", "/home/gortech.hu/domains/munka.gortech.hu/public_html/erp/templates/workhour/paidView.html.twig");
  503. }
  504. }