<?php

/* VGMWOBundle:WorkOrder:show.html.twig */
class __TwigTemplate_255b24cc567de388201f18e994bdbfa68f7ad5542d60f85ab7c52d9e4b4f7d7e extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        // line 1
        $this->parent = $this->loadTemplate("VGMWOBundle::layout.html.twig", "VGMWOBundle:WorkOrder:show.html.twig", 1);
        $this->blocks = array(
            'stylesheets' => array($this, 'block_stylesheets'),
            'content' => array($this, 'block_content'),
            'workorder_data' => array($this, 'block_workorder_data'),
            'workorder_tasks' => array($this, 'block_workorder_tasks'),
            'workorder_stocks' => array($this, 'block_workorder_stocks'),
            'stock_searching' => array($this, 'block_stock_searching'),
            'stock_showing' => array($this, 'block_stock_showing'),
            'message' => array($this, 'block_message'),
            'stock_invoices_manager' => array($this, 'block_stock_invoices_manager'),
            'javascripts' => array($this, 'block_javascripts'),
        );
    }

    protected function doGetParent(array $context)
    {
        return "VGMWOBundle::layout.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 3
    public function block_stylesheets($context, array $blocks = array())
    {
        // line 4
        echo "    ";
        $this->displayParentBlock("stylesheets", $context, $blocks);
        echo "
    <link href=\"";
        // line 5
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/css/bootstrap-datetimepicker.css"), "html", null, true);
        echo "\" rel=\"stylesheet\" media=\"screen\">
    <link href=\"https://cdn.datatables.net/buttons/1.0.3/css/buttons.dataTables.min.css\" rel=\"stylesheet\" media=\"screen\">
";
    }

    // line 8
    public function block_content($context, array $blocks = array())
    {
        // line 9
        echo "    <div class=\"container\">
    <div class=\"form-group container-fluid\">
        <div class=\"row\">
            ";
        // line 12
        $this->displayBlock('workorder_data', $context, $blocks);
        // line 15
        echo "            ";
        $this->displayBlock('workorder_tasks', $context, $blocks);
        // line 18
        echo "            ";
        $this->displayBlock('workorder_stocks', $context, $blocks);
        // line 21
        echo "        </div>
    </div>
    <div class=\"row container-fluid text-right\" style=\"margin-bottom: 3vmin;\">
        ";
        // line 28
        echo "        ";
        if (((($this->env->getExtension('security')->isGranted("ROLE_ADMIN") || $this->env->getExtension('security')->isGranted("ROLE_SUPER_SUPERVISOR")) || $this->env->getExtension('security')->isGranted("ROLE_OTS_CORDINATOR")) || $this->env->getExtension('security')->isGranted("ROLE_SUPERVISOR"))) {
            // line 30
            echo "        <a class=\"btn btn-primary\" href=\"#\"
           data-bind=\"click: chosenwo().update_myself_back\">
            Update";
            // line 33
            echo "        </a>
        ";
        }
        // line 35
        echo "        <a class=\"btn btn-warning\" href=\"";
        echo $this->env->getExtension('routing')->getPath("workorders");
        echo "\">
            Cancel
        </a>
    </div>
        ";
        // line 40
        echo "    </div>
    <!-- Modals -->
    <!-- Stock Wizard-->
    <!-- Stock Searching Wizard-->
    ";
        // line 44
        $this->displayBlock('stock_searching', $context, $blocks);
        // line 47
        echo "    <!-- Stock Showing Wizard-->
    ";
        // line 48
        $this->displayBlock('stock_showing', $context, $blocks);
        // line 51
        echo "    <!-- Stock Editing Wizard-->
    <div class=\"modal fade bs-example-modal-lg\"
         id=\"editing-stock\"
         tabindex=\"-1\"
         role=\"dialog\"
         aria-labelledby=\"myModalLabel\"
         aria-hidden=\"true\">
        <div class=\"modal-dialog modal-lg\">
            <div class=\"modal-content\">
                <div class=\"modal-header\">
                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\">
                        <span aria-hidden=\"true\">&times;</span>
                        <span class=\"sr-only\">Cancel</span>
                    </button>
                    <h4 id=\"stock-data-header\" class=\"modal-title\">Edit stock</h4>
                </div>
                <div id=\"stockModalPreView\" class=\"modal-body\">
                    <div class=\"container-fluid\"
                         style=\"padding: 0px;\">
                        <div data-bind=\"attr:{class: chosenwo().editing_stock() == null ?
                                                    'col-xs-12 text-center' : 'col-xs-7 text-center'}\">
                            <img class=\"img\"
                                 data-bind=\"attr:{src: chosenwo().editing_stock() != null ?
                                        chosenwo().editing_stock().picture() != null ?
                                         chosenwo().editing_stock().picture() :
                                        '";
        // line 76
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/images/unknown-wo.png"), "html", null, true);
        echo "' :
                                        '";
        // line 77
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/images/unknown-wo.png"), "html", null, true);
        echo "'}\"/>
                        </div>

                        <div class=\"col-xs-5\" data-bind=\"visible: chosenwo().editing_stock() != null\">
                            <div id=\"stock_data\" class=\"table-responsive\" style=\"padding-left: 0px;\"
                                 data-bind=\"with: chosenwo().editing_stock\">
                                <table class=\"table table-striped table-hover\">
                                    <tbody class=\"stocks_list\">
                                    <tr>
                                        <td class=\"col-md-5\" style=\"text-align: right; padding: 0 2px;\">
                                            <strong>Stock No:</strong>
                                        </td>
                                        <td id=\"data-stock\" class=\"col-md-7\"
                                            style=\"padding: 0 2px;\">
                                            <input class=\"form-control for-desktop\" data-bind=\"value: stock\"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class=\"col-md-5\" style=\"text-align: right; padding: 0 2px;\">
                                            <strong>Serial No:</strong>
                                        </td>
                                        <td id=\"data-serial\" class=\"col-md-7\"
                                            style=\"padding: 0 2px;\">
                                            <input class=\"form-control for-desktop\" data-bind=\"value: serial\"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class=\"col-md-5\" style=\"text-align: right; padding: 0 2px;\">
                                            <strong>Equipment:</strong>
                                        </td>
                                        <td id=\"data-serial\" class=\"col-md-7\"
                                            style=\"padding: 0 2px;\">
                                            <select class=\"form-control for-desktop\"
                                                    tabindex=\"1\"
                                                    data-bind=\"options: \$root.equipments(),
                                                                               optionsCaption: 'Equipment',
                                                                               optionsText: 'name',
                                                                               value: equipment\">
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class=\"col-md-5\" style=\"text-align: right; padding: 0 2px;\">
                                            <strong>Hours/Miles:</strong>
                                        </td>
                                        <td id=\"data-hour-time\" class=\"col-md-7\"
                                            style=\"padding: 0 2px;\">
                                            <input class=\"form-control for-desktop\" data-bind=\"value: hours_miles\"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class=\"col-md-5\" style=\"text-align: right; padding: 0 2px;\">
                                            <strong>Make:</strong>
                                        </td>
                                        <td id=\"data-make\" class=\"col-md-7\"
                                            style=\"padding: 0 2px;\">
                                            <input class=\"form-control for-desktop\" data-bind=\"value: brand\"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class=\"col-md-5\" style=\"text-align: right; padding: 0 2px;\">
                                            <strong>Model:</strong>
                                        </td>
                                        <td id=\"data-model\" class=\"col-md-7\"
                                            style=\"padding: 0 2px;\">
                                            <input class=\"form-control for-desktop\" data-bind=\"value: model\"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class=\"col-md-5\" style=\"text-align: right; padding: 0 2px;\">
                                            <strong>Cap:</strong>
                                        </td>
                                        <td id=\"data-cap\" class=\"col-md-7\"
                                            style=\"padding: 0 2px;\">
                                            <input class=\"form-control for-desktop\" data-bind=\"value: cap\"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class=\"col-md-5\" style=\"text-align: right; padding: 0 2px;\">
                                            <strong>Tran/Gen/Com:</strong>
                                        </td>
                                        <td id=\"data-tgc\" class=\"col-md-7\"
                                            style=\"padding: 0 2px;\">
                                            <input class=\"form-control for-desktop\" data-bind=\"value: tgc\"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class=\"col-md-5\" style=\"text-align: right; padding: 0 2px;\">
                                            <strong>Engine:</strong>
                                        </td>
                                        <td id=\"data-engine\" class=\"col-md-7\"
                                            style=\"padding: 0 2px;\">
                                            <input class=\"form-control for-desktop\" data-bind=\"value: engine\"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class=\"col-md-5\" style=\"text-align: right; padding: 0 2px;\">
                                            <strong>Year:</strong>
                                        </td>
                                        <td id=\"data-year\" class=\"col-md-7\"
                                            style=\"padding: 0 2px;\">
                                            <input class=\"form-control for-desktop\" data-bind=\"value: year\"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class=\"col-md-5\" style=\"text-align: right; padding: 0 2px;\">
                                            <strong>Localization:</strong>
                                        </td>
                                        <td id=\"data-loc\" class=\"col-md-7\"
                                            style=\"padding: 0 2px;\">
                                            <input class=\"form-control for-desktop\" data-bind=\"value: loc\"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class=\"col-md-5\" style=\"text-align: right; padding: 0 2px;\">
                                            <strong>Actual Condition:</strong>
                                        </td>
                                        <td id=\"data-acond\" class=\"col-md-7\"
                                            style=\"padding: 0 2px;\">
                                            <input class=\"form-control for-desktop\" data-bind=\"value: acond\"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class=\"col-md-5\" style=\"text-align: right; padding: 0 2px;\">
                                            <strong>Work Order:</strong>
                                        </td>
                                        <td id=\"data-wo\" class=\"col-md-7\"
                                            style=\"padding: 0 2px;\">
                                            <input class=\"form-control for-desktop\" data-bind=\"value: actual_workorder\"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan=\"2\">
                                            <strong>Condition: </strong>
                                            <textarea class=\"form-control\" data-bind=\"value: cond\"></textarea>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
                <div class=\"modal-footer\" data-bind=\"with: chosenwo().editing_stock\">
                    <button id=\"stock-modal-cancel-button\" type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">
                        Cancel
                    </button>
                    <button id=\"stock-modal-cancel-button\" type=\"button\"
                            class=\"btn btn-primary\" data-dismiss=\"modal\"
                            data-bind=\"click: save_me\">
                        Save
                    </button>
                </div>
            </div>
        </div>
    </div>
    <!-- Message if there's no stock for this number -->
    <div class=\"modal fade bs-example-modal-lg\"
         id=\"alternative-message\"
         tabindex=\"-1\"
         role=\"dialog\"
         aria-labelledby=\"myModalLabel\"
         aria-hidden=\"true\">
        <div class=\"modal-dialog modal-lg\">
            <div class=\"modal-content\">
                <div class=\"modal-header\">
                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\">
                        <span aria-hidden=\"true\">&times;</span>
                        <span class=\"sr-only\">Cancel</span>
                    </button>
                    <h4 class=\"modal-title\">Question???</h4>
                </div>
                <div class=\"modal-body\">
                    <div class=\"container-fluid\"
                         style=\"padding: 0px;\">
                        <div style=\"font-size: 18px;\">
                            <p>There's no stock uploaded with that number...</p>
                            <p>Do you want to create a new one. This new stock will be\\\\n updated as soon as it's
                                uploded to \"http://www.aeroservicios.com\".</p>
                            <p>Click Create to generate a new stock or Cancel to close this wizard.</p>
                        </div>
                    </div>
                </div>
                <div class=\"modal-footer\">
                    <button id=\"stock-modal-cancel-button\" type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">
                        Cancel
                    </button>
                    <button id=\"stock-modal-cancel-button\" type=\"button\"
                            class=\"btn btn-primary\" data-dismiss=\"modal\"
                            data-bind=\"click: chosenwo().create_stock\">
                        Create
                    </button>
                </div>
            </div>
        </div>
    </div>
    <!-- Saved Message-->
    <div class=\"modal fade bs-example-modal-lg\"
         id=\"saved-message\"
         tabindex=\"-1\"
         role=\"dialog\"
         aria-labelledby=\"myModalLabel\"
         aria-hidden=\"true\">
        <div class=\"modal-dialog modal-lg\">
            <div class=\"modal-content\">
                <div class=\"modal-header\">
                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\">
                        <span aria-hidden=\"true\">&times;</span>
                        <span class=\"sr-only\">Cancel</span>
                    </button>
                    <h4 class=\"modal-title\">Success!!!</h4>
                </div>
                <div class=\"modal-body\">
                    <div class=\"container-fluid\"
                         style=\"padding: 0px;\">
                        <div style=\"font-size: 18px;\">
                            <p>All data have been saved successfully!</p>
                            <p class=\"text-muted\">Todos los datos fueron guardados correctamente!</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    ";
        // line 301
        $this->displayBlock('message', $context, $blocks);
        // line 302
        echo "    ";
        $this->displayBlock('stock_invoices_manager', $context, $blocks);
    }

    // line 12
    public function block_workorder_data($context, array $blocks = array())
    {
        // line 13
        echo "                ";
        $this->loadTemplate("VGMWOBundle:WorkOrder/Show_parts:workorder_data.html.twig", "VGMWOBundle:WorkOrder:show.html.twig", 13)->display($context);
        // line 14
        echo "            ";
    }

    // line 15
    public function block_workorder_tasks($context, array $blocks = array())
    {
        // line 16
        echo "                ";
        $this->loadTemplate("VGMWOBundle:WorkOrder/Show_parts:workorder_planning.html.twig", "VGMWOBundle:WorkOrder:show.html.twig", 16)->display($context);
        // line 17
        echo "            ";
    }

    // line 18
    public function block_workorder_stocks($context, array $blocks = array())
    {
        // line 19
        echo "                ";
        $this->loadTemplate("VGMWOBundle:WorkOrder/Show_parts:workorder_stocks.html.twig", "VGMWOBundle:WorkOrder:show.html.twig", 19)->display($context);
        // line 20
        echo "            ";
    }

    // line 44
    public function block_stock_searching($context, array $blocks = array())
    {
        // line 45
        echo "        ";
        $this->loadTemplate("VGMWOBundle:WorkOrder/ModalPanels:modal_search_add_stock.html.twig", "VGMWOBundle:WorkOrder:show.html.twig", 45)->display($context);
        // line 46
        echo "    ";
    }

    // line 48
    public function block_stock_showing($context, array $blocks = array())
    {
        // line 49
        echo "        ";
        $this->loadTemplate("VGMWOBundle:WorkOrder/ModalPanels:modal_show_stock.html.twig", "VGMWOBundle:WorkOrder:show.html.twig", 49)->display($context);
        // line 50
        echo "    ";
    }

    // line 301
    public function block_message($context, array $blocks = array())
    {
        $this->loadTemplate("VGMWOBundle:Menssage:message.html.twig", "VGMWOBundle:WorkOrder:show.html.twig", 301)->display($context);
    }

    // line 302
    public function block_stock_invoices_manager($context, array $blocks = array())
    {
        $this->loadTemplate("VGMWOBundle:WorkOrder/ModalPanels:modal_invoice_references.html.twig", "VGMWOBundle:WorkOrder:show.html.twig", 302)->display($context);
    }

    // line 305
    public function block_javascripts($context, array $blocks = array())
    {
        // line 306
        echo "    ";
        $this->displayParentBlock("javascripts", $context, $blocks);
        echo "
    <script type=\"text/javascript\" src=\"";
        // line 307
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/js/bootstrap-datetimepicker.js"), "html", null, true);
        echo "\"></script>
    <script type=\"text/javascript\" src=\"";
        // line 308
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/js/jquery/jquery.inputmask.js"), "html", null, true);
        echo "\"></script>
    <script type=\"text/javascript\" src=\"";
        // line 309
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/js/customized/utils/knockout.plugins.js"), "html", null, true);
        echo "\"></script>
    <script type=\"text/javascript\" src=\"";
        // line 310
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/js/customized/utils/message.modal.js"), "html", null, true);
        echo "\"></script>
    <script type=\"text/javascript\" src=\"";
        // line 311
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/js/customized/utils/util.lists.js"), "html", null, true);
        echo "\"></script>
    <script type=\"text/javascript\" src=\"";
        // line 312
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/js/customized/validations/OnChangeValidations.js"), "html", null, true);
        echo "\"></script>
    <script type=\"text/javascript\" src=\"";
        // line 313
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/js/customized/WorkOrders/workorder.showing.js"), "html", null, true);
        echo "\"></script>
    <script type=\"text/javascript\" HIDDEN=\"hidden\">
        \$(document).ready(function(){
            loadPageFeatures();
            \$('#wo-number').on('change keyup', function() {var regex = /^([1-9][0-9]{0,3})\$/gm;
                var sanitized = regex.test(\$(this).val()) ? \$(this).val() : \$(this).val().substr(0,\$(this).val().length-1);
                \$(this).val(sanitized);});
        });
        function go_home_list(){window.location.href=\"";
        // line 321
        echo $this->env->getExtension('routing')->getPath("workorders");
        echo "\";}
        function get_workorder_support_id_url(){return \"";
        // line 322
        echo $this->env->getExtension('routing')->getPath("get_wo_support_by_id");
        echo "\";}
        function get_search_4_stock_url(){return \"";
        // line 323
        echo $this->env->getExtension('routing')->getPath("find_stocks4workorder");
        echo "\";}
        function get_workorder_check_existence_url(){return \"";
        // line 324
        echo $this->env->getExtension('routing')->getPath("check_creating_exist");
        echo "\";}
        function get_workorder_update_url(){return \"";
        // line 325
        echo $this->env->getExtension('routing')->getPath("update_workorder");
        echo "\";}
        function get_save_stock_url(){return \"";
        // line 326
        echo $this->env->getExtension('routing')->getPath("save_stock");
        echo "\";}
        function get_workorder_obs_url(){return \"";
        // line 327
        echo $this->env->getExtension('routing')->getPath("workorder_get_my_obs");
        echo "\";}
        function get_workorder_tasks_url(){return \"";
        // line 328
        echo $this->env->getExtension('routing')->getPath("workorder_get_my_tasks");
        echo "\";}
        function get_workorder_stocks_url(){return \"";
        // line 329
        echo $this->env->getExtension('routing')->getPath("workorder_get_my_stocks");
        echo "\";}
        function get_workorder_invoices_url(){return \"";
        // line 330
        echo $this->env->getExtension('routing')->getPath("workorder_get_my_invoices");
        echo "\";}

        function open_mail(mail){window.location = mail;}

        viewModel.LoadData = ko.dependentObservable(function() {
            ";
        // line 335
        if ((isset($context["next_wo_number"]) ? $context["next_wo_number"] : null)) {
            echo "viewModel.current_wo_number_to_creation(\"";
            echo twig_escape_filter($this->env, (isset($context["next_wo_number"]) ? $context["next_wo_number"] : null), "html", null, true);
            echo "\");";
        }
        // line 336
        echo "            //Getting support data
            if(viewModel.chosenwo() == null){
                ";
        // line 338
        if ((isset($context["supervisors"]) ? $context["supervisors"] : null)) {
            echo "var tsups=[];";
            $context['_parent'] = (array) $context;
            $context['_seq'] = twig_ensure_traversable((isset($context["supervisors"]) ? $context["supervisors"] : null));
            foreach ($context['_seq'] as $context["_key"] => $context["sup"]) {
                echo "tsups.push({id:\"";
                echo twig_escape_filter($this->env, $this->getAttribute($context["sup"], "id", array()), "html", null, true);
                echo "\",name:\"";
                echo twig_escape_filter($this->env, $context["sup"], "html", null, true);
                echo "\",code:\"";
                echo twig_escape_filter($this->env, $this->getAttribute($context["sup"], "workercode", array()), "html", null, true);
                echo "\"});";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['sup'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            echo "viewModel.supervisors(tsups);";
        }
        // line 339
        echo "                ";
        if ((isset($context["units"]) ? $context["units"] : null)) {
            echo "var tunis=[];";
            $context['_parent'] = (array) $context;
            $context['_seq'] = twig_ensure_traversable((isset($context["units"]) ? $context["units"] : null));
            foreach ($context['_seq'] as $context["_key"] => $context["unit"]) {
                echo "tunis.push({id:\"";
                echo twig_escape_filter($this->env, $this->getAttribute($context["unit"], "id", array()), "html", null, true);
                echo "\",name: \"";
                echo twig_escape_filter($this->env, $this->getAttribute($context["unit"], "name", array()), "html", null, true);
                echo "\",fullname:\"";
                echo twig_escape_filter($this->env, $context["unit"], "html", null, true);
                echo "\"});";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['unit'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            echo "viewModel.units(tunis);";
        }
        // line 340
        echo "                ";
        if ((isset($context["equipments"]) ? $context["equipments"] : null)) {
            echo "var teqts=[];";
            $context['_parent'] = (array) $context;
            $context['_seq'] = twig_ensure_traversable((isset($context["equipments"]) ? $context["equipments"] : null));
            foreach ($context['_seq'] as $context["_key"] => $context["eqt"]) {
                echo "teqts.push({id:\"";
                echo twig_escape_filter($this->env, $this->getAttribute($context["eqt"], "id", array()), "html", null, true);
                echo "\",name:\"";
                echo twig_escape_filter($this->env, $context["eqt"], "html", null, true);
                echo "\",code:\"";
                echo twig_escape_filter($this->env, $this->getAttribute($context["eqt"], "code", array()), "html", null, true);
                echo "\",multiple_wos:";
                if ($this->getAttribute($context["eqt"], "multiplewos", array())) {
                    echo "true";
                } else {
                    echo "false";
                }
                echo "});";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['eqt'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            echo "viewModel.equipments(teqts);";
        }
        // line 341
        echo "                ";
        if ((isset($context["departments"]) ? $context["departments"] : null)) {
            echo "var tdeps=[];";
            $context['_parent'] = (array) $context;
            $context['_seq'] = twig_ensure_traversable((isset($context["departments"]) ? $context["departments"] : null));
            foreach ($context['_seq'] as $context["_key"] => $context["dep"]) {
                echo "tdeps.push({id:\"";
                echo twig_escape_filter($this->env, $this->getAttribute($context["dep"], "id", array()), "html", null, true);
                echo "\",name:\"";
                echo twig_escape_filter($this->env, $context["dep"], "html", null, true);
                echo "\"});";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['dep'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            echo "viewModel.departments(tdeps);";
        }
        // line 342
        echo "                ";
        if ((isset($context["clients"]) ? $context["clients"] : null)) {
            echo "var tclients=[];";
            $context['_parent'] = (array) $context;
            $context['_seq'] = twig_ensure_traversable((isset($context["clients"]) ? $context["clients"] : null));
            foreach ($context['_seq'] as $context["_key"] => $context["client"]) {
                echo "tclients.push({id:\"";
                echo twig_escape_filter($this->env, $this->getAttribute($context["client"], "id", array()), "html", null, true);
                echo "\",name:\"";
                echo twig_escape_filter($this->env, $context["client"], "html", null, true);
                echo "\",internal:\"";
                echo (($this->getAttribute($context["client"], "internal", array())) ? (true) : (false));
                echo "\"});";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['client'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            echo "viewModel.clients(tclients);";
        }
        // line 343
        echo "                ";
        if ((isset($context["salest"]) ? $context["salest"] : null)) {
            echo "var ttsales=[];";
            $context['_parent'] = (array) $context;
            $context['_seq'] = twig_ensure_traversable((isset($context["salest"]) ? $context["salest"] : null));
            foreach ($context['_seq'] as $context["_key"] => $context["tsale"]) {
                echo "ttsales.push({id:\"";
                echo twig_escape_filter($this->env, $this->getAttribute($context["tsale"], "id", array()), "html", null, true);
                echo "\",name:\"";
                echo twig_escape_filter($this->env, $this->getAttribute($context["tsale"], "saletype", array()), "html", null, true);
                echo "\"});";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['tsale'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            echo "viewModel.t_sales(ttsales);";
        }
        // line 344
        echo "                ";
        if ((isset($context["workst"]) ? $context["workst"] : null)) {
            echo "var ttworks=[];";
            $context['_parent'] = (array) $context;
            $context['_seq'] = twig_ensure_traversable((isset($context["workst"]) ? $context["workst"] : null));
            foreach ($context['_seq'] as $context["_key"] => $context["twork"]) {
                echo "ttworks.push({id:\"";
                echo twig_escape_filter($this->env, $this->getAttribute($context["twork"], "id", array()), "html", null, true);
                echo "\",name:\"";
                echo twig_escape_filter($this->env, $this->getAttribute($context["twork"], "worktype", array()), "html", null, true);
                echo "\"});";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['twork'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            echo "viewModel.t_works(ttworks);";
        }
        // line 345
        echo "                viewModel.stocks_status([\"Current\",\"Rented\",\"Sold\",\"Hold\",\"Closed\"]);
                viewModel.wo_status([\"Current\",\"Rented\",\"Sold\",\"Hold\",\"Out\",\"Closed\"]);
                viewModel.task_status([\"Canceled\",\"Completed\",\"Current\",\"Hold\"]);
                viewModel.chosenwo(new workorder(\"";
        // line 348
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "id", array()), "html", null, true);
        echo "\", \"";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "getImageUrl", array(), "method"), "html", null, true);
        echo "\", \"";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "number", array()), "html", null, true);
        echo "\",
                        \"";
        // line 349
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "origin", array()), "html", null, true);
        echo "\", \"";
        echo twig_escape_filter($this->env, (($this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "getEquipment", array(), "method")) ? ($this->getAttribute($this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "getEquipment", array(), "method"), "id", array())) : (null)), "html", null, true);
        echo "\", \"";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "stockquantity", array()), "html", null, true);
        echo "\",
                        \"";
        // line 350
        echo twig_escape_filter($this->env, (($this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "createdat", array())) ? (twig_date_format_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "createdat", array()), "m/d/Y")) : (null)), "html", null, true);
        echo "\",
                        \"";
        // line 351
        echo twig_escape_filter($this->env, (($this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "startedat", array())) ? (twig_date_format_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "startedat", array()), "m/d/Y")) : (null)), "html", null, true);
        echo "\",
                        \"";
        // line 352
        echo twig_escape_filter($this->env, (($this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "price", array())) ? ($this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "price", array())) : (null)), "html", null, true);
        echo "\",
                        \"";
        // line 353
        echo twig_escape_filter($this->env, (($this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "deliverydate", array())) ? (twig_date_format_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "deliverydate", array()), "m/d/Y")) : (null)), "html", null, true);
        echo "\",
                        \"";
        // line 354
        echo twig_escape_filter($this->env, (($this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "readyat", array())) ? (twig_date_format_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "readyat", array()), "m/d/Y")) : (null)), "html", null, true);
        echo "\",
                        \"";
        // line 355
        echo twig_escape_filter($this->env, (($this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "getSupervisor", array(), "method")) ? ($this->getAttribute($this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "getSupervisor", array(), "method"), "id", array())) : (null)), "html", null, true);
        echo "\",
                        \"";
        // line 356
        echo twig_escape_filter($this->env, (($this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "getClient", array(), "method")) ? ($this->getAttribute($this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "getClient", array(), "method"), "id", array())) : (null)), "html", null, true);
        echo "\",
                        \"";
        // line 357
        echo twig_escape_filter($this->env, (($this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "getSaletype", array(), "method")) ? ($this->getAttribute($this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "getSaletype", array(), "method"), "id", array())) : (null)), "html", null, true);
        echo "\",
                        \"";
        // line 358
        echo twig_escape_filter($this->env, (($this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "getWorktype", array(), "method")) ? ($this->getAttribute($this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "getWorktype", array(), "method"), "id", array())) : (null)), "html", null, true);
        echo "\", \"";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "status", array()), "html", null, true);
        echo "\",
                        null,
                        \"";
        // line 360
        echo twig_escape_filter($this->env, (((isset($context["cost"]) ? $context["cost"] : null)) ? ((isset($context["cost"]) ? $context["cost"] : null)) : (null)), "html", null, true);
        echo "\",
                        \"";
        // line 361
        echo twig_escape_filter($this->env, (($this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "xprice", array())) ? ($this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "xprice", array())) : (null)), "html", null, true);
        echo "\"));
                ";
        // line 362
        if ($this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "createdby", array())) {
            echo "viewModel.chosenwo().creator_id(\"";
            echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "createdby", array()), "id", array()), "html", null, true);
            echo "\");viewModel.chosenwo().creator_name(\"";
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "createdby", array()), "html", null, true);
            echo "\");";
        }
        // line 363
        echo "                ";
        if ((twig_length_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "obs", array())) > 0)) {
            echo "viewModel.chosenwo().get_my_obs();";
        }
        if ((twig_length_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "stocksfull", array())) > 0)) {
            echo "viewModel.chosenwo().get_my_stocks();";
        }
        // line 364
        echo "                ";
        if ((twig_length_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "invoicerefs", array())) > 0)) {
            echo "viewModel.chosenwo().get_my_invoices();";
        }
        if ((twig_length_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : null), "tasks", array())) > 0)) {
            echo "viewModel.chosenwo().get_my_tasks();";
        }
        // line 365
        echo "            }}, viewModel);ko.applyBindings(viewModel, document.getElementById(\"content-body\"));
    </script>";
    }

    public function getTemplateName()
    {
        return "VGMWOBundle:WorkOrder:show.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  760 => 365,  752 => 364,  744 => 363,  736 => 362,  732 => 361,  728 => 360,  721 => 358,  717 => 357,  713 => 356,  709 => 355,  705 => 354,  701 => 353,  697 => 352,  693 => 351,  689 => 350,  681 => 349,  673 => 348,  668 => 345,  650 => 344,  632 => 343,  612 => 342,  594 => 341,  568 => 340,  548 => 339,  529 => 338,  525 => 336,  519 => 335,  511 => 330,  507 => 329,  503 => 328,  499 => 327,  495 => 326,  491 => 325,  487 => 324,  483 => 323,  479 => 322,  475 => 321,  464 => 313,  460 => 312,  456 => 311,  452 => 310,  448 => 309,  444 => 308,  440 => 307,  435 => 306,  432 => 305,  426 => 302,  420 => 301,  416 => 50,  413 => 49,  410 => 48,  406 => 46,  403 => 45,  400 => 44,  396 => 20,  393 => 19,  390 => 18,  386 => 17,  383 => 16,  380 => 15,  376 => 14,  373 => 13,  370 => 12,  365 => 302,  363 => 301,  136 => 77,  132 => 76,  105 => 51,  103 => 48,  100 => 47,  98 => 44,  92 => 40,  84 => 35,  80 => 33,  76 => 30,  73 => 28,  68 => 21,  65 => 18,  62 => 15,  60 => 12,  55 => 9,  52 => 8,  45 => 5,  40 => 4,  37 => 3,  11 => 1,);
    }
}
