diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index 03a6115..f22c378 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -2078,7 +2078,7 @@ class KhazanahController extends Controller } public function cetakLaporanStokAudit(Request $request){ - // dd($request); + $api_url = config('api.url'); $auth_user = Auth::user(); $current = Carbon::now(); @@ -2090,13 +2090,21 @@ class KhazanahController extends Controller $split_date = explode('-',$request->datetimepicker1); $tebus_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0]; } - // $stokaudit = Http::get(config('api.url'). '/api/gadai/cawangan/'. $auth_user['cawangan']. '/' . $tebus_date)->json(); - $stokaudit = Http::get(config('api.url'). '/api/stokaudit/aktif/'. $auth_user['cawangan'],['tarikh' => $tebus_date])->json(); - + $cawangan=Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json(); $cawangan_detail=$cawangan[0]; + + if($request->radaktif === 'aktif') + { + $stokaudit = Http::get(config('api.url'). '/api/stokaudit/aktif/'. $auth_user['cawangan'],['tarikh' => $tebus_date])->json(); + return view('print.laporan_stokaudit', compact('stokaudit','cawangan_detail','tarikh_cetak','tebus_date','api_url')); + }else{ + $stokaudit = Http::get(config('api.url'). '/api/stokaudit/takaktif/'. $auth_user['cawangan'],['tarikh' => $tebus_date])->json(); + return view('print.laporan_stokauditbelumaktif', compact('stokaudit','cawangan_detail','tarikh_cetak','tebus_date','api_url')); + } + + // dd($gadai); - return view('print.laporan_stokaudit', compact('stokaudit','cawangan_detail','tarikh_cetak','tebus_date','api_url')); } public function laporanBatalSuratGadai(){ diff --git a/resources/views/khazanah/laporan/stokaudit.blade.php b/resources/views/khazanah/laporan/stokaudit.blade.php index 32946d7..50f89fb 100644 --- a/resources/views/khazanah/laporan/stokaudit.blade.php +++ b/resources/views/khazanah/laporan/stokaudit.blade.php @@ -1,4 +1,63 @@ @extends('layouts.app') + @section('content')
@@ -20,45 +79,41 @@
-
-
-
- @csrf -
-
- Tarikh + +
+
+
+ + @csrf +
+
+ Tarikh +
+ +
- - -
- + +
-
-
-
- - - - - - - - - - - - - - -
BilNo RujukanJBGNo KPMarhunBeratN.M (RM)PembiayaanJT
-
-
-
-
- Bilangan Surat : 3 - Jumlah Pinjaman : RM 3,000.00 +

+
+ +
+ + +
+
+
+
diff --git a/resources/views/print/laporan_stokauditbelumaktif.blade.php b/resources/views/print/laporan_stokauditbelumaktif.blade.php new file mode 100644 index 0000000..0d5a442 --- /dev/null +++ b/resources/views/print/laporan_stokauditbelumaktif.blade.php @@ -0,0 +1,257 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
Laporan Stok Audit Tarikh Cetak: + @php + $myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak); + $formattedweddingdate = $myDateTime->format('d-m-Y'); + echo($formattedweddingdate) + @endphp +
TARIKH@php + $myDateTime = DateTime::createFromFormat('Y-m-d', $tebus_date); + $formattedweddingdate = $myDateTime->format('d-m-Y'); + echo($formattedweddingdate) + @endphp +
+ +
+ + + + + + + + + + + + @php $counter = 1; @endphp + @foreach($stokaudit['rekod'] as $index=>$item) + + + + + + + + + + + @php $counter++; @endphp + @endforeach + + + + + + + +
BilNorujukanJBGNo. KPBeratNilai Marhun (RM)PembiayaanLanjutan
{{ $counter }}{{$item['norujukan']}}{{ $item['jbg'] }}{{$item['nokp']}}{{ number_format($item['berat'],2) }}{{ number_format($item['nilaimarhun'],2) }}{{ number_format($item['pinjaman'],2) }}{{$item['lelong_tawarruq']}}
Jumlah{{ number_format($stokaudit['totalberat'],2) }}{{ number_format($stokaudit['totalnilaimarhun'],2) }}{{ number_format($stokaudit['total'],2) }}
+ +
+
+ + + + + + + + + + + + + + + +
.................................................................. ..................................................................
DI SEMAK DI SAHKAN
+ + + + + +