/
var
/
www
/
html
/
restaurants
/
var
/
cache
/
prod
/
twig
/
9a
/
Upload File
HOME
<?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; /* Stock/editsupply.html.twig */ class __TwigTemplate_48871afb427ab31d9d4f25143b8a95d7360a03a2ed57465b91da9f34cf07075e extends Template { private $source; private $macros = []; public function __construct(Environment $env) { parent::__construct($env); $this->source = $this->getSourceContext(); $this->blocks = [ 'stylesheets' => [$this, 'block_stylesheets'], 'content' => [$this, 'block_content'], 'javascripts' => [$this, 'block_javascripts'], ]; } protected function doGetParent(array $context) { // line 1 return "base1.html.twig"; } protected function doDisplay(array $context, array $blocks = []) { $macros = $this->macros; $this->parent = $this->loadTemplate("base1.html.twig", "Stock/editsupply.html.twig", 1); $this->parent->display($context, array_merge($this->blocks, $blocks)); } // line 3 public function block_stylesheets($context, array $blocks = []) { $macros = $this->macros; // line 4 echo "\t"; $this->displayParentBlock("stylesheets", $context, $blocks); echo " \t<link rel=\"stylesheet\" href=\""; // line 5 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("css/jquery-ui.css"), "html", null, true); echo "\"> "; } // line 8 public function block_content($context, array $blocks = []) { $macros = $this->macros; // line 9 echo "\t<div class=\"content\"> \t\t<div class=\"card\"> \t\t\t<div class=\"card-body\"> \t\t\t\t<form action=\""; // line 12 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("updatesupply", ["id" => twig_get_attribute($this->env, $this->source, ($context["supply"] ?? null), "id", [], "any", false, false, false, 12)]), "html", null, true); echo "\" method=\"POST\" name=\"supply\"> \t\t\t\t\t<div class=\"row\"> \t\t\t\t\t\t<div class=\"col-sm-5\"> \t\t\t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t\t\t<input type=\"text\" name=\"date\" class=\"form-control\" id=\"datepicker\" autocomplete=\"off\" value=\""; // line 16 echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["supply"] ?? null), "date", [], "any", false, false, false, 16), "d/m/Y"), "html", null, true); echo "\" required> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t\t\t<select class=\"form-control\" name=\"supplier\" required> \t\t\t\t\t\t\t\t\t<option value=\"\">Select Supplier</option> \t\t\t\t\t\t\t\t\t"; // line 21 $context['_parent'] = $context; $context['_seq'] = twig_ensure_traversable(($context["supplier"] ?? null)); foreach ($context['_seq'] as $context["_key"] => $context["item"]) { // line 22 echo "\t\t\t\t\t\t\t\t\t\t<option value=\""; echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 22), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, twig_upper_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "name", [], "any", false, false, false, 22)), "html", null, true); echo "</option> \t\t\t\t\t\t\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 24 echo "\t\t\t\t\t\t\t\t</select> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t</div> \t\t\t\t\t\t<div class=\"col-sm-7\"> \t\t\t\t\t\t\t<h3>Supply Items</h3> \t\t\t\t\t\t\t<table class=\"table\"> \t\t\t\t\t\t\t\t<tr> \t\t\t\t\t\t\t\t\t<th>Name</th> \t\t\t\t\t\t\t\t\t<th>Quantity</th> \t\t\t\t\t\t\t\t\t<th>Amount</th> \t\t\t\t\t\t\t\t\t<th>Delete</th> \t\t\t\t\t\t\t\t</tr> \t\t\t\t\t\t\t\t"; // line 36 $context['_parent'] = $context; $context['_seq'] = twig_ensure_traversable(($context["supplyitems"] ?? null)); foreach ($context['_seq'] as $context["_key"] => $context["item"]) { // line 37 echo "\t\t\t\t\t\t\t\t\t<tr> \t\t\t\t\t\t\t\t\t\t<td>"; // line 38 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "name", [], "any", false, false, false, 38), "html", null, true); echo "</td> \t\t\t\t\t\t\t\t\t\t<td>"; // line 39 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "quantity", [], "any", false, false, false, 39), "html", null, true); echo "</td> \t\t\t\t\t\t\t\t\t\t<td>"; // line 40 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "amount", [], "any", false, false, false, 40), "html", null, true); echo "</td> \t\t\t\t\t\t\t\t\t\t<td> \t\t\t\t\t\t\t\t\t\t\t<a href=\""; // line 42 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("deleteSupplyItem", ["id" => twig_get_attribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 42)]), "html", null, true); echo "\" class=\"btn btn-danger delete-item\" data-id=\""; echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 42), "html", null, true); echo "\"> \t\t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-times\"></i> \t\t\t\t\t\t\t\t\t\t\t</a> \t\t\t\t\t\t\t\t\t\t</td> \t\t\t\t\t\t\t\t\t</tr>\t\t\t\t\t\t \t\t\t\t\t\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 48 echo "\t\t\t\t\t\t\t</table> \t\t\t\t\t\t</div> \t\t\t\t\t</div> \t\t\t\t\t<div class=\"col-sm-12 supply-items\"> \t\t\t\t\t\t<h3>Add Supply Items</h3> \t\t\t\t\t\t \t\t\t\t\t\t<div id=\"stockitems\"> \t\t\t\t\t\t\t<div class=\"row\" id=\"initial\"> \t\t\t\t\t\t\t\t<div class=\"col-sm-12 col-md-4 col-xs-12\"> \t\t\t\t\t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t\t\t\t\t<select class=\"form-control stock-item select-list ajaxSelect\" name=\"item[]\" > \t\t\t\t\t\t\t\t\t\t\t<option value=\"\">Select Inventory Item</option> \t\t\t\t\t\t\t\t\t\t\t"; // line 60 $context['_parent'] = $context; $context['_seq'] = twig_ensure_traversable(($context["stockitems"] ?? null)); foreach ($context['_seq'] as $context["_key"] => $context["item"]) { // line 61 echo "\t\t\t\t\t\t\t\t\t\t\t\t<option value=\""; echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 61), "html", null, true); echo "|"; echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "unit", [], "any", false, false, false, 61), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, twig_upper_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "name", [], "any", false, false, false, 61)), "html", null, true); echo " ("; echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "quantity", [], "any", false, false, false, 61), "html", null, true); echo ")</option> \t\t\t\t\t\t\t\t\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 63 echo "\t\t\t\t\t\t\t\t\t\t\t<option value=\"-1\">New Inventory Item</option> \t\t\t\t\t\t\t\t\t\t</select> \t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t<div class=\"col-sm-12 col-md-4 col-xs-12\"> \t\t\t\t\t\t\t\t\t<div class=\"input-group\"> \t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"quantity[]\" placeholder=\"Quantity\" class=\"form-control\"> \t\t\t\t\t\t\t\t\t\t<div class=\"input-group-append\"> \t\t\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\"></span> \t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t<div class=\"col-sm-12 col-md-4 col-xs-12\"> \t\t\t\t\t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"amount[]\" placeholder=\"Amount\" class=\"form-control\"> \t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t<div class=\"col-sm-12 col-md-4 col-xs-12 stockitem\"> \t\t\t\t\t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"stock[]\" placeholder=\"Item Name\" class=\"form-control\"> \t\t\t\t\t\t\t\t\t\t<select name=\"unit\" class=\"form-control\"> \t\t\t\t\t\t\t\t\t\t\t<option value=\"\">Select Unit</option> \t\t\t\t\t\t\t\t\t\t\t<option value=\"pieces\">pieces</option> \t\t\t\t\t\t\t\t\t\t\t<option value=\"packets\">packets</option> \t\t\t\t\t\t\t\t\t\t\t<option value=\"bags\">bags</option> \t\t\t\t\t\t\t\t\t\t\t<option value=\"cups\">cups</option> \t\t\t\t\t\t\t\t\t\t\t<option value=\"ml\">ml</option> \t\t\t\t\t\t\t\t\t\t\t<option value=\"cl\">cl</option> \t\t\t\t\t\t\t\t\t\t\t<option value=\"l\">l</option> \t\t\t\t\t\t\t\t\t\t\t<option value=\"g\">g</option> \t\t\t\t\t\t\t\t\t\t\t<option value=\"kg\">kg</option> \t\t\t\t\t\t\t\t\t\t</select> \t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t</div> \t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-primary\">Save</button> \t\t\t\t\t\t<div> \t\t\t\t\t\t\t<button type=\"button\" id=\"add-item\" class=\"btn btn-primary pull-right\">+</button> \t\t\t\t\t\t</div> \t\t\t\t\t</div> \t\t\t\t\t \t\t\t\t\t \t\t\t\t</form> \t\t\t</div> \t\t</div> \t</div> \t "; } // line 113 public function block_javascripts($context, array $blocks = []) { $macros = $this->macros; // line 114 echo "\t"; $this->displayParentBlock("javascripts", $context, $blocks); echo " \t \t<script src=\""; // line 116 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("js/admin.js"), "html", null, true); echo "\"></script> \t<script src=\""; // line 117 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("js/itemselect.js"), "html", null, true); echo "\"></script> \t<script> \t\t\$( \"#datepicker\" ).datepicker(); \t\t// \$( \"#datepicker\" ).datepicker(\"option\", \"dateFormat\", \"dd/mm/yy\"); \t\tvar supplier = \""; // line 122 echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["supply"] ?? null), "supplier", [], "any", false, true, false, 122), "id", [], "any", true, true, false, 122)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["supply"] ?? null), "supplier", [], "any", false, true, false, 122), "id", [], "any", false, false, false, 122), "")) : ("")), "html", null, true); echo "\"; \t\tif(supplier) { \t\t\tdocument.forms.supply.supplier.value = supplier; \t\t} \t\t\$('#stockitems').on('change', '.select-list', function(e){ \t\t\tvar \$target = \$(e.currentTarget) \t\t\tif (\$target.val() === -1) { \t\t\t\t\$target.closest('.row').find('.input-group-text').hide() \t\t\t\treturn; \t\t\t} \t\t\tvar split = \$target.val().split(\"|\") \t\t\tvar unit = split[1]; \t\t\t\$target.closest('.row').find('.input-group-text').show().html(unit); \t\t}) \t\tvar selectTemplate = (items) => ` \t\t\t<select class=\"form-control stock-item\" name=\"item[]\" required> \t\t\t\t<option value=\"\">Select Inventory Item</option> \t\t\t\t\${items.map(option => optionTemplate(option)).join(\"\")} \t\t\t\t<option value=\"-1\">New Inventory Item</option> \t\t\t</select> \t\t` \t\tvar itemRow = items => ` \t\t\t<hr> \t\t\t<div class=\"row\" style=\"padding-top: 13px;\"> \t\t\t\t<div class=\"col-sm-12 col-md-4 col-xs-12\"> \t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t\${selectTemplate(items)} \t\t\t\t\t</div> \t\t\t\t</div> \t\t\t\t<div class=\"col-sm-12 col-md-4 col-xs-12\"> \t\t\t\t\t<div class=\"input-group\"> \t\t\t\t\t\t<input type=\"text\" name=\"quantity[]\" placeholder=\"Quantity\" class=\"form-control\"> \t\t\t\t\t\t<div class=\"input-group-append\"> \t\t\t\t\t\t\t<span class=\"input-group-text\"></span> \t\t\t\t\t\t</div> \t\t\t\t\t</div> \t\t\t\t</div> \t\t\t\t<div class=\"col-sm-3\"> \t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t<input type=\"text\" name=\"amount[]\" placeholder=\"Amount\" class=\"form-control\"> \t\t\t\t\t</div> \t\t\t\t</div> \t\t\t\t \t\t\t\t<div class=\"col-sm-12 col-md-4 col-xs-12 stockitem\"> \t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t<input type=\"text\" name=\"stock[]\" placeholder=\"Item Name\" class=\"form-control\"> \t\t\t\t\t\t<select name=\"unit\" class=\"form-control\" required> \t\t\t\t\t\t\t<option value=\"\">Select Unit</option> \t\t\t\t\t\t\t<option value=\"pieces\">pieces</option> \t\t\t\t\t\t\t<option value=\"packets\">packets</option> \t\t\t\t\t\t\t<option value=\"bags\">bags</option> \t\t\t\t\t\t\t<option value=\"cups\">cups</option> \t\t\t\t\t\t\t<option value=\"ml\">ml</option> \t\t\t\t\t\t\t<option value=\"cl\">cl</option> \t\t\t\t\t\t\t<option value=\"l\">l</option> \t\t\t\t\t\t\t<option value=\"g\">g</option> \t\t\t\t\t\t\t<option value=\"kg\">kg</option> \t\t\t\t\t\t</select> \t\t\t\t\t</div> \t\t\t\t</div> \t\t\t\t<div class=\"col-sm-1 cancel-button\" style=\"display: flex;\"> \t\t\t\t\t<button style=\"margin:auto;\" type=\"button\" class=\"btn btn-danger\"><i class=\"fa fa-times\"></i></button> \t\t\t\t</div> \t\t\t\t \t\t\t</div> \t\t`; \t</script> "; } public function getTemplateName() { return "Stock/editsupply.html.twig"; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 257 => 122, 249 => 117, 245 => 116, 239 => 114, 235 => 113, 183 => 63, 168 => 61, 164 => 60, 150 => 48, 136 => 42, 131 => 40, 127 => 39, 123 => 38, 120 => 37, 116 => 36, 102 => 24, 91 => 22, 87 => 21, 79 => 16, 72 => 12, 67 => 9, 63 => 8, 57 => 5, 52 => 4, 48 => 3, 37 => 1,); } public function getSourceContext() { return new Source("", "Stock/editsupply.html.twig", "/var/www/html/restaurants/templates/Stock/editsupply.html.twig"); } }