Example #1
0
            <div class="modal-header partition-green">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h3 class="no-margin"><i class="fa fa-list-alt"></i> Listado de Tipos de Perdida</h3>
            </div>
            <div class="modal-body padding-20 " style="overflow-x: hidden; overflow-y: auto">
                <form >
                    <table id="tablaDetallesTipoPerdida" class="table table-bordered table-striped" style="width:100%;" >
                        <thead class="text-center">
                            <tr>

                                <th>Tipo de Pérdida</th>
                            </tr>
                        </thead>
                        <tbody class="text-center">
                            <?php 
$tipoPerdida = new TipoPerdida();
$tiposPerdida = $tipoPerdida->findAll();
foreach ($tiposPerdida as $value) {
    ?>
 
                                <tr>
                                    <td>
                                        <?php 
    echo $value->nombre;
    ?>
                
                                    </td>
                                </tr>
                                <?php 
}
?>
Example #2
0
function DameTuSumaEstocasticaTR($id)
{
    $cantidad = 0;
    $criteria = new CDbCriteria();
    $riesgoss = Riesgo::model()->findAllByAttributes(array('estado' => 1));
    for ($index = 0; $index < count($riesgoss); $index++) {
        if ($riesgoss[$index]->id_tipo_riesgo == $id) {
            $cantidad = $cantidad + (int) $riesgoss[$index]->riesgo_estocastico;
            //aqui va la estocastica
        }
    }
    return $cantidad;
}
//LLENAR FILTRO  TIPO  DE PERDIDA
$arregloTipoPerdida = [];
$arrayTP = TipoPerdida::model()->findAll();
for ($index3 = 0; $index3 < count($arrayTP); $index3++) {
    $arregloTipoPerdida[$index3] = $arrayTP[$index3]->nombre;
}
$arregloTipoPerdidaDeterministico = [];
for ($index2 = 0; $index2 < count($arrayTP); $index2++) {
    $aux = DameTuSumaDeterministicaTP($arrayTP[$index2]->id_tipo_perdida);
    $arregloTipoPerdidaDeterministico[$index2] = $aux;
}
function DameTuSumaDeterministicaTP($id)
{
    $cantidad = 0;
    $riesgoss = Riesgo::model()->findAllByAttributes(array('estado' => 1));
    for ($index = 0; $index < count($riesgoss); $index++) {
        if ($riesgoss[$index]->id_tipo_perdida == $id) {
            $cantidad = $cantidad + (int) $riesgoss[$index]->riesgo_deterministico;
Example #3
0
                                <textarea id="descripcionCausaActualizar" name="descripcionCausaActualizar" class="form-control" value=""><?php 
echo $riesgo->descripcion_causa;
?>
</textarea>                                          
                            </div
                        </div>
                        <div class="col-md-6">
                            <div id="" class="form-group">
                                <label class="control-label">
                                    Tipo de Pérdida                                   
                                    <span class="symbol required"></span>
                                </label>
                                <select  id="idTipoPerdidaActualizar" name="idTipoPerdidaActualizar" class="js-example-basic-single" tabindex="-1" aria-hidden="true" style="width:100%; height: 40px;">     
                                    <option value="null">Seleccione</option> 
                                    <?php 
$tipoPerdidaCrear = new TipoPerdida();
$tiposPerdidaCrear = $tipoPerdidaCrear->findAll();
foreach ($tiposPerdidaCrear as $value) {
    if ($value->id_tipo_perdida != $riesgo->id_tipo_perdida) {
        ?>
 

                                            <option value="<?php 
        echo $value->id_tipo_perdida;
        ?>
" title="<?php 
        echo $value->nombre;
        ?>
">
                                                <?php 
        echo $value->nombre;
Example #4
0
}
?>
 
                                        </option> 
                                    </select>                      
                                </div>
                            </div>
                            <div class="col-md-3">
                                <div class="form-group">
                                    <label class="control-label">
                                        Tipo de Pérdida
                                    </label>
                                    <select  id="tipoPerdidaSearch" name="tipoPerdidaSearch" class="js-example-basic-single" tabindex="1" aria-hidden="true" style="width:100%; height: 40px;">     
                                        <option value="">Seleccione</option> 
                                        <?php 
$modelTipoPerdida = new TipoPerdida();
$tiposPerdida = $modelTipoPerdida->findAll();
foreach ($tiposPerdida as $value) {
    ?>
 

                                            <option value="<?php 
    echo $value->id_tipo_perdida;
    ?>
" title="">
                                                <?php 
    echo $value->nombre;
}
?>
 
                                        </option>