<?php
include "./var.php";
$id_usuario = $_SESSION['id_estrategia'];
$clientesoptions = getclientesoption();
$lineasdenegocio = getoptionlienaneg();
$tipologias = getoptiotipologia();
$checksetapas = getchecketapas();
$producto = getoptionproduct();
$getpuestos= getpuestos();
$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="">
              <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> Nivel 3 <small>captura</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="Cotizanv3">


                    <div class="" role="tabpanel" data-example-id="togglable-tabs" id="tabpanel1">
                      <ul id="myTab" class="nav nav-tabs bar_tabs" role="tablist">
                        <li role="presentation" class="active"><a href="#tab_content1" id="profile-tab1" role="tab" data-toggle="tab" aria-expanded="true">Colaboradores</a>
                        </li>
                        <li role="presentation" class=""><a href="#tab_content2" role="tab" id="profile-tab2" data-toggle="tab" aria-expanded="false">Especialistas</a>
                        </li>
                        <li role="presentation" class=""><a href="#tab_content3" role="tab" id="profile-tab3" data-toggle="tab" aria-expanded="false">Otros directos</a>
                        </li>
                        <li role="presentation" class=""><a href="#tab_content4" role="tab" id="profile-tab4" data-toggle="tab" aria-expanded="false">Indirectos</a>
                        </li>
                      </ul>
                      <div id="myTabContent" class="tab-content">
                        <div role="tabpanel" class="tab-pane fade active in" id="tab_content1" aria-labelledby="home-tab">
    <div class="col-md-9 col-sm-9 col-xs-12">
                        <div class="table-responsive" id="idtableoculta">
                            <table class="table table-striped jambo_table bulk_action" id="tablahrs"cellspacing="0">
                            <thead>
                                <tr>
                                <th text-align="center" id="detallecotiza90" >Duracion (Hrs) Etapa 1</th>
                                <th text-align="center" id="detallecotiza90" >Duracion (Hrs) Etapa 2</th>
                                </tr>
                            </thead>
                            <tbody>
                                <td >5490</td>
                                <td>1475</td>
                            </tbody>
                            </table>
                        </div>
    </div>
    
                        <div class="col-md-9 col-sm-9 col-xs-12">
    
                          <div class="table-responsive" id="idtableoculta">
                            <table class="table table-bordered" id="tablacaptura1" >
                            <thead>
                                <tr >
                                <th rowspan="2">Puesto</th>
                                <th rowspan="2">Costo por hora</th>
                                <th colspan="3" text-align="center" id="detallecotiza90" >Etapa 1</th>
                                <th colspan="3" text-align="center" id="detallecotiza90" >Etapa 2</th>
                                </tr >
                                <tr>
                                <th>% de ocupación</th>
                                <th>Horas</th>
                                <th>Total mano de obra</th>
                                <th>% de ocupación</th>
                                <th>Horas</th>
                                <th>Total mano de obra</th>
                                </tr>
                            </thead>
                            <tbody>
                                <td>5490</td>
                                <td>1475</td>
                                <td>5000</td>
                                <td>100</td>   
                                <td>5490</td>
                                <td>5000</td>
                                <td>100</td>   
                                <td>5490</td>
                            </tbody>
                            </table>
                            </div>
    
                    <div class="text-right">
                        <div class="form-group text-right">
                        <label for="middle-name" class="control-label-rigth col-md-3 col-sm-3 col-xs-6 text-right">Markup Nómina %:</label>
                        <div class="col-md-3 col-sm-3 col-xs-6">
                          <input id="maxnomsem" class="form-control col-md-3 col-xs-6 text-right" type="text" name="ndegasto" required="required" onchange="calculacostoxhora()">
                        </div>
                      </div><br><br>
                      <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-6" data-toggle="tooltip" data-placement="rigth" title="Es la cantidad máxima pagada por hora al empleado">Markup Nómina:</label>
                        <div class="col-md-3 col-sm-3 col-xs-6">
                          <input id="maxxhr" class="form-control col-md-3 col-xs-6" type="text" name="ndegasto" required="required" disabled>
                        </div>
                      </div><br><br>     
					  <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-6" data-toggle="tooltip" data-placement="rigth" title="Es el costo de la hora hombre de dicho puesto que se quiere considerar para presupuesto">Total Colaboradores + Mark Up:</label>
                        <div class="col-md-3 col-sm-3 col-xs-6">
                          <input id="costxhrpres" class="form-control col-md-3 col-xs-6" type="text" name="ndegasto" required="required" disabled>
                        </div>
                      </div>
                    </div>
    
                        <div class="form-group">
                          <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                            <button id="limpiar" class="btn btn-primary" type="reset">Limpiar</button>
                            <button type="button" class="btn btn-success" onclick="agregarpressrep(57,282);">Guardar</button>
                          </div>
                        </div>
                        </div>
    
                        <div class="col-md-3 col-sm-3 col-xs-12">

                            <div class="table-responsive" id="idtableoculta">
                            <table class="table table-striped jambo_table bulk_action" id="tablatotales1" class="table table-striped table-bordered dt-responsive nowrap"cellspacing="0">
                            <thead>
                                <tr>
                                <th rowspan="1">Total</th>
                                </tr>
                                <tr>
                                <th>Colaboradores</th>
                                </tr>
                            </thead>
                            <tbody>
                                <td>5490</td>
                            </tbody>
                            </table>
                            </div>
                        
                            
    
                        </div>
                        </div>
                        
                        <div role="tabpanel" class="tab-pane fade" id="tab_content2" aria-labelledby="profile-tab">
                          <p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo
                            booth letterpress, commodo enim craft beer mlkshk aliquip</p>
                        </div>
                        <div role="tabpanel" class="tab-pane fade" id="tab_content3" aria-labelledby="profile-tab">
                          <p>xxFood truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo
                            booth letterpress, commodo enim craft beer mlkshk </p>
                        </div>
                        <div role="tabpanel" class="tab-pane fade" id="tab_content4" aria-labelledby="profile-tab">
                          <p>xxFood truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo
                            booth letterpress, commodo enim craft beer mlkshk </p>
                        </div>
                      </div>
                    </div>


                  </div>
                </div>
              </div>
    
   
                                             
                            
                <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2>Cotizacion <small>Nivel 2</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="table-responsive">

                    <table class="table table-bordered">
                      <thead>
                        <tr>
                          <th></th>
                          <th>Conceptual</th>
                          <th>Anteproyecto</th>
                          <th>Ejecutivo</th>
                          <th>Supervision</th>
                          <th>Costo Total</th>
                          <th>Mark Up Total</th>
                          <th>Total Cotizacion</th>
                              
                        </tr>
                      </thead>
                      <tbody>
                        <tr>
                          <th scope="row">Colaboradores</th>
                          <td><select class="form-control" required="required" ><option value="		9 "> Ingeniero 1 </option><option value=" 		10 "> Ingeniero 2 </option><option value=" 		11 "> Ingeniero Sr A </option><option value=" 		12 "> Ingeniero 3 </option><option value=" 		13 "> Ingniero 5 </option><option value=" 		14 "> lll </option><option value=" 		15 "> Prueba </option></select></td>
                          <td>1475</td>
                          <td>5000</td>
                          <td>100</td>   
                              <td>5490</td>
                          <td>1475</td>
                          <td>15121</td>
                          <td><label class="control-label col-md-1 col-sm-2 col-xs-12" for="last-name">
                          <button type="button" class="btn btn-success btn-xs" onclick="calcular('$id_tipologias','$nombre');">Detalle</button>
                    </label></td>  
                        </tr>
                        <tr>
                          <th scope="row">Proveedores</th>
                          <td>2745</td>
                          <td>550</td>
                          <td>500</td>
                          <td>50</td>  
                              <td>5490</td>
                          <td>1475</td>
                          <td>5450</td>
                          <td><label class="control-label col-md-1 col-sm-2 col-xs-12" for="last-name">
                          <button type="button" class="btn btn-success btn-xs" onclick="calcular('$id_tipologias','$nombre');">Detalle</button>
                    </label></td>  
                        </tr>
                        <tr>
                          <th scope="row">Otros Directos</th>
                          <td>2000</td>
                          <td>0</td>
                          <td>0</td>
                          <td>110</td>  
                              <td>5490</td>
                          <td>1475</td>
                          <td>5000</td>
                          <td><label class="control-label col-md-1 col-sm-2 col-xs-12" for="last-name">
                          <button type="button" class="btn btn-success btn-xs" onclick="calcular('$id_tipologias','$nombre');">Detalle</button>
                    </label></td>  
                        </tr>
                        <tr>
                          <th scope="row">Indirectos</th>
                          <td>2748</td>
                          <td>1000</td>
                          <td>0</td>
                          <td>0</td>  
                              <td>5490</td>
                          <td>1475</td>
                          <td>1200</td>
                          <td><label class="control-label col-md-1 col-sm-2 col-xs-12" for="last-name">
                          <button type="button" class="btn btn-success btn-xs" onclick="calcular('$id_tipologias','$nombre');">Detalle</button>
                    </label></td>  
                        </tr>
                      </tbody>
                    </table>

                  </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;
?>