tambah format pdf suratwakil

This commit is contained in:
BTMS2
2024-11-05 14:44:40 +08:00
parent b7031de020
commit 4bd3c21c8e
5 changed files with 42 additions and 29 deletions
+9 -2
View File
@@ -9,6 +9,7 @@ use Illuminate\Http\Request;
use Carbon\Carbon;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Session;
use PDF;
class ProfileController extends Controller
{
@@ -90,7 +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'));
// 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
@@ -141,7 +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'));
// 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');
}
}
}