From e037f5782e4fb865ebf6edfd08aff74b16e32171 Mon Sep 17 00:00:00 2001 From: fifi97 Date: Thu, 22 Apr 2021 09:00:53 +0800 Subject: [PATCH 1/2] laporan --- app/Http/Controllers/KhazanahController.php | 18 +- .../khazanah/laporan/stokaudit.blade.php | 125 ++++++--- .../laporan_stokauditbelumaktif.blade.php | 257 ++++++++++++++++++ 3 files changed, 360 insertions(+), 40 deletions(-) create mode 100644 resources/views/print/laporan_stokauditbelumaktif.blade.php diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index 44286f0..157e18e 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -2077,7 +2077,7 @@ class KhazanahController extends Controller } public function cetakLaporanStokAudit(Request $request){ - // dd($request); + $api_url = config('api.url'); $auth_user = Auth::user(); $current = Carbon::now(); @@ -2089,13 +2089,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
+ + + + + + From 56f33541772b0e31d18c74792677facbd1d0ad47 Mon Sep 17 00:00:00 2001 From: MUHD HAFIFIE Date: Thu, 22 Apr 2021 12:50:07 +0800 Subject: [PATCH 2/2] fix jbg gadai customerinfo --- resources/views/customers/info.blade.php | 2 +- .../views/print/laporan_gadaian.blade.php | 65 +++++++++++-------- .../views/print/laporan_penebusan.blade.php | 14 ++-- 3 files changed, 46 insertions(+), 35 deletions(-) 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/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