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/customers/info.blade.php b/resources/views/customers/info.blade.php
index cd97c5c..3738a37 100644
--- a/resources/views/customers/info.blade.php
+++ b/resources/views/customers/info.blade.php
@@ -533,7 +533,7 @@
'RM '+ formatter.format(gadai_detail['bakihargajualan']),
'RM '+formatter.format(gadai_detail['bakipjm']),
(((Number(gadai_detail['pinjaman'])/Number(gadai_detail['nilaimarhun']))*100).toFixed(2)).toLocaleString("en-GB") + '%',
- gadai_detail['jbg'],
+ gadai_detail['tempoh'],
'RM '+ formatter.format(upahsemasa)
]).draw();
}
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')
-
diff --git a/resources/views/print/laporan_gadaian.blade.php b/resources/views/print/laporan_gadaian.blade.php
index 2ee83e4..a5c3aaa 100644
--- a/resources/views/print/laporan_gadaian.blade.php
+++ b/resources/views/print/laporan_gadaian.blade.php
@@ -146,21 +146,21 @@
@@ -169,22 +169,25 @@
LAPORAN GADAIAN |
|
|
-
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', $gadai_date);
- $formattedweddingdate = $myDateTime->format('d-m-Y');
- echo($formattedweddingdate)
- @endphp |
+ Tarikh: |
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $gadai_date);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate)
+ @endphp |
+
+
+ | Tarikh Cetak |
+ @php
+ $myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
+ $formattedweddingdate = $myDateTime->format('d-m-Y');
+ echo($formattedweddingdate)
+ @endphp |
|
|
@@ -205,7 +208,6 @@
Alamat |
No K/P |
Masa |
- Marhun |
Berat |
N Marhun |
Pembiayaan |
@@ -217,17 +219,20 @@
@if($index > 0)
@if($item['teller'] != $gadai[$index - 1]['teller'])
- | Teller : {{$item['teller']}} |
+ Teller : {{ $item['teller'] }} |
+ @php $totalpinjamanteller = 0;$totalnmteller = 0;$totalberatteller = 0; @endphp
@endif
@else
- | Teller : {{$item['teller']}} |
+ Teller : {{ $item['teller'] }} |
+ @php $totalpinjamanteller = 0;$totalnmteller = 0;$totalberatteller = 0; @endphp
+
@endif
| {{ $counter }} |
- {{$item['norujukan']}} |
+ {{$item['norujukan']}} |
@php
$customer_detail = Http::get($api_url . '/api/customers/' . $item['nokp'])->json();
@@ -237,29 +242,35 @@
| {{$customer_detail[0]['alamat1']}} |
{{ $item['nokp'] }} |
{{ $item['masa'] }} |
- {{ $item['marhun'] }} |
{{ number_format($item['berat'],2) }} |
{{ number_format($item['nilaimarhun'],2) }} |
{{ number_format($item['pinjaman'],2) }} |
{{ $item['percentpinj'] }} |
@php $counter++; @endphp
+ @php $totalpinjamanteller += $item['pinjaman'];$totalnmteller += $item['nilaimarhun'];$totalberatteller += $item['berat']; @endphp
@if($index+1 < sizeof($gadai))
@if($item['teller'] != $gadai[$index + 1]['teller'])
- | {{ $counter-1 }} Jumlah Surat Bagi Teller : {{$item['teller']}} |
+ {{ $counter-1 }} Jumlah surat bagi teller : {{ $item['teller'] }} |
+ {{ number_format($totalberatteller,2) }} |
+ {{ number_format($totalnmteller,2) }} |
+ {{ number_format($totalpinjamanteller,2) }} |
- @php $counter = 0; @endphp
+ @php $counter = 1; @endphp
@endif
@else
- | {{ $counter }} Jumlah Bagi Teller : {{$item['teller']}} |
+ {{ $counter-1 }} Jumlah surat bagi teller : {{ $item['teller'] }} |
+ {{ number_format($totalberatteller,2) }} |
+ {{ number_format($totalnmteller,2) }} |
+ {{ number_format($totalpinjamanteller,2) }} |
@endif
@endforeach
- JUMLAH |
- {{ number_format($totalpinjaman,2) }} |
+ JUMLAH KESELURUHAN : |
+ {{ number_format($totalpinjaman,2) }} |
|
diff --git a/resources/views/print/laporan_penebusan.blade.php b/resources/views/print/laporan_penebusan.blade.php
index a3dcc86..5ca2f41 100644
--- a/resources/views/print/laporan_penebusan.blade.php
+++ b/resources/views/print/laporan_penebusan.blade.php
@@ -213,22 +213,22 @@
N Marhun |
Jenis Tebus |
- @php $counter = 0; $totalpembiayaan = 0;@endphp
+ @php $counter = 1; $totalpembiayaan = 0;@endphp
@foreach($tebus as $index=>$item)
@if($index > 0)
@if($item['teller'] != $tebus[$index - 1]['teller'])
- | Teller : {{$item['teller']}} |
+ Teller : {{ $item['teller'] }} |
@endif
@else
- | Teller : {{$item['teller']}} |
+ Teller : {{ $item['teller'] }} |
@endif
- | {{ $loop->iteration }} |
- {{$item['norujukan']}} |
+ {{ $counter }} |
+ {{ $item['norujukan'] }} |
@php
$gadai_detail = Http::get($api_url . '/api/gadai/norujukan/'. $item['norujukan'])->json();
@@ -258,13 +258,13 @@
@if($index+1 < sizeof($tebus))
@if($item['teller'] != $tebus[$index + 1]['teller'])
|
- | {{ $counter }} Jumlah Bagi Teller : {{$item['teller']}} |
+ {{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }} |
@php $counter = 0; @endphp
@endif
@else
- | {{ $counter }} Jumlah Bagi Teller : {{$item['teller']}} |
+ {{ $counter-1 }} Jumlah Bagi Teller : {{ $item['teller'] }} |
@endif
@endforeach
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 |
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+ | Bil |
+ Norujukan |
+ JBG |
+ No. KP |
+ Berat |
+ Nilai Marhun (RM) |
+ Pembiayaan |
+ Lanjutan |
+
+ @php $counter = 1; @endphp
+ @foreach($stokaudit['rekod'] as $index=>$item)
+
+ | {{ $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']}} |
+
+ @php $counter++; @endphp
+ @endforeach
+
+ Jumlah |
+ {{ number_format($stokaudit['totalberat'],2) }} |
+ {{ number_format($stokaudit['totalnilaimarhun'],2) }} |
+ {{ number_format($stokaudit['total'],2) }} |
+ |
+
+
+
+
+
+
+
+ |
+ .................................................................. |
+ |
+ .................................................................. |
+ |
+
+
+ |
+ DI SEMAK |
+ |
+ DI SAHKAN |
+ |
+
+
+
+
+
+
+
+