예제 #1
0
 public function printData($id)
 {
     $transaksi = Transaksi::where('kode', $id)->firstOrFail();
     $angsuran = Angsuran::where('kode', $id)->orderBy('created_at', 'desc')->firstOrFail();
     $pdf = PDF::loadView('laporan.index', compact('angsuran', 'transaksi'));
     return $pdf->stream();
 }
예제 #2
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id, $idtransaksi)
 {
     $debitur = Debitur::findOrFail($id);
     $transaksi = Transaksi::findOrFail($idtransaksi);
     $angsuran = Angsuran::where('kode', $transaksi->kode)->orderBy('created_at', 'desc')->get();
     $data = Angsuran::where('kode', $transaksi->kode)->count();
     $tempo = $data + 1;
     return view('transaksi.show', compact('debitur', 'transaksi', 'angsuran', 'tempo'));
 }