laporan prestasi ar-rahn
This commit is contained in:
@@ -882,4 +882,46 @@ class AkaunController extends Controller
|
||||
return $pdf->download('laporan_aging_' . $request->kodcaw .'_'. $tebus_date . '.pdf');
|
||||
// return view('akaun.laporan_aging', compact('aging','cawangan_detail','tarikh_cetak','tebus_date','api_url'));
|
||||
}
|
||||
|
||||
public function cetakLaporanPrestasi(Request $request)
|
||||
{
|
||||
$api_url = $request->hostname;
|
||||
$auth_user = Auth::user();
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
$tarikh_cetak = $current->toDateString();
|
||||
|
||||
if($request->datemula == null){
|
||||
$mula_date = '2017-01-01';
|
||||
}else{
|
||||
$split_date = explode('-', $request->datemula);
|
||||
// $mula_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
|
||||
$mula_date = $request->datemula;
|
||||
}
|
||||
|
||||
if($request->datehingga == null){
|
||||
$hingga_date = $current->toDateString();
|
||||
}else{
|
||||
$split_date = explode('-', $request->datehingga);
|
||||
// $hingga_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
|
||||
$hingga_date = $request->datehingga;
|
||||
}
|
||||
|
||||
$gadaiallcaw = Http::get(config('api.url'). '/api/laporanllcaw/gadai',['mula_date' => $mula_date,'hingga_date' => $hingga_date ])->json();
|
||||
|
||||
|
||||
|
||||
if(isset($request->jenis))
|
||||
{
|
||||
if($request->jenis == 'pdf')
|
||||
{
|
||||
$pdf = PDF::loadView('akaun.laporan_prestasi', compact('gadaiallcaw','tarikh_cetak','mula_date','hingga_date','api_url'))->setPaper('a4', 'potrait');
|
||||
return $pdf->download('laporan_prestasi-'. $mula_date . '.pdf');
|
||||
}else{
|
||||
return view('akaun.laporan_prestasi', compact('gadaiallcaw','tarikh_cetak','mula_date','hingga_date','api_url'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,6 +101,11 @@
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Aging</h2>
|
||||
</router-link>
|
||||
</div>
|
||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
||||
<router-link to="/akaunhome/prestasi">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">PRESTASI AR-RAHN</h2>
|
||||
</router-link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
|
||||
<div class="flex w-full">
|
||||
<div class="xl:w-2/3 2xl:w-1/2 p-8 mx-auto">
|
||||
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-4 rounded-t-lg">
|
||||
<router-link to="/akaunhome">
|
||||
<i class="fas fa-backspace text-white"></i>
|
||||
</router-link>
|
||||
|
||||
<span class="text-center mx-auto text-white font-bold">Laporan Prestasi AR-RAHN</span>
|
||||
</div>
|
||||
<form method="get" id="formupah" :action="Urlredirect()" target="_blank">
|
||||
<div class="rounded bg-white shadow p-6">
|
||||
<div class="pb-6">
|
||||
<div class="flex justify-center mb-4">
|
||||
<input :value="jenisgenerate" type="hidden" name="jenis" />
|
||||
<input :value="$kodcaw" name="kodcaw" hidden/>
|
||||
<input :value="$hostname" name="hostname" hidden/>
|
||||
<span style="background-color: #F9FAFB" class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap">Mula</span>
|
||||
<input id="tarikhmula" name="datemula" class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2" type="date" />
|
||||
<span style="background-color: #F9FAFB" class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap">Hingga</span>
|
||||
<input id="tarikhhingga" name="datehingga" class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2" type="date" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end mt-10">
|
||||
<button @click.prevent="generatepdf" class=" mr-2 border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"><i class="fas fa-file-pdf mr-2"></i>PDF</button>
|
||||
<button @click.prevent="generateview" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"><i class="fas fa-eye mr-2"></i>View</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
jenisgenerate:'none',
|
||||
kodcaw:''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async generatepdf(){
|
||||
await this.setJenis('pdf');
|
||||
|
||||
|
||||
Vue.swal({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
showCancelButton: false,
|
||||
showConfirmButton: false,
|
||||
timer: 8000,
|
||||
});
|
||||
|
||||
document.getElementById("formupah").submit();
|
||||
},
|
||||
async generateview(){
|
||||
await this.setJenis('view');
|
||||
|
||||
|
||||
Vue.swal({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
showCancelButton: false,
|
||||
showConfirmButton: false,
|
||||
timer: 8000,
|
||||
});
|
||||
|
||||
document.getElementById("formupah").submit();
|
||||
},
|
||||
Urlredirect: function() {
|
||||
return window.route('cetak.prestasi')
|
||||
},
|
||||
setJenis: function(value){
|
||||
return this.jenisgenerate = value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
Vendored
+2
@@ -18,6 +18,7 @@ import RingkasanHarian from './Akaun/RingkasanHarian'
|
||||
import RingkasanTerkumpul from './Akaun/RingkasanTerkumpul'
|
||||
import StokAuditBackdate from './Akaun/StokAuditBackdate'
|
||||
import Aging from './Akaun/Aging'
|
||||
import Prestasi from './Akaun/Prestasi'
|
||||
|
||||
|
||||
|
||||
@@ -69,6 +70,7 @@ export default new VueRouter({
|
||||
{ path: '/akaunhome/RingkasanTerkumpul', component: RingkasanTerkumpul },
|
||||
{ path: '/akaunhome/StokAuditBackdate', component: StokAuditBackdate },
|
||||
{ path: '/akaunhome/Aging', component: Aging },
|
||||
{ path: '/akaunhome/prestasi', component: Prestasi },
|
||||
|
||||
|
||||
{ path: '/bajet/kemaskini', component: SenaraiBajet },
|
||||
|
||||
@@ -0,0 +1,257 @@
|
||||
<style>
|
||||
#header {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#header td, #customers th {
|
||||
|
||||
padding:4px;
|
||||
font-size:10px;
|
||||
}
|
||||
|
||||
#header tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#header tr:hover {background-color: #ddd;}
|
||||
|
||||
#header th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
#scan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#scan td, #scan th {
|
||||
|
||||
padding: 8px;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#scan tr:hover {background-color: #ddd;}
|
||||
|
||||
#scan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<style>
|
||||
#scan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#scan td, #scan th {
|
||||
border-collapse: collapse;
|
||||
padding: 8px;
|
||||
font-size:11px;
|
||||
|
||||
}
|
||||
|
||||
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#scan tr:hover {background-color: #ddd;}
|
||||
|
||||
#scan th {
|
||||
border-collapse: collapse;
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
#details {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#details td, #details th {
|
||||
|
||||
padding: 8px;
|
||||
font-size:8px;
|
||||
border: 0.1px solid black;
|
||||
|
||||
}
|
||||
|
||||
#details tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#details tr:hover {background-color: #ddd;}
|
||||
|
||||
#details th {
|
||||
padding-top: 12px;
|
||||
font-style:bold;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
#sign {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#sign td, #sign th {
|
||||
|
||||
padding: 8px;
|
||||
font-size:11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#sign tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#sign tr:hover {background-color: #ddd;}
|
||||
|
||||
#sign th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table id="header">
|
||||
<tr>
|
||||
{{-- <th rowspan="4" style="width:50px"><br><img src="{{ asset('img/ARRAHN1.png') }}" style="width:70px"></img></th> --}}
|
||||
{{-- <th colspan="1">KOPERASI PERMODALAN KELANTAN BERHAD</th> --}}
|
||||
</tr>
|
||||
<tr>
|
||||
{{-- <td style="font-size:20px;font-weight:bold;">{{ $cawangan_detail['namacaw'] }}</td> --}}
|
||||
<td></td>
|
||||
</tr>
|
||||
{{-- <tr>
|
||||
<td>{{ $cawangan_detail['alamat1'] }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['alamat2'].' No Tel : '. $cawangan_detail['notel'].' No Faks : '. $cawangan_detail['nofaks'] }}</td>
|
||||
<td></td>
|
||||
</tr> --}}
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table id="scan">
|
||||
<tr>
|
||||
<th colspan ="5"><b>LAPORAN URUS NIAGA AR-RAHN PADA @php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $mula_date);
|
||||
$date = $myDateTime->format('d-m-Y');
|
||||
echo($date)
|
||||
@endphp
|
||||
|
||||
HINGGA @php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $hingga_date);
|
||||
$date = $myDateTime->format('d-m-Y');
|
||||
echo($date)
|
||||
@endphp</b></th>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:1000px">Tarikh Cetak: @php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
|
||||
$date_cetak = $myDateTime->format('d-m-Y');
|
||||
echo($date_cetak)
|
||||
@endphp</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<table id="details">
|
||||
|
||||
<tr>
|
||||
<th rowspan="2" >Cawangan </th>
|
||||
<th colspan="2" style="text-align:center">Bilangan Orang</th>
|
||||
<th colspan="2" style="text-align:center">Bilangan Surat</th>
|
||||
<th colspan="5" style="text-align:center">Jumlah (RM)</th>
|
||||
<th rowspan="2" >Jumlah Pinjaman Semasa (RM)</th>
|
||||
<th rowspan="2" >Baki Awal (RM)</th>
|
||||
<th rowspan="2" >Baki Akhir (RM)</th>
|
||||
<th rowspan="2" >Bilangan Pelanggan Baru</th>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Gadai</th>
|
||||
<th>Tebus</th>
|
||||
<th>Gadai</th>
|
||||
<th>Tebus</th>
|
||||
<th>Gadaian</th>
|
||||
<th>Penebusan</th>
|
||||
<th>Upah Tebus</th>
|
||||
<th>Upah Ansuran</th>
|
||||
<th>Jumlah Upah</th>
|
||||
|
||||
</tr>
|
||||
|
||||
@foreach($gadaiallcaw as $item)
|
||||
|
||||
<tr>
|
||||
{{-- <h4 id="bakiakhir">RM {{ number_format($alirantunai['baki'],2) }}</h4> --}}
|
||||
|
||||
<td style="width:100px">{{$item['cawangan']}}</td>
|
||||
<td style="width:100px">{{$item['jum_org_gadai']}}</td>
|
||||
<td style="width:100px">{{$item['jum_org_tebus']}}</td>
|
||||
<td style="width:100px">{{$item['jum_surat_gadai']}}</td>
|
||||
<td style="width:100px">{{$item['jum_surat_t']}}</td>
|
||||
<td style="width:100px">{{number_format($item['jumlah_gadai'],2) }}</td>
|
||||
<td style="width:100px">{{number_format($item['jum_penebusan'],2) }}</td>
|
||||
<td style="width:100px">{{number_format($item['jumlah_upah'],2) }}</td>
|
||||
<td style="width:100px">{{number_format($item['jum_ansuranupah'],2) }}</td>
|
||||
<td style="width:100px">{{number_format($item['jum_keseluruhan_upah'],2) }}</td>
|
||||
<td style="width:100px">{{number_format($item['jum_pinjaman_semasa'],2) }}</td>
|
||||
<td style="width:100px">{{number_format($item['bakiawal'],2) }}</td>
|
||||
<td style="width:100px">{{number_format($item['bakiakhir'],2) }}</td>
|
||||
<td style="width:100px">{{$item['bil_pelanggan_baru']}}</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -90,6 +90,7 @@ Route::get('/akaunhome/cetakperbelanjaan',['as'=>'cetak.perbelanjaan','uses'=>'A
|
||||
Route::get('/akaunhome/cetakringkasanterkumpul',['as'=>'cetak.ringkasanterkumpul','uses'=>'App\Http\Controllers\AkaunController@cetakLaporanRingkasanTerkumpul'])->middleware(['roleChecker:admin,akaun,operasi']);
|
||||
Route::get('/akaunhome/cetakstokauditbackdate',['as'=>'cetak.stokauditbackdate','uses'=>'App\Http\Controllers\AkaunController@cetakLaporanStokAuditBackdate'])->middleware(['roleChecker:admin,akaun,operasi']);
|
||||
Route::get('/akaunhome/cetakaging',['as'=>'cetak.aging','uses'=>'App\Http\Controllers\AkaunController@cetakLaporanAging'])->middleware(['roleChecker:admin,akaun,operasi']);
|
||||
Route::get('/akaunhome/prestasi',['as'=>'cetak.prestasi','uses'=>'App\Http\Controllers\AkaunController@cetakLaporanPrestasi'])->middleware(['roleChecker:admin,akaun,operasi']);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user