Merge branch 'fasa2lelong' into 'main'
tambahan laporan akru bulanan See merge request online-sistem1/admin-portal!29
This commit is contained in:
@@ -192,6 +192,13 @@ class AkaunController extends Controller
|
||||
$totaltunaiditangan = $tunaiditangan;
|
||||
}
|
||||
|
||||
if($tarikh_imbangan2 >= '2022-11-24' && $request->kodcaw == '010219')
|
||||
{
|
||||
$totaltunaiditangan = $totaltunaiditangan - 78379.9;
|
||||
}else{
|
||||
$penghutangkaki = $penghutangkaki - 78379.9;
|
||||
}
|
||||
|
||||
$jualan1stop = 0;$belian1stop = 0;$utgterkumpulxtra = 0;$rugilelongxtra = 0;$bakilelongxtra = 0;$cajlelongxtra = 0;$upahsimpanxtra = 0;
|
||||
//1Stop Special Case
|
||||
if($request->kodcaw === '1STOP')
|
||||
@@ -1138,4 +1145,22 @@ class AkaunController extends Controller
|
||||
|
||||
// return view('akaun.laporan_imbanduga',compact('tarikh_imbangan', 'tarikh_imbangan2','hartasemasa','untungrugifield','tanggungansemasa','totalhartasemasa','totaluntungrugi','totaltanggungansemasa','tarikh_cetak','cawangan_info','cawangan','api_url','cawangan_detail'));
|
||||
}
|
||||
|
||||
public function cetak_akru_bulanan(Request $request){
|
||||
$auth_user = Auth::user();
|
||||
|
||||
$akrubulan = Http::get(config('api.url').'/admin/laporan/akrubulan',['year' => '2022'])->json();
|
||||
|
||||
if(isset($request->jenis))
|
||||
{
|
||||
if($request->jenis == 'pdf')
|
||||
{
|
||||
$pdf = PDF::loadView('akaun.laporan_akrubulan',compact('akrubulan'))->setPaper('a4', 'potrait');
|
||||
return $pdf->download('laporan_akrubulan' . '2022' . '.pdf');
|
||||
}else{
|
||||
return view('akaun.laporan_akrubulan',compact('akrubulan'));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
<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 Akru Bulanan</span>
|
||||
</div>
|
||||
<form method="get" id="formakru" :action="Urlredirect()" target="_blank">
|
||||
<div class="rounded bg-white shadow p-6">
|
||||
<input :value="jenisgenerate" type="hidden" name="jenis" />
|
||||
<input :value="$kodcaw" name="kodcaw" hidden/>
|
||||
<input :value="$hostname" name="hostname" hidden/>
|
||||
<div class="flex justify-center 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("formakru").submit();
|
||||
},
|
||||
async generateview(){
|
||||
await this.setJenis('view');
|
||||
|
||||
|
||||
Vue.swal({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
showCancelButton: false,
|
||||
showConfirmButton: false,
|
||||
timer: 8000,
|
||||
});
|
||||
|
||||
document.getElementById("formakru").submit();
|
||||
},
|
||||
Urlredirect: function() {
|
||||
return window.route('cetak.akrubulan')
|
||||
},
|
||||
setJenis: function(value){
|
||||
return this.jenisgenerate = value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -122,6 +122,14 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ml-3 grid grid-cols-3">
|
||||
<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/akrubulan">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Akru Bulanan</h2>
|
||||
</router-link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<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 class="w-1/3">Status
|
||||
</div>
|
||||
<div>:</div>
|
||||
<div class="w-1/3 ml-2">
|
||||
|
||||
Vendored
+2
-1
@@ -20,7 +20,7 @@ import RingkasanTerkumpul from './Akaun/RingkasanTerkumpul'
|
||||
import StokAuditBackdate from './Akaun/StokAuditBackdate'
|
||||
import Aging from './Akaun/Aging'
|
||||
import PetiBesi from './Akaun/PetiBesi'
|
||||
|
||||
import AkruBulan from './Akaun/AkruBulan'
|
||||
import Prestasi from './Akaun/Prestasi'
|
||||
|
||||
|
||||
@@ -76,6 +76,7 @@ export default new VueRouter({
|
||||
{ path: '/akaunhome/Aging', component: Aging },
|
||||
{ path: '/akaunhome/PetiBesi', component: PetiBesi },
|
||||
{ path: '/akaunhome/prestasi', component: Prestasi },
|
||||
{ path: '/akaunhome/akrubulan', component: AkruBulan },
|
||||
|
||||
|
||||
{ path: '/bajet/kemaskini', component: SenaraiBajet },
|
||||
|
||||
@@ -0,0 +1,227 @@
|
||||
<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%;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
#details td, #details th {
|
||||
border-style: solid;
|
||||
padding: 8px;
|
||||
font-size:8px;
|
||||
}
|
||||
|
||||
#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="scan">
|
||||
<tr>
|
||||
<th colspan ="5"><b>LAPORAN AKRU BULANAN </b></th>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th>
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:50px">
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<table id="details">
|
||||
<tr>
|
||||
<th>Cawangan</th>
|
||||
<th>Januari</th>
|
||||
<th>Februari</th>
|
||||
<th>Mac</th>
|
||||
<th>April</th>
|
||||
<th>Mei</th>
|
||||
<th>Jun</th>
|
||||
<th>Julai</th>
|
||||
<th>Ogos</th>
|
||||
<th>September</th>
|
||||
<th>Oktober</th>
|
||||
<th>November</th>
|
||||
<th>Disember</th>
|
||||
<th>Jumlah</th>
|
||||
</tr>
|
||||
@foreach($akrubulan as $index=>$akru)
|
||||
<tr>
|
||||
<td>{{ $akru['cawangan'] }}</td>
|
||||
@php $sizeakru = sizeof($akru['akru']);$totalcawangan = 0;@endphp
|
||||
@for($i=1;$i<=12;$i++)
|
||||
@if($i > $sizeakru)
|
||||
<td>0.00</td>
|
||||
@else
|
||||
@php $totalcawangan += $akru['akru'][$i-1]['jumlah'];@endphp
|
||||
<td>{{ number_format($akru['akru'][$i-1]['jumlah'],2) }}</td>
|
||||
@endif
|
||||
@endfor
|
||||
<td>{{ number_format($totalcawangan,2) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tfoot>
|
||||
|
||||
</tfoot>
|
||||
</table>
|
||||
<br><br>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<table id="sign">
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="2"> .................................................................. </td>
|
||||
<td> </td>
|
||||
<td colspan="2">.................................................................. </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="2"><B> DI SEMAK</B> </td>
|
||||
<td> </td>
|
||||
<td colspan="2"><B>DI SAHKAN </B></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@ Route::get('/akaunhome/cetakstokauditbackdate',['as'=>'cetak.stokauditbackdate',
|
||||
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']);
|
||||
Route::get('/akaunhome/cetakakrubulan',['as'=>'cetak.akrubulan','uses'=>'App\Http\Controllers\AkaunController@cetak_akru_bulanan'])->middleware(['roleChecker:admin,akaun,operasi']);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user