fix skit2
This commit is contained in:
@@ -922,6 +922,47 @@ class AkaunController extends Controller
|
||||
// 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'). '/admin/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', 'landscape');
|
||||
return $pdf->download('laporan_prestasi-'. $mula_date . '.pdf');
|
||||
}else{
|
||||
return view('akaun.laporan_prestasi', compact('gadaiallcaw','tarikh_cetak','mula_date','hingga_date','api_url'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function cetakimbangdugaExtended(Request $request)
|
||||
{
|
||||
|
||||
@@ -978,10 +1019,12 @@ class AkaunController extends Controller
|
||||
|
||||
|
||||
//Perubahan Terbaru
|
||||
$keun_sebenar = Http::get($request->hostname.'/admin/ig/keuntungansebenar' . $request->kodcaw,['tarikh' => $tarikh_imbangan2])->json();
|
||||
$pend_terakru = Http::get($request->hostname.'/admin/ig/pendapatanterakru' . $request->kodcaw,['tarikh' => $tarikh_imbangan2])->json();
|
||||
$keun_sebenar = Http::get($request->hostname.'/admin/ig/keuntungansebenar',['kodcaw' => $request->kodcaw, 'tarikh' => $tarikh_imbangan2])->json();
|
||||
$pend_terakru = Http::get($request->hostname.'/admin/ig/pendapatanterakru',['kodcaw' => $request->kodcaw, 'tarikh' => $tarikh_imbangan2])->json();
|
||||
$keun_penggadai = Http::get($request->hostname.'/api/KeuntunganPenggadai/' . $request->kodcaw,['tarikh' => $tarikh_imbangan2])->json();
|
||||
|
||||
dd($keun_sebenar,$pend_terakru);
|
||||
|
||||
dd($keun_sebenar,$pend_terakru,$keun_penggadai);
|
||||
|
||||
//TunaiDitangan Sementara Upah
|
||||
if($tarikh_imbangan2 >= '2021-04-22' && $tarikh_imbangan2 < '2021-05-05')
|
||||
|
||||
@@ -114,6 +114,11 @@
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Imbang Duga Extend.</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>
|
||||
@@ -16,6 +16,12 @@
|
||||
<div>:</div>
|
||||
<div class="ml-2 w-1/3"><b>RM {{ formattext(sb.baki) }} </b></div>
|
||||
</div>
|
||||
<div class="flex flex-row font-normal text-gray-700 dark:text-gray-400">
|
||||
<div class="w-1/3">Tarikh WTD
|
||||
</div>
|
||||
<div>:</div>
|
||||
<div class="ml-2 w-1/3"><b> {{ (sb.t_jual) ? sb.t_jual : 'Tiada' }} </b></div>
|
||||
</div>
|
||||
<div class="flex flex-row font-normal text-gray-700 dark:text-gray-400">
|
||||
<div class="w-1/3">Diprocess
|
||||
</div>
|
||||
|
||||
@@ -421,6 +421,9 @@
|
||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Bil
|
||||
</th>
|
||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Cawangan
|
||||
</th>
|
||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Norujukan
|
||||
</th>
|
||||
@@ -442,6 +445,9 @@
|
||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Caj Lelong
|
||||
</th>
|
||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Action
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -484,7 +490,7 @@
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3">
|
||||
<p class="text-gray-900 whitespace-no-wrap" v-text="lelong.t_update">
|
||||
<p class="text-gray-900 whitespace-no-wrap" v-text="lelong.t_lelong">
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -492,7 +498,7 @@
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3">
|
||||
<p class="text-gray-900 whitespace-no-wrap" v-text="formatexchange(lelong.bakipjm)">
|
||||
<p class="text-gray-900 whitespace-no-wrap" v-text="(lelong.trkhtuntut) ? lelong.trkhtuntut : '-'">
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -500,7 +506,7 @@
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3">
|
||||
<p class="text-gray-900 whitespace-no-wrap" v-text="lelong.percentpinj">
|
||||
<p class="text-gray-900 whitespace-no-wrap" v-text="formatexchange(lelong.pinjaman)">
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -508,7 +514,23 @@
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3">
|
||||
<p class="text-gray-900 whitespace-no-wrap" v-text="lelong.tempoh">
|
||||
<p class="text-gray-900 whitespace-no-wrap" v-text="formatexchange(lelong.hargajual)">
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3">
|
||||
<p class="text-gray-900 whitespace-no-wrap" v-text="formatexchange(lelong.baki)">
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3">
|
||||
<p class="text-gray-900 whitespace-no-wrap" v-text="formatexchange(lelong.cajlelong)">
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Vendored
+2
@@ -21,6 +21,7 @@ import StokAuditBackdate from './Akaun/StokAuditBackdate'
|
||||
import Aging from './Akaun/Aging'
|
||||
import PetiBesi from './Akaun/PetiBesi'
|
||||
|
||||
import Prestasi from './Akaun/Prestasi'
|
||||
|
||||
|
||||
|
||||
@@ -74,6 +75,7 @@ export default new VueRouter({
|
||||
{ path: '/akaunhome/StokAuditBackdate', component: StokAuditBackdate },
|
||||
{ path: '/akaunhome/Aging', component: Aging },
|
||||
{ path: '/akaunhome/PetiBesi', component: PetiBesi },
|
||||
{ path: '/akaunhome/prestasi', component: Prestasi },
|
||||
|
||||
|
||||
{ path: '/bajet/kemaskini', component: SenaraiBajet },
|
||||
|
||||
@@ -0,0 +1,228 @@
|
||||
<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>
|
||||
<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>
|
||||
<td style="width:50px">{{$item['cawangan']}}</td>
|
||||
<td style="width:50px">{{$item['jum_org_gadai']}}</td>
|
||||
<td style="width:50px">{{$item['jum_org_tebus']}}</td>
|
||||
<td style="width:50px">{{$item['jum_surat_gadai']}}</td>
|
||||
<td style="width:50px">{{$item['jum_surat_t']}}</td>
|
||||
<td style="width:50px">{{number_format($item['jumlah_gadai'],2) }}</td>
|
||||
<td style="width:50px">{{number_format($item['jum_penebusan'],2) }}</td>
|
||||
<td style="width:50px">{{number_format($item['jumlah_upah'],2) }}</td>
|
||||
<td style="width:50px">{{number_format($item['jum_ansuranupah'],2) }}</td>
|
||||
<td style="width:50px">{{number_format($item['jum_keseluruhan_upah'],2) }}</td>
|
||||
<td style="width:50px">{{number_format($item['jum_pinjaman_semasa'],2) }}</td>
|
||||
<td style="width:50px">{{number_format($item['bakiawal'],2) }}</td>
|
||||
<td style="width:50px">{{number_format($item['bakiakhir'],2) }}</td>
|
||||
<td style="width:50px">{{$item['bil_pelanggan_baru']}}</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -92,6 +92,7 @@ Route::get('/akaunhome/cetakringkasanterkumpul',['as'=>'cetak.ringkasanterkumpul
|
||||
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/cetakpetibesi',['as'=>'cetak.petibesi','uses'=>'App\Http\Controllers\AkaunController@cetakPetiBesi'])->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