temporary direct print before php gd work
This commit is contained in:
@@ -255,10 +255,13 @@ class BayaranController extends Controller
|
||||
$gadai = $gadai_details[0][0];
|
||||
|
||||
// Load a view and pass data to it
|
||||
if($request->jenis == 'pdf'){
|
||||
$pdf = PDF::loadView('pembayaran.resit.resitpdf', compact('customer_details', 'payment_details', 'cawangan_detail', 'nama_cawangan', 'gadai'));
|
||||
|
||||
// Return the generated PDF (inline display in browser)
|
||||
return $pdf->stream('resit_pembayaran.pdf');
|
||||
}else{
|
||||
return view('pembayaran.resit.resitpdf', compact('customer_details', 'payment_details', 'cawangan_detail', 'nama_cawangan', 'gadai'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function callback(Request $request)
|
||||
|
||||
@@ -91,10 +91,10 @@ class ProfileController extends Controller
|
||||
// dd($gadai_details);
|
||||
|
||||
|
||||
// return view('print.surat_wakil', compact('customer_detail', 'current', 'kodcaw', 'api_url', 'cawangan_detail', 'tarikh_cetak', 'gadai_details', 'noic', 'nosiri'));
|
||||
$pdf = PDF::loadView('print.surat_wakil', compact('customer_detail', 'current', 'kodcaw', 'api_url', 'cawangan_detail', 'tarikh_cetak', 'gadai_details', 'noic', 'nosiri'))
|
||||
->setPaper('a4', 'potrait');
|
||||
return $pdf->download('Surat Wakil.pdf');
|
||||
return view('print.surat_wakil', compact('customer_detail', 'current', 'kodcaw', 'api_url', 'cawangan_detail', 'tarikh_cetak', 'gadai_details', 'noic', 'nosiri'));
|
||||
// $pdf = PDF::loadView('print.surat_wakil', compact('customer_detail', 'current', 'kodcaw', 'api_url', 'cawangan_detail', 'tarikh_cetak', 'gadai_details', 'noic', 'nosiri'))
|
||||
// ->setPaper('a4', 'potrait');
|
||||
// return $pdf->download('Surat Wakil.pdf');
|
||||
} else {
|
||||
|
||||
// insert into wakil_surat
|
||||
@@ -145,10 +145,10 @@ class ProfileController extends Controller
|
||||
// ->setPaper('A4','potrait');
|
||||
// return $pdf->download('notislelong_'.'.pdf');
|
||||
|
||||
// return view('print.surat_wakil', compact('customer_detail', 'current', 'kodcaw', 'api_url', 'cawangan_detail', 'tarikh_cetak', 'gadai_details', 'noic', 'nosiri'));
|
||||
$pdf = PDF::loadView('print.surat_wakil', compact('customer_detail', 'current', 'kodcaw', 'api_url', 'cawangan_detail', 'tarikh_cetak', 'gadai_details', 'noic', 'nosiri'))
|
||||
->setPaper('a4', 'potrait');
|
||||
return $pdf->download('Surat Wakil.pdf');
|
||||
return view('print.surat_wakil', compact('customer_detail', 'current', 'kodcaw', 'api_url', 'cawangan_detail', 'tarikh_cetak', 'gadai_details', 'noic', 'nosiri'));
|
||||
// $pdf = PDF::loadView('print.surat_wakil', compact('customer_detail', 'current', 'kodcaw', 'api_url', 'cawangan_detail', 'tarikh_cetak', 'gadai_details', 'noic', 'nosiri'))
|
||||
// ->setPaper('a4', 'potrait');
|
||||
// return $pdf->download('Surat Wakil.pdf');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,5 +89,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.print();
|
||||
setTimeout(function () {
|
||||
window.close();
|
||||
}, 100);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -126,13 +126,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form method="POST" name="generateresit" action="{{ route('resit.pdf') }}">
|
||||
<form method="POST" name="generateresit" action="{{ route('resit.pdf') }}" target="_blank" id="myForm">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12 text-center" id="rem">
|
||||
@csrf
|
||||
<input type="hidden" name="billplzid" value="{{ $payment_details['billplz_id'] }}">
|
||||
<input type="hidden" name="norujukan" value="{{ $payment_details['norujukan'] }}">
|
||||
<input type="hidden" name="company" value="{{ $company }}">
|
||||
<input type="hidden" name="jenis" value="print">
|
||||
<a class="btn btn-primary"onclick="loadingbtn();" href="{{ route('home') }}">Kembali Muka Hadapan</a>
|
||||
<button class="btn btn-primary" onclick="cetakresit()">Cetak Resit</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user