<?php

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

        // line 1
        $this->parent = $this->loadTemplate("VGMWOBundle::layout.html.twig", "VGMWOBundle:WorkOrder:new.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'),
            '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 2
    public function block_stylesheets($context, array $blocks = array())
    {
        $this->displayParentBlock("stylesheets", $context, $blocks);
        echo "<link href=\"";
        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\">";
    }

    // line 3
    public function block_content($context, array $blocks = array())
    {
        // line 4
        echo "    <div class=\"container\">
        <div class=\"form-group container-fluid\">
            <div class=\"row\">
                ";
        // line 7
        $this->displayBlock('workorder_data', $context, $blocks);
        // line 8
        echo "                ";
        $this->displayBlock('workorder_tasks', $context, $blocks);
        // line 9
        echo "                ";
        $this->displayBlock('workorder_stocks', $context, $blocks);
        echo "</div></div>
        <div class=\"row container-fluid text-right\" style=\"margin-bottom: 3vmin;\">
            ";
        // line 11
        if ((($this->env->getExtension('security')->isGranted("ROLE_ADMIN") || $this->env->getExtension('security')->isGranted("ROLE_SUPER_SUPERVISOR")) || $this->env->getExtension('security')->isGranted("ROLE_OTS_CORDINATOR"))) {
            // line 12
            echo "            <!-- ko if: !chosenwo().id() --><a class=\"btn btn-primary\" href=\"#\" data-bind=\"click: chosenwo().create_myself\">Create</a><!-- /ko -->
            <!-- ko if: chosenwo().id() -->
            <a class=\"btn btn-primary\" href=\"#\" data-bind=\"click: chosenwo().update_myself\">Update</a>
            ";
            // line 16
            echo "            <!-- /ko -->
            ";
        }
        // line 18
        echo "            <a class=\"btn btn-warning\" href=\"";
        echo $this->env->getExtension('routing')->getPath("workorders");
        echo "\">Cancel</a></div>
    </div>
    <!-- Modals -->
    <!-- Stock Wizard-->
    <!-- Stock Searching Wizard-->
    ";
        // line 23
        $this->displayBlock('stock_searching', $context, $blocks);
        // line 24
        echo "    <!-- Stock Showing Wizard-->
    <div class=\"modal fade bs-example-modal-lg\"
         id=\"showing-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\">Stock data</h4>
                </div>
                <div id=\"stockModalPreView\" class=\"modal-body\">
                    <div class=\"container-fluid\"
                         style=\"padding: 0px;\">
                        <div data-bind=\"attr:{class: chosenwo().showing_stock() == null ?
                                                    'col-xs-12 text-center' : 'col-xs-7 text-center'}\">
                            <img class=\"img\"
                                 data-bind=\"attr:{src: chosenwo().showing_stock() != null ?
                                        chosenwo().showing_stock().picture() != null ?
                                        chosenwo().showing_stock().picture() :
                                        '";
        // line 49
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/images/unknown-wo.png"), "html", null, true);
        echo "' :
                                        '";
        // line 50
        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().showing_stock() != null\">
                            <div id=\"stock_data\" class=\"table-responsive\" style=\"padding-left: 0px;\"
                                 data-bind=\"with: chosenwo().showing_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;\"
                                            data-bind=\"text: stock\"/>
                                    </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;\"
                                            data-bind=\"text: serial\"/>
                                    </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;\"
                                            data-bind=\"text: equipment() ? equipment.name : '- - -'\"/>
                                    </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;\"
                                            data-bind=\"text: hours_miles\"/>
                                    </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;\"
                                            data-bind=\"text: brand\"/>
                                    </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;\"
                                            data-bind=\"text: model\"/>
                                    </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;\"
                                            data-bind=\"text: cap\"/>
                                    </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;\"
                                            data-bind=\"text: tgc\"/>
                                    </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;\"
                                            data-bind=\"text: engine\"/>
                                    </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;\"
                                            data-bind=\"text: year\"/>
                                    </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;\"
                                            data-bind=\"text: loc\"/>
                                    </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;\"
                                            data-bind=\"text: acond\"/>
                                    </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;\"
                                            data-bind=\"text: actual_workorder\"/>
                                    </tr>
                                    <tr>
                                        <td colspan=\"2\">
                                            <strong>Condition: </strong>
                                            <pr data-bind=\"text: cond\"/>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 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 202
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/images/unknown-wo.png"), "html", null, true);
        echo "' :
                                        '";
        // line 203
        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 427
        $this->displayBlock('message', $context, $blocks);
        // line 428
        echo "    ";
        $this->displayBlock('stock_invoices_manager', $context, $blocks);
    }

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

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

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

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

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

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

    // line 431
    public function block_javascripts($context, array $blocks = array())
    {
        // line 432
        echo "    ";
        $this->displayParentBlock("javascripts", $context, $blocks);
        echo "
    <script type=\"text/javascript\" src=\"";
        // line 433
        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 434
        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 435
        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 436
        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 437
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/js/customized/utils/"), "html", null, true);
        echo "\"></script>
    <script type=\"text/javascript\" src=\"";
        // line 438
        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 439
        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();
            \$('#search-add-stock').on('hidden.bs.modal', function (e) {
                \$( \"#stock-number-4-search\" ).focus();
            });
        });
        function go_home_list(){window.location.href=\"";
        // line 447
        echo $this->env->getExtension('routing')->getPath("workorders");
        echo "\";}
        function get_workorder_support_id_url(){return \"";
        // line 448
        echo $this->env->getExtension('routing')->getPath("get_wo_support_by_id");
        echo "\";}
        function get_search_4_stock_url(){return \"";
        // line 449
        echo $this->env->getExtension('routing')->getPath("find_stocks4workorder");
        echo "\";}
        function get_workorder_check_existence_url(){return \"";
        // line 450
        echo $this->env->getExtension('routing')->getPath("check_creating_exist");
        echo "\";}
        function get_workorder_create_url(){return \"";
        // line 451
        echo $this->env->getExtension('routing')->getPath("create_workorder");
        echo "\";}
        function get_workorder_update_url(){return \"";
        // line 452
        echo $this->env->getExtension('routing')->getPath("update_workorder");
        echo "\";}
        function get_save_stock_url(){return \"";
        // line 453
        echo $this->env->getExtension('routing')->getPath("save_stock");
        echo "\";}
        function get_workorder_obs_url(){return \"";
        // line 454
        echo $this->env->getExtension('routing')->getPath("workorder_get_my_obs");
        echo "\";}
        function get_workorder_tasks_url(){return \"";
        // line 455
        echo $this->env->getExtension('routing')->getPath("workorder_get_my_tasks");
        echo "\";}
        function get_workorder_stocks_url(){return \"";
        // line 456
        echo $this->env->getExtension('routing')->getPath("workorder_get_my_stocks");
        echo "\";}
        function blankStockModal(holder){resetStockModal(holder, '";
        // line 457
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/vgmwo/images/logo/Navy Blue/Navy Blue Aeroservicios-300.png"), "html", null, true);
        echo "');}

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

        viewModel.LoadData = ko.dependentObservable(function() {
            ";
        // line 462
        if ((isset($context["wonumber"]) ? $context["wonumber"] : $this->getContext($context, "wonumber"))) {
            // line 463
            echo "                viewModel.current_wo_number_to_creation(\"";
            echo twig_escape_filter($this->env, (isset($context["wonumber"]) ? $context["wonumber"] : $this->getContext($context, "wonumber")), "html", null, true);
            echo "\");
            ";
        }
        // line 465
        echo "            //Getting support data
            if(viewModel.chosenwo() == null){
                ";
        // line 467
        if ((isset($context["supervisors"]) ? $context["supervisors"] : $this->getContext($context, "supervisors"))) {
            echo "var tsups=[];";
            $context['_parent'] = (array) $context;
            $context['_seq'] = twig_ensure_traversable((isset($context["supervisors"]) ? $context["supervisors"] : $this->getContext($context, "supervisors")));
            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 468
        echo "                ";
        if ((isset($context["units"]) ? $context["units"] : $this->getContext($context, "units"))) {
            echo "var tunis=[];";
            $context['_parent'] = (array) $context;
            $context['_seq'] = twig_ensure_traversable((isset($context["units"]) ? $context["units"] : $this->getContext($context, "units")));
            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 469
        echo "                ";
        if ((isset($context["equipments"]) ? $context["equipments"] : $this->getContext($context, "equipments"))) {
            echo "var teqts=[];";
            $context['_parent'] = (array) $context;
            $context['_seq'] = twig_ensure_traversable((isset($context["equipments"]) ? $context["equipments"] : $this->getContext($context, "equipments")));
            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 470
        echo "                ";
        if ((isset($context["departments"]) ? $context["departments"] : $this->getContext($context, "departments"))) {
            echo "var tdeps=[];";
            $context['_parent'] = (array) $context;
            $context['_seq'] = twig_ensure_traversable((isset($context["departments"]) ? $context["departments"] : $this->getContext($context, "departments")));
            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 471
        echo "                ";
        if ((isset($context["clients"]) ? $context["clients"] : $this->getContext($context, "clients"))) {
            echo "var tclients=[];";
            $context['_parent'] = (array) $context;
            $context['_seq'] = twig_ensure_traversable((isset($context["clients"]) ? $context["clients"] : $this->getContext($context, "clients")));
            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 "\"});";
            }
            $_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 472
        echo "                ";
        if ((isset($context["salest"]) ? $context["salest"] : $this->getContext($context, "salest"))) {
            echo "var ttsales=[];";
            $context['_parent'] = (array) $context;
            $context['_seq'] = twig_ensure_traversable((isset($context["salest"]) ? $context["salest"] : $this->getContext($context, "salest")));
            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 473
        echo "                ";
        if ((isset($context["workst"]) ? $context["workst"] : $this->getContext($context, "workst"))) {
            echo "var ttworks=[];";
            $context['_parent'] = (array) $context;
            $context['_seq'] = twig_ensure_traversable((isset($context["workst"]) ? $context["workst"] : $this->getContext($context, "workst")));
            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 474
        echo "                viewModel.stocks_status([\"Current\",\"Rented\",\"Sold\",\"Hold\",\"Closed\"]);viewModel.wo_status([\"Current\",\"Rented\",\"Sold\",\"Hold\",\"Out\",\"Closed\"]);viewModel.task_status([\"Canceled\",\"Complete\",\"Current\",\"Hold\"]);
                viewModel.chosenwo(new workorder(null,null,\"";
        // line 475
        echo twig_escape_filter($this->env, (isset($context["wonumber"]) ? $context["wonumber"] : $this->getContext($context, "wonumber")), "html", null, true);
        echo "\",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null));}
        }, viewModel);
        ko.applyBindings(viewModel, document.getElementById(\"content-body\"));
    </script>
";
    }

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  789 => 475,  786 => 474,  768 => 473,  750 => 472,  732 => 471,  714 => 470,  688 => 469,  668 => 468,  649 => 467,  645 => 465,  639 => 463,  637 => 462,  629 => 457,  625 => 456,  621 => 455,  617 => 454,  613 => 453,  609 => 452,  605 => 451,  601 => 450,  597 => 449,  593 => 448,  589 => 447,  578 => 439,  574 => 438,  570 => 437,  566 => 436,  562 => 435,  558 => 434,  554 => 433,  549 => 432,  546 => 431,  540 => 428,  534 => 427,  528 => 23,  522 => 9,  516 => 8,  510 => 7,  505 => 428,  503 => 427,  276 => 203,  272 => 202,  117 => 50,  113 => 49,  86 => 24,  84 => 23,  75 => 18,  71 => 16,  66 => 12,  64 => 11,  58 => 9,  55 => 8,  53 => 7,  48 => 4,  45 => 3,  36 => 2,  11 => 1,);
    }
}
