public function PrintCompromise($id)
 {
     $header1 = "DIRECCIÓN DE BENEFICIOS ECONÓMICOS";
     $header2 = "UNIDAD DE FONDO DE RETIRO POLICIAL INDIVIDUAL";
     $title = "COMPROMISO DE PAGO DE APORTES EN FORMA DIRECTA AL BENEFICIO ECONOMICO DEL SEGURO DE VIDA TITULARES";
     $affiliate = Affiliate::IdIs($id)->first();
     //$date = Util::getDateEdit(date('Y-m-d'));
     $current_date = Carbon::now();
     $hour = Carbon::parse($current_date)->toTimeString();
     $date = Carbon::parse($current_date)->toDateString();
     $view = \View::make('direct_contributions.print.compromise', compact('header1', 'header2', 'title', 'date', 'hour', 'affiliate'))->render();
     $pdf = \App::make('dompdf.wrapper');
     $pdf->loadHTML($view)->setPaper('letter');
     return $pdf->stream();
 }
 public function PrintVoucher($id)
 {
     $header1 = "DIRECCIÓN DE BENEFICIOS ECONÓMICOS";
     $header2 = "UNIDAD DE FONDO DE RETIRO POLICIAL INDIVIDUAL";
     $title = "RECIBO OFICIAL";
     $date = Util::getDateEdit(date('Y-m-d'));
     $current_date = Carbon::now();
     $hour = Carbon::parse($current_date)->toTimeString();
     $direct_contribution = DirectContribution::idIs($id)->first();
     $voucher = Voucher::idIs($id)->first();
     $affiliate = Affiliate::IdIs($voucher->affiliate_id)->first();
     $view = \View::make('vouchers.print.show', compact('header1', 'header2', 'title', 'date', 'hour', 'affiliate', 'voucher', 'direct_contribution'))->render();
     $pdf = \App::make('dompdf.wrapper');
     $pdf->loadHTML($view)->setPaper('letter');
     return $pdf->stream();
 }