Skip to content

Commit

Permalink
clonar banca nacional
Browse files Browse the repository at this point in the history
  • Loading branch information
elsoftpy committed Jul 28, 2020
1 parent 2d88b78 commit f814113
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 40 deletions.
7 changes: 6 additions & 1 deletion app/Http/Controllers/BeneficiosAdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,12 @@ public function resultadosExcel(Request $request){
$tituloMult = $titulo.'('.$i.')';
$item->$tituloMult = null;
}else{
$item->$titulo = $respuesta->beneficiosOpcion->opcion;
if(!$respuesta->beneficiosOpcion){
$item->$titulo = "N/A";
}else{
$item->$titulo = $respuesta->beneficiosOpcion->opcion;
}

}
}
}
Expand Down
3 changes: 2 additions & 1 deletion app/Http/Controllers/EncuestasController.php
Original file line number Diff line number Diff line change
Expand Up @@ -488,9 +488,10 @@ public function clonarBancosNacionales(Request $request){
->where('rubro_id', 1)
->whereIn('empresa_id', [1, 2, 5, 6, 8, 10, 53])
->get();

foreach($encuestas as $encuesta){
$cabecera = $encuesta->replicate();
$cabecera->rubro_id = 12;
$cabecera->rubro_id = 15;

switch ($cabecera->empresa_id) {
case 1:
Expand Down
3 changes: 2 additions & 1 deletion app/Traits/ReportTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ public function cargaDetalle($item, &$itemArray){
$ratioSalEmpresaTotalEfectivoMax = 0;
}

// esto debe estar en la línea 251
array_push( $itemArray,
$compMinSal,
$comp25PercSal,
Expand All @@ -266,7 +267,7 @@ public function cargaDetalle($item, &$itemArray){
$ratioSalEmpresaTotalEfectivoProm,
$ratioSalEmpresaTotalEfectivoMed,
$ratioSalEmpresaTotalEfectivo75,
$ratioSalEmpresaTotalEfectivoMax,
$ratioSalEmpresaTotalEfectivoMax
);
}else{

Expand Down

This file was deleted.

4 changes: 2 additions & 2 deletions resources/views/encuestas/clonar_bancos_nacional.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<div class="row">
<div class="browser-window">
<div class="top-bar">
<h4>Clonar Periodo Bancard</h4>
<h4>Clonar Periodo Banca Nacional</h4>
</div>
<div class="content">
<form class="col s12" id="realForm" action="{{route('clonar.bancos.nacional.action')}}" method="POST">
<form class="col s12" id="realForm" action="{{route('clonar.bancos.nacionales.action')}}" method="POST">
<div class="row">
<div class="input-field col s6">
<input type="text" class="validate" id="periodo" name="periodo"/>
Expand Down
3 changes: 3 additions & 0 deletions resources/views/layout.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@
</div>
<div class="row">
<ul class="right hide-on-med-and-down">
<li>
<a href="{{ route('clonar.bancos.nacionales') }}">Clonar Banca Nac.</a>
</li>
<li>
<a href="{{ route('clonar.industrial') }}">Clonar Ind.</a>
</li>
Expand Down
4 changes: 2 additions & 2 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
'as'=> 'encuestas.clone'
]);

Route::get('clone_banca_nacional', 'EncuestasController@cloneBancosNacionales')->name('clonar.BancosNacionales');
Route::get('clone_banca_nacional', 'EncuestasController@cloneBancosNacionales')->name('clonar.bancos.nacionales');

Route::post('clone_banca_nacional', 'EncuestasController@clonarBancosNacionales')->name('clonar.BancosNacionalesAction');
Route::post('clone_banca_nacional', 'EncuestasController@clonarBancosNacionales')->name('clonar.bancos.nacionales.action');

Route::get('clone_bancard', 'EncuestasController@cloneBancard')->name('clonar.bancard');

Expand Down

0 comments on commit f814113

Please sign in to comment.