Skip to content

Commit

Permalink
Tomar tipo de cambio desde ficha
Browse files Browse the repository at this point in the history
  • Loading branch information
elyambay committed Oct 23, 2018
1 parent 55f73ff commit 961e4a5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions app/Http/Controllers/ReporteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1615,7 +1615,7 @@ private function segmenter( &$collection,
$salarioMed = $this->median($salariosBase);
$salario25Per = $this->percentile(25,$salariosBase);
$salario75Per = $this->percentile(75, $salariosBase);

//dd($dbClienteEnc);
$this->pusher( $collection,
$countCasos,
Lang::get('reportReport.concept_salary'),
Expand Down Expand Up @@ -2645,6 +2645,7 @@ private function cargoReportAll(Request $request, $tipo){

// Datos de la encuesta llenada por el cliente
$dbClienteEnc = $dbDetalle->where('cabecera_encuesta_id', $dbEncuesta->id)->first();
// dd($dbEncuesta, $dbClienteEnc, $cargo);
if(empty($dbClienteEnc)){
// get the column names for the table
$columns = Schema::getColumnListing('detalle_encuestas');
Expand Down Expand Up @@ -2778,7 +2779,14 @@ private function cargoReportAll(Request $request, $tipo){
$convertir = false;
}

$tipoCambio = 5600;
$ficha = Ficha_dato::where('periodo', $periodo)->first();
//dd($ficha);
if($ficha){
$tipoCambio = $ficha->tipo_cambio;
}else{
$tipoCambio = 5600;
}


return view('report.report')->with('dbCargo', $dbCargo)
->with('dbEmpresa', $dbEmpresa)
Expand Down
2 changes: 1 addition & 1 deletion resources/lang/es/reportLayout.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"menu_indicators" => "Indicadores por Cargo",
"menu_search" => "Buscar por Cargo",
"menu_universe" => "Universo de Cargos",
"menu_attachment" => "Archivo Adjunto"
"menu_attachment" => "Informe Ejecutivo"
];

0 comments on commit 961e4a5

Please sign in to comment.