public function transacciones()
 {
     $idUser = \Auth::user()->id;
     $cajero = $this->cajero->findByField('idUsuario', $idUser);
     $data = $this->repo->findByField2('id_cajero', $cajero->id);
     return \PDF::loadView('pdf.reporte', compact('data'))->download('reporte_transacciones.pdf');
 }
Beispiel #2
0
 public function generatePDF()
 {
     $params = array("email" => Input::get('email'), "id" => Input::get('id'));
     $coupon = $this->generateCoupon($params);
     $pdf = PDF::loadView("coupon_pdf", compact('coupon'));
     return $pdf->download('coupon.pdf');
 }
Beispiel #3
0
 public static function balanceSheet($date)
 {
     $accounts = Account::all();
     $organization = Organization::find(1);
     $pdf = PDF::loadView('pdf.financials.balancesheet', compact('accounts', 'date', 'organization'))->setPaper('a4')->setOrientation('potrait');
     return $pdf->stream('Balance Sheet.pdf');
 }
 public function getResult($id = 'x')
 {
     $printed = \Request::get('printed');
     $slctd_samples = \Request::has("samples") ? \Request::get("samples") : [];
     $slctd_samples_str = is_array($slctd_samples) ? implode(',', $slctd_samples) : "{$slctd_samples}";
     $sql = "SELECT  s.*, p.artNumber,p.otherID, p.gender, p.dateOfBirth,\n\t\t\t\tGROUP_CONCAT(ph.phone SEPARATOR ',') AS phone, f.facility, d.district, h.hub AS hub_name, \n\t\t\t\tGROUP_CONCAT(res_r.Result, '|||', res_r.created SEPARATOR '::') AS roche_result,\n\t\t\t\tGROUP_CONCAT(res_a.result, '|||', res_a.created SEPARATOR '::') AS abbott_result,\n\t\t\t\tGROUP_CONCAT(res_o.result, '|||', res_o.created SEPARATOR '::') AS override_result,\n\t\t\t\tlog_s.id AS repeated, v.outcome AS verify_outcome, reason.appendix AS rejection_reason,\n\t\t\t\tu.signaturePATH, wk.machineType, fctr.factor, sw.sampleID, sw.worksheetID\n\t\t\t\tFROM vl_samples AS s\n\t\t\t\tLEFT JOIN vl_facilities AS f ON s.facilityID=f.id\n\t\t\t\tLEFT JOIN vl_districts AS d ON f.districtID=d.id\n\t\t\t\tLEFT JOIN vl_hubs AS h ON f.hubID=h.id\n\t\t\t\tLEFT JOIN vl_patients As p ON s.patientID=p.id\n\t\t\t\tLEFT JOIN vl_patients_phone As ph ON p.id = ph.patientID\n\t\t\t\tLEFT JOIN vl_samples_verify AS v ON s.id=v.sampleID\t\t\t\t\n\t\t\t\tLEFT JOIN vl_appendix_samplerejectionreason AS reason ON v.outcomeReasonsID=reason.id\n\t\t\t\tLEFT JOIN vl_samples_worksheet AS sw ON s.id=sw.sampleID\n\t\t\t\tLEFT JOIN vl_samples_worksheetcredentials AS wk ON sw.worksheetID=wk.id\n\t\t\t\tLEFT JOIN vl_results_roche AS res_r ON s.vlSampleID = res_r.SampleID\n\t\t\t\tLEFT JOIN vl_results_abbott AS res_a ON s.vlSampleID = res_a.SampleID\n\t\t\t\tLEFT JOIN vl_results_override AS res_o ON s.vlSampleID = res_o.sampleID\n\t\t\t\tLEFT JOIN vl_logs_samplerepeats AS log_s ON s.id = log_s.sampleID\n\t\t\t\tLEFT JOIN vl_users AS u ON wk.createdby = u.email\n\t\t\t\tLEFT JOIN vl_results_multiplicationfactor AS fctr ON wk.id=fctr.worksheetID\n\t\t\t\tWHERE\n\t\t\t\t";
     if ($id == 'x' and count($slctd_samples) == 0) {
         return "Please select atleast one";
     }
     $sql .= $id != 'x' ? " s.id={$id} LIMIT 1" : " s.id IN ({$slctd_samples_str}) GROUP BY s.id";
     $vldbresult = \DB::connection('live_db')->select($sql);
     if (\Request::has('pdf')) {
         $s_arr = $id != 'x' ? [$id] : explode(",", $slctd_samples_str);
         $sql = "INSERT INTO vl_facility_downloads (sample_id, downloaded_by, downloaded_on) VALUES";
         foreach ($s_arr as $smpl) {
             $sql .= "({$smpl}, '" . \Auth::user()->email . "', '" . date('Y-m-d H:i:s') . "'),";
         }
         $sql = trim($sql, ',');
         \DB::connection('live_db')->unprepared($sql);
         $pdf = \PDF::loadView('results.pdfresults', compact("vldbresult"));
         return $pdf->download('vl_results_' . session('facility') . '.pdf');
         //return \PDF::loadFile('http://www.github.com')->inline('github.pdf');
     }
     return view('results.result', compact("vldbresult", "printed"));
 }
Beispiel #5
0
 public function handle()
 {
     date_default_timezone_set("America/Mexico_City");
     $lastweek = Carbon::now()->startOfWeek()->subWeek();
     $startOfWeek = Carbon::now()->startOfWeek()->addDay();
     if ($startOfWeek->isTomorrow() == true) {
         $encuestas = Encuesta::History($lastweek, $startOfWeek)->get();
     } else {
         $encuestas = Encuesta::Reinicio($startOfWeek)->get();
     }
     $pdf = \PDF::loadView('reportes.Clientes', compact('encuestas'))->setOrientation('landscape')->save(public_path() . '/pdfs/' . 'reporte semanal' . '.pdf');
     $ToMail = '*****@*****.**';
     $ToName = 'Victor Zapata';
     $file = public_path() . '/pdfs/' . 'reporte semanal' . '.pdf';
     \Mail::send('emails.Reportes', [], function ($message) use($ToName, $ToMail, $file) {
         //remitente
         $message->from(env('MAIL_FROM'), env('MAIL_NAME'));
         //asunto
         $message->subject('Reporte Semanal Thaigreen');
         //receptor
         $message->to($ToMail, $ToName);
         $message->to('*****@*****.**', 'Mike');
         $message->to('*****@*****.**', $name = null);
         //Adjunto
         $message->attach($file, ['as' => 'Reporte Semanal.PDF']);
     });
     chmod(public_path() . '/pdfs/' . 'reporte semanal.pdf', 0777);
     unlink(public_path() . '/pdfs/' . 'reporte semanal.pdf');
 }
Beispiel #6
0
 public function index()
 {
     $parameter = array();
     $parameter['param'] = "ula mami kit  uii!!";
     $pdf = \PDF::loadView('printView', $parameter);
     return $pdf->download('Curriculum.pdf');
 }
Beispiel #7
0
 public function getNota($keyTrans = "")
 {
     $data['dataQuery'] = $this->transactionReturn->with('item')->where(['key_transaction' => $keyTrans])->get();
     $data['keyTrans'] = $keyTrans;
     $pdf = \PDF::loadView($this->folder . '.nota', $data);
     return $pdf->stream('invoiceoioiio.pdf');
 }
 /**
  *  This function responses  to the 
  *  post request of the /member/action
  *  then checked which button are pressed in the
  *  form of member dashboard page of the 
  *  route /member
  */
 public function postAction()
 {
     // Holding checked row value from movie table
     if (Input::get('checked')) {
         $id = Input::get('checked');
     } elseif (Input::get('checked1')) {
         $id = Input::get('checked1');
     }
     /**
      *  Redirected route if Details button is pressed
      */
     if (Input::has('Details')) {
         return Redirect::route('member-movie-details-get', $id);
     }
     /**
      *  Redirected route if Print button is pressed
      */
     if (Input::has('Print')) {
         $parameterr = array();
         $parameter['title'] = ucwords(Session::get('username')) . "'s Order";
         $parameter['orders'] = Order::where('member_id', '=', Session::get('member_id'))->orderBy('id', 'desc')->get();
         $pdf = PDF::loadView('reports.order.getAllOrders', $parameter)->setPaper('a4')->setOrientation(config::$MEMBER_REPORT_ORIENTATION)->setWarnings(false);
         return $pdf->download('orders.pdf');
     }
 }
 public function generate($id)
 {
     $college = $this->checkCollege($id);
     $students = Student::where('college', 'LIKE', '%' . $college . '%')->orderBy('lastname')->get();
     $pdf = \PDF::loadView('layouts.spreadsheet', compact('students'));
     //return view('layouts.spreadsheet', compact('students'));
     return $pdf->download('test.pdf');
 }
Beispiel #10
0
 public function test(Request $request)
 {
     $property = Property::find($request->prop);
     $property->language = $property->propertyLanguages()->where('locale', 'en')->first();
     //        $property->thumbnails = $property->
     $pdf = \PDF::loadView('pdf.property', ['property' => $property]);
     return $pdf->stream('invoice.pdf');
 }
 private function exportPdf($surats)
 {
     $date = \Carbon\Carbon::now();
     $name = 'SuratMagang_' . $date->day . '_' . $date->month . '_' . $date->year . '_' . Date('H:i:s', strtotime($date)) . '.pdf';
     $data['datas'] = $surats;
     $pdf = PDF::loadView('srtmahasiswa.SuratMagangIndv', $data)->setPaper('a4');
     return $pdf->download($name);
 }
 private function generatePdf($invoice, $showCommission)
 {
     $showManager = false;
     $pdf = \PDF::loadView('invoices.generateInvoice', compact('invoice', 'showManager', 'showCommission'));
     $filename = $invoice->invoiceId() . '-invoice';
     $filename .= $showCommission ? '.pdf' : '-x.pdf';
     $pdf->save(storage_path('app/' . $filename));
 }
Beispiel #13
0
 private function exportPdfatlet($atlets)
 {
     $name = 'Daftar Atlet_' . date('m-d-Y') . '.pdf';
     $data['datas'] = $atlets;
     // dd($data);
     $pdf = PDF::loadView('schools.cetakatlet', $data)->setPaper('a4')->setOrientation('portrait');
     return $pdf->download($name);
 }
 private function exportmahasiswalogbook($mlogbooks)
 {
     $akun = Admin::where('user_id', Sentry::getUser()->id)->first();
     $name = 'Log_book_Atletik_' . Date('Y') . '_' . $akun->noi . '_' . $akun->name . '.pdf';
     $data['datas'] = $mlogbooks;
     $pdf = PDF::loadView('logs.laporan', $data)->setPaper('a4')->setOrientation('landscape');
     return $pdf->download($name);
 }
 public function payments()
 {
     $payments = Payment::all();
     $erporders = Erporder::all();
     $erporderitems = Erporderitem::all();
     $organization = Organization::find(1);
     $pdf = PDF::loadView('erpreports.paymentsReport', compact('payments', 'erporders', 'erporderitems', 'organization'))->setPaper('a4')->setOrientation('potrait');
     return $pdf->stream('Payment List.pdf');
 }
Beispiel #16
0
 public function handlePDFBackup($menu)
 {
     $file = 'archive/menu' . Carbon::now()->format('Y-m-d') . '.pdf';
     $pdf = \PDF::loadView('pdf.show', $menu);
     if (\File::exists($file)) {
         \File::delete($file);
     }
     return $pdf->save($file);
 }
 public function printpdf($id)
 {
     $data['active'] = 'versheet';
     $data['vs'] = Versheet::find($id);
     $day = Carbon::parse($data['vs']->tanggal);
     $data['day'] = $day;
     $pdf = PDF::loadView('templatesurat.verification', $data);
     return $pdf->stream();
 }
 private function exportPdf($surats)
 {
     $date = \Carbon\Carbon::now();
     $name = 'SuratMengambilData_' . $date->day . '_' . $date->month . '_' . $date->year . '_' . Date('H:i:s', strtotime($date)) . '.pdf';
     $data['datas'] = $surats;
     $pdf = PDF::loadView('srtmahasiswa.SuratAmbilData', $data)->setPaper('a4');
     return $pdf->download($name);
     // Redirect::route('surat_ijin_studi_lapangan_indv.index')->with("successMessage","Surat Berhasil di Buat ");
 }
 public function downloadPDF($id, Request $request)
 {
     $invoice = Invoice::find($id);
     if (is_null($invoice)) {
         return response()->view('errors.404', [], 404);
     }
     $items = json_decode($invoice->list_items);
     $pdf = \PDF::loadView('invoice.pdf', compact(['invoice', 'items']));
     return $pdf->download();
 }
Beispiel #20
0
 public function pdfReporte($nivel, $grado, $seccion)
 {
     $array = array();
     $array = $this->getData($nivel, $grado, $seccion);
     $valor = array($nivel, $grado, $seccion);
     $parameter = array();
     $parameter['personas'] = $array;
     $parameter['valor'] = $valor;
     $pdf = PDF::loadView('reportes/reporteDeudasPDF', $parameter);
     return $pdf->stream();
 }
 public function getIndexIslr($id)
 {
     $reportesislr = DB::table('reportesislr')->where('id', '=', $id)->first();
     $facturasislr = DB::table('facturasislr')->where('id_reporteislr', '=', $id)->get();
     $agente = Agente::find(1);
     $proveedor = DB::table('empleados')->where('id', '=', $reportesislr->id_empleado)->first();
     $contador = 0;
     $pdf = PDF::loadView('pdfs.pdfislr', array('reportesislr' => $reportesislr, 'facturasislr' => $facturasislr, 'agente' => $agente, 'proveedor' => $proveedor))->setPaper('Carta')->setOrientation('landscape');
     return $pdf->stream();
     //var_dump($proveedor);
 }
 public function getGenerateManual($role_name = NULL)
 {
     $permission_array = \Login::get_role_permissions($role_name);
     $array = ['role_name' => $role_name];
     $array['title'] = 'Manual de Administrador';
     $array['site'] = \App\Site::find(1);
     $array['nodes'] = \App\Node::whereNull('parent_id')->whereIn('permission', $permission_array)->with('fields', 'children.fields', 'children.children.fields')->get();
     $pdf = \PDF::loadView('pdf.manual', $array);
     $header = \View::make('pdf.header', $array);
     return $pdf->setPaper('letter')->setOption('header-html', $header->render())->stream(trans('admin.manual') . '_' . date('Y-m-d') . '.pdf');
 }
Beispiel #23
0
 public function showpdf($slug)
 {
     $artikel = \App\post::where('slug', $slug)->first();
     if (!empty($artikel)) {
         $data = array('data' => $artikel);
         $pdf = \PDF::loadView('artikel.pdf', $data);
         return $pdf->stream();
         /*return $pdf->download($slug. 'pdf');*/
     } else {
         return redirect(url());
     }
 }
Beispiel #24
0
 private function exportPdfskema($skemas, $tipe)
 {
     $name = Session::get('skclomba') . '_' . Session::get('skcseri') . '.pdf';
     $data['datas'] = $skemas;
     if ($tipe == 'nolint') {
         $pdf = PDF::loadView('skemas.cetaklint', $data)->setPaper('a4')->setOrientation('portrait');
     }
     if ($tipe == 'nourut') {
         $pdf = PDF::loadView('skemas.cetakurut', $data)->setPaper('a4')->setOrientation('portrait');
     }
     return $pdf->download($name);
 }
Beispiel #25
0
 public function testprint()
 {
     //$users = App\Models\User::orderBy('name')->get();
     $data = array('coba' => 'asik');
     $pdf = PDF::loadView('reports.SPPB', $data);
     return $pdf->stream();
     /*
     $pdf = App::make('dompdf');
     $pdf->loadHTML('<h1>Test</h1>');
     return $pdf->stream();
     */
 }
    public function createPDFZG($petitionId)
    {
        $petition = DB::table('mg_petitions')->join('mg_users', 'mg_petitions.user_id', '=', 'mg_users.id')->select(DB::raw('case when (' . env('DAYS_REVIEW') . ' - datediff(now(),mg_petitions.created_at))<0 then 0 else (' . env('DAYS_REVIEW') . ' - datediff(now(),mg_petitions.created_at)) end as days,title, mg_petitions.user_id,body,
										 concat(mg_users.first_name, " ", mg_users.middle_name, " ", mg_users.last_name) as author,
										 phone,email,num,
										 (Select Count(*) From mg_signs where mg_petitions.id = mg_signs.signable_id) as count_signs,
										 CASE status WHEN 1 THEN "триває збір підписів"
										WHEN 2 THEN "на розгляді" ELSE "з відповіддю"
										 END as status_name,mg_petitions.created_at,mg_petitions.id,answer,mg_petitions.checked,mg_petitions.status'))->where('mg_petitions.id', $petitionId)->first();
        $data = ['petition' => $petition];
        $pdf = \PDF::loadView('petition.itemzgpdf', $data);
        return $pdf->stream();
    }
Beispiel #27
0
 public function listadoChofer(Request $request)
 {
     $taxi_id = $request->taxi_id;
     $chofer_id = $request->chofer_id;
     $fecha_desde = $request->fecha_desde;
     $fecha_hasta = $request->fecha_hasta;
     $chofer = Chofer::where('id', $chofer_id)->first();
     $taxi = Taxi::where('id', $taxi_id)->first();
     $liquidaciones = Liquidacion::matricula($taxi->id)->choferid($chofer->id)->fechaDesde($fecha_desde)->fechaHasta($fecha_hasta)->orderBy('fecha', 'ASC')->get();
     $view = view('liquidaciones.pdf_index', compact('liquidaciones', 'chofer', 'taxi', 'fecha_desde', 'fecha_hasta'))->render();
     $pdf = \PDF::loadView('liquidaciones.pdf_index', compact('liquidaciones', 'chofer', 'taxi', 'fecha_desde', 'fecha_hasta'));
     return $pdf->stream();
 }
 public function exportToPdf()
 {
     $data = DB::table('logbooks')->join('priorities', 'logbooks.priorities_id', '=', 'priorities.id')->join('users', 'logbooks.user_id', '=', 'users.id');
     $fromDate = Input::get('fromDate');
     $toDate = Input::get('toDate');
     $sid = Input::get('sid');
     $oid = Input::get('oid');
     if ($oid == 'all') {
         $opName = "Semua Operator";
     } else {
         if ($oid) {
             $user = User::find($oid);
             $opName = $user->first_name . ' ' . $user->last_name;
             $data->where('logbooks.user_id', '=', $oid);
         }
     }
     if ($sid == 'all') {
         $sName = "Semua Status";
     } else {
         if ($sid) {
             $status = Priorities::find($sid);
             $sName = $status->description;
             $data->where('logbooks.priorities_id', '=', $sid);
         }
     }
     $query = $data->select('logbooks.user_id', 'users.id', 'logbooks.created_at', 'logbooks.title', 'logbooks.deskripsi', 'logbooks.priorities_id', 'priorities.description as priority', 'users.first_name', 'users.last_name')->whereBetween('logbooks.created_at', array($fromDate, $toDate))->orderBy('logbooks.created_at', 'asc');
     $logbook = ['data' => $query->get(), 'fromDate' => $fromDate, 'toDate' => $toDate, 'sName' => $sName, 'opName' => $opName, 'count' => $data->count()];
     // $pdf = View::make('export.pdf', $logbook);
     // return $pdf;
     $pdf = PDF::loadView('export.pdf', $logbook);
     return $pdf->stream();
 }
Beispiel #29
-9
 public function verCurriculo($id)
 {
     //$resultado="";
     //$userId=\App\Estudante::find($id)->user_id;
     $userId = Auth::user()->estudante->user_id;
     //$estudante=Estudante::all()->where("user_id",$userId);
     //if()
     if ($id == $userId) {
         // echo $id;
         // echo $userId;
         $resultado = User::with(['endereco', 'contacto', 'estudante', 'estudante.curriculo', 'estudante.curriculo.disponibilidade', 'estudante.curriculo.OutraQualificacao', 'estudante.curriculo.referencia', 'estudante.curriculo.HabilitacaoIntelectual', 'estudante.curriculo.habilitacao', 'estudante.curriculo.experiencia', 'estudante.curriculo.Idioma'])->where('id', $userId)->first();
         $parameter = array();
         $parameter['resultado'] = $resultado;
         /* $html=View::make('ApreciarPerfil')->withData($parameter);
                $dompdf=new \DOMPDF();
                $dompdf->set_base_path(public_path().'/Start/css/MeuStyle');//use style exterior
                $dompdf->load_html($html);
                $dompdf->render();
               $dompdf->stream("cv.pdf");
            }*/
         $pdf = \PDF::loadView('ApreciarPerfil', $parameter);
         return $pdf->stream('Curriculum.pdf');
     } else {
         return "nao foi encontrado";
     }
 }
 public function stock()
 {
     $items = Item::all();
     $organization = Organization::find(1);
     $pdf = PDF::loadView('erpreports.stockReport', compact('items', 'organization'))->setPaper('a4')->setOrientation('potrait');
     return $pdf->stream('Stock Report.pdf');
 }