<?php
include "./var.php";
$id_usuario = $_SESSION['id_estrategia'];
$clientesoptions = getclientesoption();
$lineasdenegocio = getoptionlienaneg();
$tipologias = getoptiotipologia();
$checksetapas = getchecketapas();
$producto = getoptionproduct();
$tablepresupuestos = getpresupuestos();
$adicionales=<<<sss

<script type="text/javascript">
var idusuario = $id_usuario;

$('#example2').DataTable({
    "lengthMenu": [[5, 10, 15, 20, -1], [5, 10, 15, 20, "All"]]
});
var table = $('#example2').DataTable();

$('#example2 tbody').on( 'click', 'tr', function () {
    
} );
</script>

<script src="../js/scripttable.js"></script>
sss;
echo $varfirst;
echo $var=<<<llll
<script src="js/momment.js"></script>
<div class="right_col" role="main">
              

                <div class="col-md-12 col-xs-12" id="paso1">
                  <div class="x_panel">
                    <div class="x_title">
                      <h2><strong>Crear Presupuesto:</strong> <small></small></h2>
                      <ul class="nav navbar-right panel_toolbox">
                        <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                        </li>
                      </ul>
                      <div class="clearfix"></div>
                    </div>
                    <div class="x_content" id="paso1">
                      <br />
                      <form id="demo-form2" data-parsley-validate class="form-horizontal form-label-right">
                      <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">Folio:</label>
                        <div class="col-md-2 col-sm-2 col-xs-12">
                          <input id="ndegasto" class="form-control col-md-7 col-xs-12" type="text" name="ndegasto" required="required" disabled>
                        </div>
                      </div>

                      <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">Cliente:</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <select class="form-control" id="idcliente" required="required">
                            <option value="">Seleccione opcion</option>
                            $clientesoptions
                          </select>
                        </div>
                      </div>

                      <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">Nombre Proyecto :</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input id="nombreproyectos" class="form-control col-md-7 col-xs-12" type="text" name="ndegasto" required="required">
                        </div>
                      </div>

                      <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">M2 :</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input id="idm2" class="form-control col-md-7 col-xs-12" type="text" name="ndegasto" required="required">
                        </div>
                      </div>

                      <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="last-name">Seleccione linea de negocio:
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <select class="form-control" id="idlnegocio" required="required" onchange="actualizatipologia()">
                            <option value="">Seleccione opcion</option>
                            $lineasdenegocio
                          </select>
                        </div>
                      </div>

                      <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="last-name">Tipologia:
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <select class="form-control" id="tipologia" required="required"><!-- idtipologia-->
                            <option value="">Seleccione opcion</option>
                            
                          </select>
                        </div>
                      </div>
                        <label class="col-md-1 col-sm-1 col-xs-12 control-label">Seleccione Etapas:
                          <br>
                        </label>
                      <div class="form-group">
                        $checksetapas
                      </div>
                      <div class="ln_solid"></div>
                      <br>
                      <div class="form-group">
                        <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                          <button id="limpiargastos" class="btn btn-primary" type="reset">Limpiar</button>
                          <button type="button" class="btn btn-success" onclick="agregarcotizacion();">Siguiente</button>
                        </div>
                      </div>
                    </form>
                    </div>
                  </div>
              </div>
              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2><i class="fa fa-bars"></i> Agrega detalle de cada Etapa: </h2>
                    <ul class="nav navbar-right panel_toolbox">
                      <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                    </ul>
                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content" >
                  

                    <div class="x_content" id="cotizaetapas">
                    </div>
                    <br><br>
                    

                  </div>
                </div>
              </div>

              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2><i class="fa fa-bars"></i>Totales por etapa: </h2>
                    <ul class="nav navbar-right panel_toolbox">
                      <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                    </ul>
                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content" >
                    <div class="x_content" id="Totalespresupuesto">
                    </div>
                  </div>
                </div>
              </div>

              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2><i class="fa fa-bars"></i>Totales generales: </h2>
                    <ul class="nav navbar-right panel_toolbox">
                      <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                    </ul>
                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content" >
                    <div class="table-responsive" id="idtableoculta">
                      <table class="table table-striped jambo_table bulk_action" id="totalesmontos" class="table table-striped table-bordered dt-responsive nowrap"cellspacing="0">
                        <thead>
                          <th>TOTAL NÓMINA ARQUITECTOS</th>
                          <th>TOTAL ESPECIALISTAS</th>
                          <th>TOTAL OTROS DIRECTOS</th>
                          <th>TOTAL INDIRECTOS</th>
                          <th>TOTAL MARKUP</th>
                          <th>TOTAL IMPUESTOS</th>
                          <th>TOTAL</th>
                        </thead>
                        <tbody>
                          
                        </tbody>
                      </table>
                    </div>
                  </div>
                </div>
              </div>


              


             <!-- <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2><i class="fa fa-bars"></i> Tabs <small>Float right</small></h2>
                    <ul class="nav navbar-right panel_toolbox">
                      <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                      </li>
                      <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
                        <ul class="dropdown-menu" role="menu">
                          <li><a href="#">Settings 1</a>
                          </li>
                          <li><a href="#">Settings 2</a>
                          </li>
                        </ul>
                      </li>
                      <li><a class="close-link"><i class="fa fa-close"></i></a>
                      </li>
                    </ul>
                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content">

                    <div class="" role="tabpanel" data-example-id="togglable-tabs">
                      <ul id="myTab1" class="nav nav-tabs bar_tabs right" role="tablist">
                        <li role="presentation" class="active"><a href="#tab_content11" id="home-tabb" role="tab" data-toggle="tab" aria-controls="home" aria-expanded="true">Home</a>
                        </li>
                        <li role="presentation" class=""><a href="#tab_content22" role="tab" id="profile-tabb" data-toggle="tab" aria-controls="profile" aria-expanded="false">Profile</a>
                        </li>
                        <li role="presentation" class=""><a href="#tab_content33" role="tab" id="profile-tabb3" data-toggle="tab" aria-controls="profile" aria-expanded="false">Profile</a>
                        </li>
                      </ul>
                      <div id="myTabContent2" class="tab-content">
                        <div role="tabpanel" class="tab-pane fade active in" id="tab_content11" aria-labelledby="home-tab">
                                  <div class="col-xs-3">
                                    <ul class="nav nav-tabs tabs-left">
                                      <li class="active"><a href="#home" data-toggle="tab">Nómina arquitectura</a>
                                      </li>
                                      <li><a href="#profile" data-toggle="tab">Especialistas</a>
                                      </li>
                                      <li><a href="#messages" data-toggle="tab">Otros Directos</a>
                                      </li>
                                      <li><a href="#settings" data-toggle="tab">Indirectos</a>
                                      </li>
                                      <li><a href="#indirectos" data-toggle="tab">Totales</a>
                                      </li>
                                    </ul>
                                  </div>

                                  <div class="col-xs-9">
                                    <div class="tab-content">
                                        <div class="tab-pane active" id="home">
                                          <p class="lead">Home tab</p>
                                          <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher
                                            synth. Cosby sweater eu banh mi, qui irure terr.</p>
                                        </div>
                                        <div class="tab-pane" id="profile">Profile Tab.</div>
                                        <div class="tab-pane" id="messages">Messages Tab.</div>
                                        <div class="tab-pane" id="settings">Settings Tab.</div>
                                        <div class="tab-pane" id="indirectos">totales Tab.</div>
                                    </div>
                                  </div>

                                  <div class="clearfix"></div>

                                
                        </div>
                        <div role="tabpanel" class="tab-pane fade" id="tab_content22" aria-labelledby="profile-tab">
                                  <div class="col-xs-3">
                                    <ul class="nav nav-tabs tabs-left">
                                      <li class="active"><a href="#home" data-toggle="tab">Home</a>
                                      </li>
                                      <li><a href="#profile" data-toggle="tab">Profile</a>
                                      </li>
                                      <li><a href="#messages" data-toggle="tab">Messages</a>
                                      </li>
                                      <li><a href="#settings" data-toggle="tab">Settings</a>
                                      </li>
                                    </ul>
                                  </div>

                                  <div class="col-xs-9">
                                    <div class="tab-content">
                                      <div class="tab-pane active" id="home">
                                        <p class="lead">Home tab</p>
                                        <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher
                                          synth. Cosby sweater eu banh mi, qui irure terr.</p>
                                      </div>
                                      <div class="tab-pane" id="profile">Profile Tab.</div>
                                      <div class="tab-pane" id="messages">Messages Tab.</div>
                                      <div class="tab-pane" id="settings">Settings Tab.</div>
                                    </div>
                                  </div>

                                  <div class="clearfix"></div>
                        </div>
                        <div role="tabpanel" class="tab-pane fade" id="tab_content33" aria-labelledby="profile-tab">
                                  <div class="col-xs-3">
                                    <ul class="nav nav-tabs tabs-left">
                                      <li class="active"><a href="#home" data-toggle="tab">Home</a>
                                      </li>
                                      <li><a href="#profile" data-toggle="tab">Profile</a>
                                      </li>
                                      <li><a href="#messages" data-toggle="tab">Messages</a>
                                      </li>
                                      <li><a href="#settings" data-toggle="tab">Settings</a>
                                      </li>
                                    </ul>
                                  </div>

                                  <div class="col-xs-9">
                                    <div class="tab-content">
                                      <div class="tab-pane active" id="home">
                                        <p class="lead">Home tab</p>
                                        <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher
                                          synth. Cosby sweater eu banh mi, qui irure terr.</p>
                                      </div>
                                      <div class="tab-pane" id="profile">Profile Tab.</div>
                                      <div class="tab-pane" id="messages">Messages Tab.</div>
                                      <div class="tab-pane" id="settings">Settings Tab.</div>
                                    </div>
                                  </div>

                                  <div class="clearfix"></div>
                        </div>
                      </div>
                    </div>

                  </div>
                </div>
              </div>-->

</div>
llll;
echo $varend;
echo $adicionales;
echo $cerrarend;
?>