Merge remote main
This commit is contained in:
@@ -20,8 +20,7 @@
|
||||
<select name="year" id="year"
|
||||
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
||||
<option selected disabled>Tahun</option>
|
||||
<option value="2022">2022</option>
|
||||
<option value="2023">2023</option>
|
||||
<option v-for="year in upcomingYears" :value="year" :key="year">{{ year }}</option>
|
||||
</select>
|
||||
<div class="flex justify-center mt-10">
|
||||
<button @click.prevent="generatepdf"
|
||||
@@ -43,10 +42,20 @@
|
||||
data() {
|
||||
return {
|
||||
jenisgenerate: 'none',
|
||||
kodcaw: ''
|
||||
kodcaw: '',
|
||||
upcomingYears: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.calculateUpcomingYears();
|
||||
},
|
||||
methods: {
|
||||
calculateUpcomingYears() {
|
||||
const currentYear = new Date().getFullYear();
|
||||
for (let i = 0; i <= 1; i++) {
|
||||
this.upcomingYears.push(currentYear - i);
|
||||
}
|
||||
},
|
||||
async generatepdf() {
|
||||
await this.setJenis('pdf');
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class="rounded bg-white shadow p-6">
|
||||
<div class="pb-6">
|
||||
<label for="username" class="font-semibold text-gray-700 block pb-1">Tarikh</label>
|
||||
<div class="flex">
|
||||
<div class="flex flex-wrap mb-12">
|
||||
<input :value="jenisgenerate" type="hidden" name="jenis" />
|
||||
<input :value="$kodcaw" name="kodcaw" hidden/>
|
||||
<input :value="$hostname" name="hostname" hidden/>
|
||||
@@ -22,6 +22,23 @@
|
||||
<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" @change="dateChecking()" class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2" type="date"/>
|
||||
</div>
|
||||
<div class="flex justify-center mb-4">
|
||||
<div class="mx-2 radio">
|
||||
<input type="radio" id="arrahnpay" name="laporanansuran" value="arrahnpay" class="hidden focus:bg-gray-500" v-model="selected">
|
||||
<label for="arrahnpay" class="cursor-pointer text-gray-500 focus:bg-gray-500 hover:bg-gray-200 focus:bg-purple-500 focus:bg-purple-500 focus:outline-none border px-10 py-4 border-solid border-gray-500 rounded">Arrahn Pay</label>
|
||||
</div>
|
||||
|
||||
<div class="mx-2 radio cursor-pointer">
|
||||
<input type="radio" id="kaunter" name="laporanansuran" value="kaunter" class="hidden focus:bg-gray-500" v-model="selected">
|
||||
<label for="kaunter" class="cursor-pointer text-gray-500 focus:bg-gray-500 hover:bg-gray-200 focus:bg-purple-500 focus:outline-none border px-10 py-4 border-solid border-gray-500 rounded">Kaunter (aros)</label>
|
||||
</div>
|
||||
|
||||
<div class="mx-2 radio cursor-pointer">
|
||||
<input type="radio" id="all" name="laporanansuran" value="all" class="hidden focus:bg-gray-500" v-model="selected">
|
||||
<label for="all" class="cursor-pointer text-gray-500 focus:bg-gray-500 hover:bg-gray-200 focus:bg-purple-500 focus:outline-none border px-10 py-4 border-solid border-gray-500 rounded">Semua</label>
|
||||
</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>
|
||||
@@ -34,14 +51,24 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.radio input:checked + label{
|
||||
border-color:#F6D860;
|
||||
background-color:#FFF1BD;
|
||||
outline:none;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
jenisgenerate:'none',
|
||||
kodcaw:''
|
||||
}
|
||||
},
|
||||
return {
|
||||
jenisgenerate: 'none',
|
||||
selected: '', // ini untuk radio button
|
||||
kodcaw: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async generatepdf(){
|
||||
await this.setJenis('pdf');
|
||||
|
||||
@@ -0,0 +1,189 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="flex w-full">
|
||||
<div class="xl:w-2/3 2xl:w-1/2 p-8 mx-auto">
|
||||
<!-- Tajuk -->
|
||||
<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 Barang Kes
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Borang laporan -->
|
||||
<form method="get" id="formringter" :action="Urlredirect()" target="_blank">
|
||||
<div class="rounded bg-white shadow p-6">
|
||||
|
||||
<!-- Pilihan Tarikh -->
|
||||
<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 />
|
||||
<input type="hidden" name="status" :value="status" /> <!-- masih simpan status -->
|
||||
|
||||
<span style="background-color: #F9FAFB"
|
||||
class="text-gray-600 border-2 rounded-l px-4 py-2 whitespace-no-wrap">Mula</span>
|
||||
<input
|
||||
id="tarikhmula"
|
||||
name="datemula"
|
||||
class="border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2"
|
||||
type="date"
|
||||
min="2023-01-01"
|
||||
:max="maxDate"
|
||||
/>
|
||||
|
||||
<span style="background-color: #F9FAFB"
|
||||
class="text-gray-600 border-2 rounded-l px-4 py-2 whitespace-no-wrap">Hingga</span>
|
||||
<input
|
||||
id="tarikhhingga"
|
||||
name="datehingga"
|
||||
class="border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2"
|
||||
type="date"
|
||||
min="2023-01-01"
|
||||
:max="maxDate"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Pilihan Status -->
|
||||
<div class="flex flex-col items-center mb-6">
|
||||
<!-- <label class="font-semibold text-gray-700 mb-2">Status:</label> -->
|
||||
<div class="flex space-x-6">
|
||||
<label class="flex items-center space-x-2">
|
||||
<input
|
||||
type="radio"
|
||||
value="all"
|
||||
v-model="status"
|
||||
class="text-yellow-600 focus:ring-yellow-500"
|
||||
/>
|
||||
<span>Semua</span>
|
||||
</label>
|
||||
<label class="flex items-center space-x-2">
|
||||
<input
|
||||
type="radio"
|
||||
value="belum-tuntut"
|
||||
v-model="status"
|
||||
class="text-yellow-600 focus:ring-yellow-500"
|
||||
/>
|
||||
<span>Belum Tuntut</span>
|
||||
</label>
|
||||
<label class="flex items-center space-x-2">
|
||||
<input
|
||||
type="radio"
|
||||
value="dituntut"
|
||||
v-model="status"
|
||||
class="text-yellow-600 focus:ring-yellow-500"
|
||||
/>
|
||||
<span>Dah Tuntut</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Butang Action -->
|
||||
<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>
|
||||
import { required } from 'vuelidate/lib/validators'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
jenisgenerate: 'none',
|
||||
kodcaw: '',
|
||||
hostname: '',
|
||||
maxDate: null,
|
||||
yesterday: null,
|
||||
selectedalasan: '',
|
||||
jenisalasan: {},
|
||||
status: 'all', // default status
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.setMaxDate();
|
||||
},
|
||||
created() {
|
||||
this.senaraiAlasan();
|
||||
},
|
||||
methods: {
|
||||
setMaxDate() {
|
||||
const today = new Date();
|
||||
today.setDate(today.getDate() - 1);
|
||||
this.yesterday = today.toISOString().split('T')[0];
|
||||
this.maxDate = this.yesterday;
|
||||
},
|
||||
async generatepdf() {
|
||||
await this.setJenis('pdf');
|
||||
Vue.swal({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey: false,
|
||||
allowOutsideClick: false,
|
||||
showCancelButton: false,
|
||||
showConfirmButton: false,
|
||||
timer: 8000,
|
||||
});
|
||||
document.getElementById("formringter").submit();
|
||||
},
|
||||
async generateview() {
|
||||
await this.setJenis('view');
|
||||
Vue.swal({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey: false,
|
||||
allowOutsideClick: false,
|
||||
showCancelButton: false,
|
||||
showConfirmButton: false,
|
||||
timer: 8000,
|
||||
});
|
||||
document.getElementById("formringter").submit();
|
||||
},
|
||||
Urlredirect() {
|
||||
return window.route('cetak.laporanbarangkes');
|
||||
},
|
||||
setJenis(value) {
|
||||
this.jenisgenerate = value;
|
||||
},
|
||||
senaraiAlasan() {
|
||||
this.axios.get(this.$hostname + '/api/lookupalasan').then(response => {
|
||||
this.jenisalasan = response.data;
|
||||
});
|
||||
},
|
||||
},
|
||||
validations: {
|
||||
selectedalasan: {
|
||||
required
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
select {
|
||||
min-width: 180px;
|
||||
}
|
||||
input[type="radio"] {
|
||||
accent-color: #eab308; /* warna kuning */
|
||||
}
|
||||
</style>
|
||||
|
||||
+111
-197
@@ -1,200 +1,114 @@
|
||||
<template>
|
||||
<div class="mx-auto content-center flex justify-center items-center">
|
||||
|
||||
<div class="grid grid-rows-1">
|
||||
<div class="grid grid-cols-3 gap-1 mx-auto">
|
||||
|
||||
<div class="bg-white 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/imbangduga/extended"> -->
|
||||
<router-link to="/akaunhome/imbangduga/akru">
|
||||
<img src="/img/balance-sheet.png" class="h-20 w-20 mx-auto" alt="Windster Logo">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Imbang Duga Akru</h2>
|
||||
</router-link>
|
||||
</div>
|
||||
|
||||
<div class="bg-white 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/lejeram">
|
||||
<img src="/img/ledger.png" class="h-20 w-20 mx-auto" alt="Windster Logo">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Lejer Am</h2>
|
||||
</router-link>
|
||||
</div>
|
||||
|
||||
<div class="bg-white 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/kawalanstok">
|
||||
<img src="/img/kawalanstok.png" class="h-20 w-30 mx-auto" alt="Windster Logo">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Kawalan Stok</h2>
|
||||
</router-link>
|
||||
</div>
|
||||
|
||||
<div class="bg-white 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/stokaudit">
|
||||
<img src="/img/audit.png" class="h-20 w-20 mx-auto" alt="Windster Logo">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Stok Audit</h2>
|
||||
</router-link>
|
||||
</div>
|
||||
|
||||
<div class="bg-white 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/stokauditCombine">
|
||||
<img src="/img/audit.png" class="h-20 w-20 mx-auto" alt="Windster Logo">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Stok Audit Combine</h2>
|
||||
</router-link>
|
||||
</div>
|
||||
<div class="bg-white 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/auditTrail">
|
||||
<img src="/img/audittrail.png" class="h-20 w-20 mx-auto" alt="Windster Logo">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Audit Trail</h2>
|
||||
</router-link>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="container mx-auto">
|
||||
|
||||
<div class="flex items-center mb-6">
|
||||
<button
|
||||
id="toggle-search"
|
||||
class="btn btn-outline-secondary mr-2"
|
||||
type="button"
|
||||
@click="toggleSearch">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
|
||||
<input
|
||||
v-show="showSearch"
|
||||
v-model="searchQuery"
|
||||
type="text"
|
||||
id="search-laporan"
|
||||
class="form-control transition-all duration-300"
|
||||
style="width: 300px; height: 38px;"
|
||||
placeholder="Cari laporan apa ya?"/>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="grid grid-cols-3 gap-3">
|
||||
<div
|
||||
v-for="item in filteredMenu"
|
||||
:key="item.title"
|
||||
class="bg-white shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all cursor-pointer">
|
||||
<router-link :to="item.link" class="block text-center">
|
||||
<img
|
||||
v-if="item.img"
|
||||
:src="item.img"
|
||||
class="h-20 w-20 mx-auto mb-2"
|
||||
:alt="item.title"
|
||||
/>
|
||||
<h2 class="font-bold text-2xl uppercase">{{ item.title }}</h2>
|
||||
</router-link>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<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/gadaian">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Pembiayaan</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/penebusan">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Penyelesaian Pembiayaan</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/Pendahuluanserahan">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Pendahuluan & Serahan</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/Tuntutbaki">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Tuntut Baki</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/ansuran">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Ansuran Pembiayaan</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/perbelanjaan">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Perbelanjaan</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/online">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Online</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/upah">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Keuntungan</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/ringkasanharian">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Ringkasan Harian</h2>
|
||||
</router-link>
|
||||
</div>
|
||||
</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/RingkasanTerkumpul">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Ringkasan Terkumpul</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/StokAuditBackdate">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Stok Audit Back-date</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/Aging">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Aging</h2>
|
||||
</router-link>
|
||||
</div>
|
||||
</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/PetiBesi">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Peti Besi</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/imbangduga">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Imbang Duga</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>
|
||||
|
||||
<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 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/akrubulanpecahan">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Akru Bulanan Pecahan</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/serahgadai">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Serah Marhun Pembiayaan </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/serahtebus">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Serah Marhun Penyelesaian Pembiayaan</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/tuntutrugi">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Baki Rugi Lelong</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/BilanganPengadai">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Bilangan Pelanggan</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/imbangdugabackup">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Imbang Duga Backup</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/saghilang">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Sag Hilang</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/laporanlelong">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Laporan Lelong</h2>
|
||||
</router-link>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showSearch: false,
|
||||
searchQuery: "",
|
||||
menuItems: [
|
||||
{ title: "Imbang Duga Akru", link: "/akaunhome/imbangduga/akru", img: "/img/balance-sheet.png" },
|
||||
{ title: "Lejer Am", link: "/akaunhome/lejeram", img: "/img/ledger.png" },
|
||||
{ title: "Kawalan Stok", link: "/akaunhome/kawalanstok", img: "/img/kawalanstok.png" },
|
||||
{ title: "Stok Audit", link: "/akaunhome/stokaudit", img: "/img/audit.png" },
|
||||
{ title: "Stok Audit Combine", link: "/akaunhome/stokauditCombine", img: "/img/audit.png" },
|
||||
{ title: "Audit Trail", link: "/akaunhome/auditTrail", img: "/img/audittrail.png" },
|
||||
{ title: "Pembiayaan", link: "/akaunhome/gadaian" },
|
||||
{ title: "Penyelesaian Pembiayaan", link: "/akaunhome/penebusan" },
|
||||
{ title: "Pendahuluan & Serahan", link: "/akaunhome/Pendahuluanserahan" },
|
||||
{ title: "Tuntut Baki", link: "/akaunhome/Tuntutbaki" },
|
||||
{ title: "Ansuran Pembiayaan", link: "/akaunhome/ansuran" },
|
||||
{ title: "Perbelanjaan", link: "/akaunhome/perbelanjaan" },
|
||||
{ title: "Online", link: "/akaunhome/online" },
|
||||
{ title: "Keuntungan", link: "/akaunhome/upah" },
|
||||
{ title: "Ringkasan Harian", link: "/akaunhome/ringkasanharian" },
|
||||
{ title: "Ringkasan Terkumpul", link: "/akaunhome/RingkasanTerkumpul" },
|
||||
{ title: "Stok Audit Back-date", link: "/akaunhome/StokAuditBackdate" },
|
||||
{ title: "Aging", link: "/akaunhome/Aging" },
|
||||
{ title: "Peti Besi", link: "/akaunhome/PetiBesi" },
|
||||
{ title: "Imbang Duga", link: "/akaunhome/imbangduga" },
|
||||
{ title: "Prestasi Ar-Rahn", link: "/akaunhome/prestasi" },
|
||||
{ title: "Akru Bulanan", link: "/akaunhome/akrubulan" },
|
||||
{ title: "Akru Bulanan Pecahan", link: "/akaunhome/akrubulanpecahan" },
|
||||
{ title: "Serah Marhun Pembiayaan", link: "/akaunhome/serahgadai" },
|
||||
{ title: "Serah Marhun Penyelesaian Pembiayaan", link: "/akaunhome/serahtebus" },
|
||||
{ title: "Baki Rugi Lelong", link: "/akaunhome/tuntutrugi" },
|
||||
{ title: "Bilangan Pelanggan", link: "/akaunhome/BilanganPengadai" },
|
||||
{ title: "Imbang Duga Backup", link: "/akaunhome/imbangdugabackup" },
|
||||
{ title: "Sag Hilang", link: "/akaunhome/saghilang" },
|
||||
{ title: "Laporan Lelong", link: "/akaunhome/laporanlelong" },
|
||||
{ title: "Barang Kes", link: "/akaunhome/barangkes" },
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
filteredMenu() {
|
||||
const q = this.searchQuery.toLowerCase();
|
||||
return this.menuItems.filter((item) =>
|
||||
item.title.toLowerCase().includes(q)
|
||||
);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
toggleSearch() {
|
||||
this.showSearch = !this.showSearch;
|
||||
if (this.showSearch) {
|
||||
this.$nextTick(() => {
|
||||
document.getElementById("search-laporan").focus();
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.btn {
|
||||
height: 38px;
|
||||
border: 1px solid #ccc;
|
||||
background: white;
|
||||
padding: 0 10px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -35,16 +35,22 @@
|
||||
</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">
|
||||
<div class="flex justify-end mt-10 gap-3">
|
||||
<button @click.prevent="generatepdf" 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-file-pdf mr-2"></i>PDF
|
||||
</button>
|
||||
<button @click.prevent="generateview" 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">
|
||||
|
||||
<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>
|
||||
|
||||
<button @click.prevent="generateexcel" class="border border-green-600 text-green-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-green-600 hover:text-white transition-all duration-300">
|
||||
<i class="fas fa-file-excel mr-2"></i>Excel
|
||||
</button>
|
||||
|
||||
<button @click.prevent="generateexcelaudit" class="border border-green-600 text-green-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-green-600 hover:text-white transition-all duration-300">
|
||||
<i class="fas fa-file-excel mr-2"></i>Excel Audit
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -111,6 +117,18 @@ export default {
|
||||
});
|
||||
document.getElementById("formstokaudit").submit();
|
||||
},
|
||||
async generateexcelaudit(){
|
||||
await this.setJenis('excelaudit');
|
||||
Vue.swal({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
showCancelButton: false,
|
||||
showConfirmButton: false,
|
||||
timer: 8000,
|
||||
});
|
||||
document.getElementById("formstokaudit").submit();
|
||||
},
|
||||
Urlredirect: function() {
|
||||
return window.route('cetak.stokaudit');
|
||||
},
|
||||
|
||||
@@ -14,14 +14,35 @@
|
||||
<div class="flex flex-row font-normal text-gray-700 dark:text-gray-400">
|
||||
<div class="w-1/3">Jumlah WTD</div>
|
||||
<div>:</div>
|
||||
<div class="ml-2 w-1/3"><b>RM {{ formattext(sb.baki) }} </b></div>
|
||||
<!-- <div class="flex items-center ml-2 w-1/3"><b>RM {{ formattext(sb.baki) }} </b></div> -->
|
||||
<div class="flex items-baseline ml-2 w-1/3">
|
||||
<span class="text-sm mr-1">RM</span><span class="text-lg font-bold">{{ formattext(sb.baki) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row font-normal text-gray-700 dark:text-gray-400">
|
||||
<div class="w-1/3">Tarikh Proses WTD
|
||||
<div class="w-1/3">Tahun Lelong
|
||||
</div>
|
||||
<div>:</div>
|
||||
<div class="ml-2 w-1/3"><b> {{ (sb.tahun) ? sb.tahun : 'Tiada' }} </b></div>
|
||||
</div>
|
||||
<div class="flex flex-row font-normal text-gray-700 dark:text-gray-400">
|
||||
<div class="w-1/3">Bulan Lelong
|
||||
</div>
|
||||
<div>:</div>
|
||||
<div class="ml-2 w-1/3"><b> {{ (sb.bulan) ? sb.bulan : 'Tiada' }} </b></div>
|
||||
</div>
|
||||
<div class="flex flex-row font-normal text-gray-700 dark:text-gray-400">
|
||||
<div class="w-1/3">Tarikh Proses
|
||||
</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">Tarikh Hantar
|
||||
</div>
|
||||
<div>:</div>
|
||||
<div class="ml-2 w-1/3"><b> {{ (sb.t_htr_ag) ? sb.t_htr_ag : 'Tiada' }} </b></div>
|
||||
</div>
|
||||
<div class="flex flex-row font-normal text-gray-700 dark:text-gray-400">
|
||||
<div class="w-1/3">Status
|
||||
</div>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</div>
|
||||
<div class="p-4">
|
||||
<button @click.prevent="promptdeletewtd" :disabled="aktif == 1" :class="{'hover:bg-red-600 bg-red-600 border-red-600': aktif == 0}" class="border border-red-300 text-white bg-red-300 font-montserrat py-2 px-8 font-medium rounded-xl transition-all duration-300"><i class="fas fa-trash-alt"></i></button>
|
||||
<button @click.prevent="promptwtd" :disabled="aktif == 1" :class="{'hover:bg-yellow-600 bg-yellow-600 border-yellow-600': aktif == 0}" class="border border-yellow-300 text-white bg-yellow-300 font-montserrat py-2 px-8 font-medium rounded-xl transition-all duration-300">Proses WTD</button>
|
||||
<button @click.prevent="promptwtd" :disabled="aktif == 1" :class="{'hover:bg-yellow-600 bg-yellow-600 border-yellow-600': aktif == 0}" class="border border-yellow-300 text-white bg-yellow-300 font-montserrat py-2 px-8 font-medium rounded-xl transition-all duration-300">Serahan WTD</button>
|
||||
<span v-if="batchno != 0" class="text-lg font-bold ml-3">Batchno: {{ this.batchno }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -38,9 +38,9 @@
|
||||
<th scope="col" class="px-6 py-3">
|
||||
Tarikh Lelong
|
||||
</th>
|
||||
<th scope="col" class="px-6 py-3">
|
||||
<!-- <th scope="col" class="px-6 py-3">
|
||||
Pembiayaan
|
||||
</th>
|
||||
</th> -->
|
||||
<th scope="col" class="px-6 py-3">
|
||||
Baki
|
||||
</th>
|
||||
@@ -60,9 +60,9 @@
|
||||
<td class="px-6 py-4">
|
||||
{{ bl.t_jual }}
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
<!-- <td class="px-6 py-4">
|
||||
{{ formattext(bl.pinjaman) }}
|
||||
</td>
|
||||
</td> -->
|
||||
<td class="px-6 py-4">
|
||||
{{ formattext(bl.baki) }}
|
||||
</td>
|
||||
@@ -103,7 +103,7 @@ export default {
|
||||
kodcaw: this.$kodcaw,
|
||||
}
|
||||
}).then(response => {
|
||||
console.log(response);
|
||||
//console.log(response);
|
||||
this.arraybakilelong = response.data;
|
||||
})
|
||||
},
|
||||
@@ -153,7 +153,7 @@ export default {
|
||||
|
||||
if (boolkatalaluan == 1) {
|
||||
await this.$swal({
|
||||
title: 'Proses WTD?',
|
||||
title: 'Serahan WTD?',
|
||||
text: "anda tidak boleh ulang kembali setelah di proses!",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
@@ -165,16 +165,59 @@ export default {
|
||||
|
||||
if (result.isConfirmed) {
|
||||
|
||||
//new added
|
||||
this.$swal({
|
||||
title: "Masukkan No Cek:",
|
||||
// text: "Write something interesting:",
|
||||
input: 'text',
|
||||
showCancelButton: true
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
this.proseswtd(result.value);
|
||||
}
|
||||
});
|
||||
title: 'Sila Isi Butiran Berikut',
|
||||
html: `
|
||||
<div class="swal-form">
|
||||
<div class="swal-row">
|
||||
<label>No Cek</label>
|
||||
<input id="noCek" class="swal2-input" placeholder="Masukkan No Cek">
|
||||
</div>
|
||||
|
||||
<div class="swal-row">
|
||||
<label>Tarikh Hantar ke AG</label>
|
||||
<input
|
||||
id="tarikhAG"
|
||||
type="date"
|
||||
class="swal2-input"
|
||||
max="${new Date().toISOString().split('T')[0]}"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
focusConfirm: false,
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Simpan',
|
||||
cancelButtonText: 'Batal',
|
||||
|
||||
customClass: {
|
||||
popup: 'swal-popup',
|
||||
confirmButton: 'swal-confirm',
|
||||
cancelButton: 'swal-cancel'
|
||||
},
|
||||
|
||||
preConfirm: () => {
|
||||
const noCek = document.getElementById('noCek').value.trim();
|
||||
const tarikhAG = document.getElementById('tarikhAG').value;
|
||||
|
||||
if (!noCek || !tarikhAG) {
|
||||
this.$swal.showValidationMessage(
|
||||
'Sila masukkan No Cek dan Tarikh Hantar ke AG'
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
return { noCek, tarikhAG };
|
||||
}
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
this.proseswtd(result.value.noCek, result.value.tarikhAG);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//end new added
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@@ -197,11 +240,12 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
proseswtd: function (nocek) {
|
||||
proseswtd: function (nocek,tarikhAG) {
|
||||
this.axios.post(this.$hostname + '/admin/wtd/process', {
|
||||
kodcaw: this.$kodcaw,
|
||||
batch: this.batchno,
|
||||
nocek: nocek
|
||||
nocek: nocek,
|
||||
tarikhAG: tarikhAG
|
||||
}).then(response => {
|
||||
|
||||
if (response.data == 'success') {
|
||||
|
||||
@@ -2,12 +2,17 @@
|
||||
<div>
|
||||
<div class="mx-auto mt-10 mb-10 flex justify-center">
|
||||
|
||||
<a href="/wtd/simulasi/janaSimulasi">
|
||||
<button class="bg-yellow-500 p-4 rounded text-white mr-4">Jana Simulasi</button>
|
||||
</a>
|
||||
|
||||
<router-link to="/wtd/rekod">
|
||||
<button class="bg-yellow-500 p-4 rounded text-white mr-4">Rekod WTD</button>
|
||||
</router-link>
|
||||
<router-link to="/wtd/tambah">
|
||||
<!-- <router-link to="/wtd/tambah">
|
||||
<button class="bg-yellow-500 p-4 rounded text-white">Tambah WTD</button>
|
||||
</router-link>
|
||||
</router-link> -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Vendored
+8
-2
@@ -215,14 +215,20 @@ Vue.component('tunai-component', require('./components/Tunai.vue').default)
|
||||
Vue.component('petibesi-component', require('./components/Petibesi.vue').default)
|
||||
Vue.component('cawangan-component', require('./components/Cawangan.vue').default)
|
||||
Vue.component('modal-component', require('./components/util/Modal.vue').default)
|
||||
Vue.component('searchpelanggan-component', require('./components/Searchpelanggan.vue').default)
|
||||
Vue.component('searchpelanggan-component', require('./components/Searchpelanggan.vue').default) //refer sini nnti
|
||||
|
||||
Vue.component('searchbarangkes-component', require('./components/Searchbarangkes.vue').default) //refer sini nnti copy nnti buat utk sag
|
||||
|
||||
Vue.component('laporanakaun-component', require('./Akaun/Laporan.vue').default)
|
||||
Vue.component('online-component', require('./Online/Online.vue').default)
|
||||
Vue.component('noticelelong-component', require('./pages/NotisLelong.vue').default)
|
||||
Vue.component('noticelelong2-component', require('./pages/NotisLelongFasa2.vue').default)
|
||||
Vue.component('kelulusan-component', require('./Kelulusan/TableKelulusan.vue').default)
|
||||
|
||||
Vue.component('details-pelanggan', require('./pages/Detailspelanggan.vue').default)
|
||||
Vue.component('details-pelanggan', require('./pages/Detailspelanggan.vue').default) // refer sini jugak nnti utk sag searching
|
||||
|
||||
Vue.component('details-sag', require('./pages/Detailssag.vue').default) // refer sini jugak nnnti utk sag searching
|
||||
|
||||
Vue.component('blacklist-pelanggan', require('./pages/Blacklist.vue').default)
|
||||
|
||||
Vue.component('harian-component', require('./components/Analisa/Harian.vue').default)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="mx-auto">
|
||||
<div id="cawangan_selector" class="mx-auto">
|
||||
<a v-if="route === 'ada'" class="text-yellow-200 rounded bg-gray-400 px-6 py-3 font-bold mr-4 uppercase sm:invisible lg:visible xl:visible">
|
||||
CAWANGAN :
|
||||
<select v-model="caw" @change="tukarcawangan" class="rounded-md border bg-gray-400 font-bold border-gray-400 focus:outline-none rounded-md focus:ring-1 ring-cyan-500 uppercase">
|
||||
@@ -40,11 +40,19 @@
|
||||
this.cawangan = response.data;
|
||||
});
|
||||
|
||||
this.$on('updateCawangan', (newCaw) => {
|
||||
this.caw = newCaw; // Update the header branch
|
||||
});
|
||||
|
||||
|
||||
fetch('/api/check/cawangan')
|
||||
.then(response => response.json()).then(response => this.cawangan = response);
|
||||
|
||||
},
|
||||
methods:{
|
||||
getText: function(){
|
||||
alert('emit triggered');
|
||||
},
|
||||
tukarcawangan: function(){
|
||||
|
||||
this.setkodcaw(this.caw)
|
||||
|
||||
@@ -0,0 +1,189 @@
|
||||
<template>
|
||||
<div class="container w-full max-w-xl mx-auto mt-10 px-4 font-sans">
|
||||
<form class="bg-white w-full shadow-md rounded-lg px-8 pt-6 pb-4 mb-4" onclick="return false">
|
||||
<div class="mb-4 w-96 mx-auto">
|
||||
<label class="block text-gray-500 font-medium text-sm mb-2">SAG</label>
|
||||
<div class="flex flex-wrap">
|
||||
<div class="flex flex-row w-96 mx-auto">
|
||||
|
||||
<div class="flex flex-col w-96">
|
||||
<input id="frminput" type="text" ref="btnDropdownRef" placeholder="Masukkan No Rujukan SAG" class="mr-2 bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue-500" v-model="inputValue" @input="validateInput"/>
|
||||
<p v-if="warningMessage" class="text-red-500 text-sm mt-1">{{ warningMessage }}</p>
|
||||
<div ref="popoverDropdownRef" v-bind:class="{'hidden': !dropdownShow, 'block': dropdownShow}" class="origin-top-right w-96 right-0 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" role="menu" aria-orientation="vertical" aria-labelledby="menu-button" tabindex="-1">
|
||||
<div class="py-1" role="none">
|
||||
<a v-for="(cust,i) in arrayCustomer" :key="i" class="text-gray-700 block px-4 py-2 text-sm hover:bg-yellow-500" role="menuitem" tabindex="-1" id="menu-item-0" :href="Urlredirect({ cust: cust.id })" v-on:click="ClickUrl($event)">{{ cust.nama }}<br><b>{{ (cust.kpbaru) ? cust.kpbaru : cust.kplama }}</b></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button id="buttonsearch" class="px-4 py-2 bg-blue-600 rounded ml-2" v-on:click="toggleDropdown()"><i class="fas fa-search text-white"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { createPopper } from "@popperjs/core";
|
||||
|
||||
export default{
|
||||
props: {
|
||||
placement: {
|
||||
type: String,
|
||||
default: "bottom-start"
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dropdownShow: false,
|
||||
param1: "",
|
||||
arrayCustomer: [],
|
||||
tempcaw: '',
|
||||
tempnorujukan: '',
|
||||
inputValue: '',
|
||||
warningMessage: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
document.addEventListener('click', this.onClick);
|
||||
},
|
||||
beforeDestroy() {
|
||||
document.removeEventListener('click', this.onClick);
|
||||
},
|
||||
methods: {
|
||||
|
||||
validateInput() {
|
||||
const length = this.inputValue.length;
|
||||
|
||||
if (length > 0 && length < 10) {
|
||||
this.warningMessage = 'Input terlalu pendek. Minimum 10 aksara.';
|
||||
} else if (length > 30) {
|
||||
this.warningMessage = 'Input terlalu panjang.';
|
||||
} else {
|
||||
this.warningMessage = '';
|
||||
}
|
||||
},
|
||||
|
||||
async toggleDropdown() {
|
||||
// Check validation before searching
|
||||
if (this.warningMessage) {
|
||||
return; // Don't proceed if there's a warning
|
||||
}
|
||||
|
||||
await this.getData();
|
||||
await this.$nextTick();
|
||||
|
||||
if (this.arrayCustomer.length > 0) {
|
||||
console.log('masuk');
|
||||
this.dropdownShow = true;
|
||||
createPopper(this.$refs.btnDropdownRef, this.$refs.popoverDropdownRef, {
|
||||
placement: "bottom-start",
|
||||
modifiers: [{ name: "preventOverflow" }]
|
||||
});
|
||||
} else {
|
||||
console.log('siap');
|
||||
}
|
||||
},
|
||||
|
||||
async getPrefix(value){
|
||||
let tempcaw = '';
|
||||
let kodcaw = '';
|
||||
tempcaw = value.slice(0,6)
|
||||
|
||||
kodcaw = await this.compareCawangan(tempcaw)
|
||||
|
||||
if(kodcaw) return kodcaw; else null;
|
||||
|
||||
// return null; // fallback kalau tak match
|
||||
},
|
||||
|
||||
compareCawangan: function(kodcaw){
|
||||
return this.axios.get('/api/check/cawangan')
|
||||
.then(response => {
|
||||
let cawanganlist = response.data;
|
||||
let prefix = kodcaw;
|
||||
let exactMatch = cawanganlist.find(item =>
|
||||
item.kodcaw.toLowerCase() === prefix.toLowerCase()
|
||||
);
|
||||
|
||||
// if (exactMatch) return { ...exactMatch, matchType: 'exact' };
|
||||
if (exactMatch) return exactMatch.kodcaw;
|
||||
|
||||
|
||||
// Contains match
|
||||
let containsMatch = cawanganlist.find(item =>
|
||||
item.kodcaw.toLowerCase().includes(prefix.toLowerCase()) ||
|
||||
prefix.toLowerCase().includes(item.kodcaw.toLowerCase())
|
||||
);
|
||||
|
||||
return containsMatch ? containsMatch.kodcaw : null;
|
||||
// return containsMatch ? { ...containsMatch, matchType: 'contains' } : null;
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error fetching cawangan:', error);
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
async getData() {
|
||||
let inputvalue = document.getElementById("frminput").value;
|
||||
let kodcaw = await this.getPrefix(inputvalue);
|
||||
|
||||
this.tempcaw = kodcaw;
|
||||
this.tempnorujukan = inputvalue;
|
||||
|
||||
if (inputvalue && /-/.test(inputvalue)) {
|
||||
try {
|
||||
let response = await this.axios.get(this.$hostname + '/admin/searchBySag', {
|
||||
params: {
|
||||
norujukan: inputvalue,
|
||||
kodcaw: kodcaw
|
||||
}
|
||||
});
|
||||
this.arrayCustomer = response.data;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
},
|
||||
hasNumber: function(inputString){
|
||||
return /\d/.test(inputString);
|
||||
},
|
||||
onClick: function(){
|
||||
let isClickInside = this.$refs.popoverDropdownRef.contains(event.target);
|
||||
let searchInside = this.$refs.btnDropdownRef.contains(event.target);
|
||||
let buttonSearch = document.getElementById('buttonsearch');
|
||||
|
||||
if (isClickInside || searchInside || buttonSearch.contains(event.target)) {
|
||||
if(buttonSearch.value !== '')
|
||||
{
|
||||
this.dropdownShow = true
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
||||
if(this.$refs.btnDropdownRef.value != '')
|
||||
{
|
||||
this.dropdownShow = false
|
||||
}else{
|
||||
this.dropdownShow = false
|
||||
this.arrayCustomer = []
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
Urlredirect: function(options) {
|
||||
// const inputElement = document.getElementById('frminput');
|
||||
// const value = inputElement.value;
|
||||
// return window.route('pelanggan.detailssag', options.cust)
|
||||
return window.route('pelanggan.detailssag', options.cust) + '?norujukan=' + this.tempnorujukan + '&kodcaw=' + this.tempcaw;
|
||||
},
|
||||
|
||||
ClickUrl: function(e){
|
||||
window.location.href = e.target.getAttribute('href');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,187 @@
|
||||
<template>
|
||||
<div>
|
||||
<transition name="modal-fade">
|
||||
<div v-if="showModal" class="overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none justify-center items-center flex">
|
||||
<div class="relative w-1/3 my-6 mx-auto max-w-6xl">
|
||||
<!-- content -->
|
||||
<div class="border-0 rounded-lg shadow-lg relative flex flex-col w-full bg-white outline-none focus:outline-none">
|
||||
<div class="relative p-4 flex-auto">
|
||||
<h3 class="text-center text-3xl font-semibold">
|
||||
Daftar Barang Kes
|
||||
</h3>
|
||||
|
||||
<div class="flex flex-wrap mt-4">
|
||||
<div class="w-full max-w-lg mx-auto">
|
||||
|
||||
<!-- No Rujukan -->
|
||||
<div class="mb-4">
|
||||
<label class="block text-gray-700 text-sm font-bold mb-2" for="norujukan">
|
||||
No Rujukan:
|
||||
</label>
|
||||
<input
|
||||
id="norujukan"
|
||||
type="text"
|
||||
v-model="norujukan"
|
||||
class="bg-white appearance-none border-2 border-gray-400 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue-500 border-black"
|
||||
placeholder="isi no rujukan"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- IC dan SAG -->
|
||||
<div class="flex flex-wrap items-end mb-6 gap-4">
|
||||
<!-- IC -->
|
||||
<div class="w-full md:w-1/2">
|
||||
<label class="block text-gray-700 text-sm font-bold mb-2" for="nama">
|
||||
IC:
|
||||
</label>
|
||||
<input
|
||||
id="frminput"
|
||||
type="text"
|
||||
ref="btnDropdownRef"
|
||||
class="bg-white appearance-none border-2 border-gray-400 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue-500 border-black"
|
||||
placeholder="isi nama / IC"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- SAG -->
|
||||
<div class="w-full md:w-1/2">
|
||||
<label class="block text-gray-700 text-sm font-bold mb-2" for="sag">
|
||||
SAG:
|
||||
</label>
|
||||
<input
|
||||
id="saginput"
|
||||
type="text"
|
||||
v-model="kodcaw"
|
||||
class="bg-white appearance-none border-2 border-gray-400 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue-500 border-black"
|
||||
placeholder="isi kod SAG / cawangan"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Button Carian -->
|
||||
<div class="flex justify-end mb-6 gap-2">
|
||||
<button
|
||||
class="flex items-center gap-2 px-6 py-3 bg-blue-600 hover:bg-blue-700 text-white text-sm font-semibold rounded shadow"
|
||||
@click="cariMarhun"
|
||||
>
|
||||
<i class="fas fa-search"></i>
|
||||
Cari Marhun
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Tunjuk hasil carian -->
|
||||
<div v-if="marhunData" class="mt-4 bg-gray-100 p-4 rounded">
|
||||
<p><strong>No Rujukan:</strong> {{ marhunData.norujukan }}</p>
|
||||
<p><strong>Nama Marhun:</strong> {{ marhunData.nama }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Footer button -->
|
||||
<div class="flex items-center justify-end p-6 border-t border-solid border-blueGray-200 rounded-b">
|
||||
<button class="bg-gray-500 hover:bg-gray-700 text-white font-bold py-2 px-4 border border-gray-700 rounded mr-1" v-on:click="toggleModal" type="button">
|
||||
Batal
|
||||
</button>
|
||||
<button class="bg-yellow-500 hover:bg-yellow-700 text-white font-bold py-2 px-4 border border-green-700 rounded" @click="addfunc" type="button">
|
||||
Daftar
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "modal",
|
||||
data() {
|
||||
return {
|
||||
showModal: false,
|
||||
kodcaw: '',
|
||||
norujukan: '',
|
||||
marhunData: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toggleModal() {
|
||||
this.showModal = !this.showModal;
|
||||
},
|
||||
async cariMarhun() {
|
||||
if (!this.norujukan) {
|
||||
this.$toast.warning("Sila isi No Rujukan dahulu.");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await this.axios.get(this.$hostname + '/marhun/' + this.norujukan);
|
||||
this.marhunData = response.data;
|
||||
this.$toast.success("Maklumat berjaya dijumpai!");
|
||||
} catch (error) {
|
||||
this.marhunData = null;
|
||||
this.$toast.error("Rujukan tidak dijumpai atau berlaku ralat.");
|
||||
console.error("Gagal dapatkan data marhun:", error);
|
||||
}
|
||||
},
|
||||
addfunc: function(){
|
||||
|
||||
let dataHantar = {
|
||||
kodcaw: this.kodcaw,
|
||||
nokp: (this.specCust.kpbaru) ? this.specCust.kpbaru : this.specCust.kplama,
|
||||
nota: this.nota
|
||||
};
|
||||
|
||||
console.log("Hantar ke backend:", dataHantar);
|
||||
|
||||
axios.post(this.$hostname + '/admin/AddBarangKes', dataHantar)
|
||||
.then(response => {
|
||||
if(response.data == 'berjaya') {
|
||||
this.showModal = false;
|
||||
this.$toast.success("tambah Sudah Berjaya!");
|
||||
this.$emit('clickEvent_', this.pageNumber);
|
||||
} else {
|
||||
this.showModal = false;
|
||||
this.$toast.error("tambah tidak berjaya");
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error("Gagal hantar:", error);
|
||||
|
||||
|
||||
}).then(response => {
|
||||
|
||||
if(response.data == 'berjaya')
|
||||
{
|
||||
this.showModal = false;
|
||||
this.$toast.success("tambah Sudah Berjaya!")
|
||||
// vm.$forceUpdate();
|
||||
|
||||
this.$emit('clickEvent_', this.pageNumber)
|
||||
|
||||
// setTimeout("window.location.reload()", 3000);
|
||||
}else{
|
||||
|
||||
this.showModal = false;
|
||||
this.$toast.error("tambah tidak berjaya")
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.modal-fade-enter,
|
||||
.modal-fade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.modal-fade-enter-active,
|
||||
.modal-fade-leave-active {
|
||||
transition: opacity .5s ease;
|
||||
}
|
||||
</style>
|
||||
@@ -115,12 +115,19 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
toggleModal: function(){
|
||||
this.showModal = !this.showModal;
|
||||
this.arrayCustomer = [];
|
||||
this.specCust = [];
|
||||
|
||||
this.showModal = !this.showModal;
|
||||
|
||||
this.arrayCustomer = [];
|
||||
this.specCust = {};
|
||||
this.nota = '';
|
||||
|
||||
if(this.$refs.btnDropdownRef){
|
||||
this.$refs.btnDropdownRef.value = '';
|
||||
}
|
||||
},
|
||||
async toggleDropdown() {
|
||||
|
||||
this.specCust = {};
|
||||
await this.getData()
|
||||
|
||||
if(this.arrayCustomer.length > 0)
|
||||
@@ -137,42 +144,52 @@ export default {
|
||||
}
|
||||
|
||||
},
|
||||
getData: function() {
|
||||
async getData() {
|
||||
|
||||
let inputvalue = document.getElementById("frminput").value;
|
||||
|
||||
if(inputvalue)
|
||||
if(!inputvalue)
|
||||
{
|
||||
if(this.hasNumber(inputvalue))
|
||||
{
|
||||
this.axios.get(this.$api1 + '/admin/searchByIC', {
|
||||
params: {
|
||||
ic: inputvalue,
|
||||
kodcaw: this.$kodcaw
|
||||
}
|
||||
}).then(response => {
|
||||
this.arrayCustomer = response.data
|
||||
this.arrayCustomer = [];
|
||||
return;
|
||||
}
|
||||
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
})
|
||||
try {
|
||||
|
||||
|
||||
let response;
|
||||
|
||||
}else{
|
||||
this.axios.get(this.$api1 + '/admin/searchByName', {
|
||||
params: {
|
||||
nama: inputvalue,
|
||||
kodcaw: this.$kodcaw
|
||||
if (this.hasNumber(inputvalue)) {
|
||||
|
||||
response = await this.axios.get(
|
||||
this.$api1 + '/admin/searchByIC',
|
||||
{
|
||||
params: {
|
||||
ic: inputvalue,
|
||||
kodcaw: this.$kodcaw
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
} else {
|
||||
|
||||
response = await this.axios.get(
|
||||
this.$api1 + '/admin/searchByName',
|
||||
{
|
||||
params: {
|
||||
nama: inputvalue,
|
||||
kodcaw: this.$kodcaw
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
}).then(response => {
|
||||
this.arrayCustomer = response.data
|
||||
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
this.arrayCustomer = response.data || [];
|
||||
|
||||
} catch (error) {
|
||||
|
||||
console.log(error);
|
||||
this.arrayCustomer = [];
|
||||
}
|
||||
|
||||
},
|
||||
@@ -221,6 +238,13 @@ export default {
|
||||
},
|
||||
kemaskinifunc: function(){
|
||||
|
||||
if (!this.specCust || !this.specCust.id) {
|
||||
this.$toast.error(
|
||||
"Sila pilih pelanggan daripada senarai carian terlebih dahulu."
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
axios.post(this.$hostname + '/admin/AddSenaraiHitam',
|
||||
{
|
||||
kodcaw: this.$kodcaw,
|
||||
@@ -229,19 +253,18 @@ export default {
|
||||
|
||||
}).then(response => {
|
||||
|
||||
if(response.data == 'berjaya')
|
||||
if(response.data && response.data.id)
|
||||
{
|
||||
this.showModal = false;
|
||||
this.$toast.success("Kemaskini Sudah Berjaya!")
|
||||
this.$toast.success("Kemaskini Sudah Berjaya!");
|
||||
// vm.$forceUpdate();
|
||||
|
||||
this.$emit('clickEvent_', this.pageNumber)
|
||||
|
||||
this.$emit('clickEvent_', this.pageNumber);
|
||||
// setTimeout("window.location.reload()", 3000);
|
||||
}else{
|
||||
|
||||
this.showModal = false;
|
||||
this.$toast.error("Kemaskini tidak berjaya")
|
||||
this.$toast.error("Kemaskini tidak berjaya");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -43,6 +43,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">
|
||||
Tarikh Bayaran
|
||||
</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">
|
||||
Masa Bayaran
|
||||
</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">
|
||||
Bayaran
|
||||
</th>
|
||||
@@ -54,14 +57,13 @@
|
||||
<tbody>
|
||||
<tr v-if="objbayaran.length === 0">
|
||||
<td colspan="9" class="text-center 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">
|
||||
Tiada Data Diperolehi
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<div class="flex flex-col items-center justify-center py-8">
|
||||
<svg class="w-16 h-16 text-gray-300 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
|
||||
</svg>
|
||||
<p class="text-gray-700 font-semibold text-lg">Tiada Data Diperolehi</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-for="(bayaran,i) in objbayaran" :key="i">
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
@@ -75,7 +77,15 @@
|
||||
<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="bayaran.created_at">
|
||||
<p class="text-gray-900 whitespace-no-wrap" v-text="formatDate(bayaran.created_at,'date')">
|
||||
</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="formatDate(bayaran.created_at,'time')">
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -125,14 +135,13 @@
|
||||
<tbody>
|
||||
<tr v-if="objupah.length === 0">
|
||||
<td colspan="9" class="text-center 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">
|
||||
Tiada Data Diperolehi
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<div class="flex flex-col items-center justify-center py-8">
|
||||
<svg class="w-16 h-16 text-gray-300 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
|
||||
</svg>
|
||||
<p class="text-gray-700 font-semibold text-lg">Tiada Data Diperolehi</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-for="(upah,i) in objupah" :key="i">
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
@@ -179,25 +188,25 @@
|
||||
<table class="min-w-full leading-normal">
|
||||
<thead class="text-center">
|
||||
<tr>
|
||||
<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">
|
||||
<th class="w-1/8 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">
|
||||
<th class="w-1/8 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">
|
||||
No Rujukan
|
||||
</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">
|
||||
Jenis Penyelesaian Pembiayaan
|
||||
<th class="w-1/8 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">
|
||||
Jenis
|
||||
</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">
|
||||
<th class="w-1/8 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">
|
||||
Pembiayaan Asal
|
||||
</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">
|
||||
<th class="w-1/8 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">
|
||||
Tempoh
|
||||
</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">
|
||||
Tarikh Penyelesaian Pembiayaan
|
||||
<th class="w-1/8 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">
|
||||
Tarikh
|
||||
</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">
|
||||
<th class="w-1/8 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>
|
||||
@@ -205,14 +214,13 @@
|
||||
<tbody>
|
||||
<tr v-if="objrekod.length === 0">
|
||||
<td colspan="9" class="text-center 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">
|
||||
Tiada Data Diperolehi
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<div class="flex flex-col items-center justify-center py-8">
|
||||
<svg class="w-16 h-16 text-gray-300 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
|
||||
</svg>
|
||||
<p class="text-gray-700 font-semibold text-lg">Tiada Data Diperolehi</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-for="(rekod,i) in objrekod" :key="i">
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
@@ -266,12 +274,15 @@
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3">
|
||||
<button type="button" @click="rekodfunc(rekod.norujukan,rekod.jenistebus,rekod.hargajualan)" data-modal-toggle="popup-modal" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300">
|
||||
<button type="button" @click="rekodfunc(rekod.norujukan,rekod.jenistebus,rekod.hargajualan)" data-modal-toggle="popup-modal" class="mt-2 border border-yellow-600 text-yellow-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" />
|
||||
</svg>
|
||||
</button>
|
||||
<button v-if="rekod.ujrah != 0" type="button" @click="rekodSAGStatements(rekod.norujukan)" data-modal-toggle="popup-modal" class="border border-green-600 text-green-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-green-600 hover:text-white transition-all duration-300">
|
||||
<i class="fa-solid fa-box-archive"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@@ -390,6 +401,53 @@ export default {
|
||||
break;
|
||||
}
|
||||
},
|
||||
rekodSAGStatements: function(norujukan){
|
||||
let urlroute = window.route('accountstatement.rekod', norujukan)
|
||||
window.open(urlroute, '_blank');
|
||||
},
|
||||
formatDate(datetime, type) {
|
||||
if (!datetime) return '';
|
||||
|
||||
const date = new Date(datetime);
|
||||
|
||||
if (type === 'date') {
|
||||
// Return date only in dd/mm/yyyy format
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const year = date.getFullYear();
|
||||
return `${day}/${month}/${year}`;
|
||||
}
|
||||
|
||||
if (type === 'time') {
|
||||
// Return time in 12-hour format with AM/PM
|
||||
let hours = date.getHours();
|
||||
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||
const seconds = String(date.getSeconds()).padStart(2, '0');
|
||||
const ampm = hours >= 12 ? 'PM' : 'AM';
|
||||
|
||||
hours = hours % 12;
|
||||
hours = hours ? hours : 12; // the hour '0' should be '12'
|
||||
hours = String(hours).padStart(2, '0');
|
||||
|
||||
return `${hours}:${minutes}:${seconds} ${ampm}`;
|
||||
}
|
||||
|
||||
// Default: return both date and time
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const year = date.getFullYear();
|
||||
|
||||
let hours = date.getHours();
|
||||
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||
const seconds = String(date.getSeconds()).padStart(2, '0');
|
||||
const ampm = hours >= 12 ? 'PM' : 'AM';
|
||||
|
||||
hours = hours % 12;
|
||||
hours = hours ? hours : 12;
|
||||
hours = String(hours).padStart(2, '0');
|
||||
|
||||
return `${day}/${month}/${year} ${hours}:${minutes}:${seconds} ${ampm}`;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<div class="">
|
||||
|
||||
<deletemodal ref="delmodal" @clickDelete_="getBarangKes"></deletemodal>
|
||||
<modal ref="modal" @clickEvent_="getBarangKes"></modal>
|
||||
|
||||
<div class="flex justify-between mb-2">
|
||||
<div>
|
||||
<button @click.prevent="showModal" class="border border-green-600 text-green-600 font-montserrat py-2 px-3 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300">
|
||||
<i class="fas fa-plus mr-2"></i>Daftar
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<input v-model="search" class="border border-2 rounded px-4 py-2 w-80r mr-2" type="text" />
|
||||
<button @click.prevent="searchname" 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-search mr-2"></i>Cari
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="min-w-full leading-normal">
|
||||
<thead class="text-center">
|
||||
<tr>
|
||||
<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">Nama</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">IC</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">Nota</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>
|
||||
<tr v-for="(barangkes, i) in showBarangKes.data" :key="i">
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<p class="text-gray-900 whitespace-no-wrap" v-text="(showBarangKes.from + i)"></p>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<p class="text-gray-900 whitespace-no-wrap" v-text="barangkes.nama"></p>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<p class="text-gray-900 whitespace-no-wrap" v-text="barangkes.nokp"></p>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<p class="text-gray-900 whitespace-no-wrap" v-text="barangkes.nota"></p>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<button @click="deleteBarangKes(barangkes.id, barangkes.nama, barangkes.nokp)" class="border border-red-600 text-red-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-red-600 hover:text-white transition-all duration-300">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
|
||||
</svg>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<pagination :data="paginate" @clickEvent_="getBarangKes"></pagination>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pagination from '../components/pagination.vue'
|
||||
import modal from '../components/util/BarangkesModal.vue'
|
||||
import deletemodal from '../components/util/Deletemodal.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
pagination,
|
||||
modal,
|
||||
deletemodal
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentPage: 1,
|
||||
showBarangKes: [],
|
||||
paginate: {},
|
||||
search: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getBarangKes(this.currentPage)
|
||||
},
|
||||
methods: {
|
||||
getBarangKes(pageNumber) {
|
||||
|
||||
},
|
||||
|
||||
showModal() {
|
||||
this.$refs.modal.showModal = true;
|
||||
this.$refs.modal.kodcaw = this.$kodcaw;
|
||||
},
|
||||
deleteBarangKes(id, nama, nokp) {
|
||||
this.$refs.delmodal.deleteid = id;
|
||||
this.$refs.delmodal.nama = nama;
|
||||
this.$refs.delmodal.nokp = nokp;
|
||||
this.$refs.delmodal.showDelete = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<modal ref="modal" @clickEvent_="getDataSenaraiSAG"></modal>
|
||||
|
||||
<form :class="{ 'w-2/3' : this.showsag}" class="w-1/2 mt-10 p-6 bg-white rounded-xl shadow mx-auto">
|
||||
<form :class="{ 'w-2/3' : this.showsag}" class="min-h-[50vh] w-1/2 mt-10 p-6 bg-white rounded-xl shadow mx-auto">
|
||||
|
||||
<ul class="flex hidden rounded-lg divide-x divide-gray-200 shadow sm:flex dark:divide-gray-700 mb-4">
|
||||
<li class="w-full">
|
||||
@@ -131,7 +131,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-between mt-4">
|
||||
<!-- <div class="flex items-center justify-between mt-4">
|
||||
|
||||
<a class="inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800" href="#">
|
||||
</a>
|
||||
@@ -140,7 +140,7 @@
|
||||
<span v-else @click="submit">Kemaskini</span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<div id="tabs-2" v-if="this.showsag">
|
||||
@@ -207,12 +207,13 @@
|
||||
<tbody>
|
||||
<tr v-if="objbelumtebus.from === null">
|
||||
<td colspan="9" class="text-center 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">
|
||||
Tiada data yang diperolehi dalam carian
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex flex-col items-center justify-center py-8">
|
||||
<svg class="w-14 h-14 text-gray-400 mb-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
|
||||
</svg>
|
||||
<p class="text-gray-900 whitespace-no-wrap">
|
||||
Tiada data yang diperolehi dalam carian
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -334,12 +335,13 @@
|
||||
<tbody>
|
||||
<tr v-if="objsudahtebus.from === null">
|
||||
<td colspan="9" class="text-center 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">
|
||||
Tiada data yang diperolehi dalam carian
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex flex-col items-center justify-center py-8">
|
||||
<svg class="w-14 h-14 text-gray-400 mb-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
|
||||
</svg>
|
||||
<p class="text-gray-900 whitespace-no-wrap">
|
||||
Tiada data yang diperolehi dalam carian
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -457,12 +459,13 @@
|
||||
<tbody>
|
||||
<tr v-if="objlelong.from === null">
|
||||
<td colspan="9" class="text-center 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">
|
||||
Tiada data yang diperolehi dalam carian
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex flex-col items-center justify-center py-8">
|
||||
<svg class="w-14 h-14 text-gray-400 mb-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
|
||||
</svg>
|
||||
<p class="text-gray-900 whitespace-no-wrap">
|
||||
Tiada data yang diperolehi dalam carian
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -0,0 +1,267 @@
|
||||
<template>
|
||||
<div class="container w-full max-w-7xl mx-auto mt-10 px-4 font-sans">
|
||||
<div class="bg-white shadow rounded-lg">
|
||||
<!-- Customer Info -->
|
||||
<div v-if="customer" class="p-6 border-b">
|
||||
<h2 class="text-lg font-bold mb-2">Maklumat Customer</h2>
|
||||
<p><strong>Nama:</strong> {{ customer.nama }}</p>
|
||||
<p><strong>No Telefon:</strong> {{ customer.telefon }}</p>
|
||||
<p><strong>KP Baru:</strong> {{ customer.kpbaru }}</p>
|
||||
<p><strong>No Rujukan:</strong> {{ gadaiItem.norujukan }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Tab Title -->
|
||||
<div class="border-b flex">
|
||||
<a id="sag"
|
||||
href="#"
|
||||
class="px-6 py-3 font-semibold text-blue-600 border-b-2 border-blue-600">
|
||||
Maklumat SAG
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="gadaiItem" class="p-6">
|
||||
<div class="grid grid-cols-2 gap-6">
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700">No Rujukan</label>
|
||||
<input
|
||||
class="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue
|
||||
-500"
|
||||
type="text"
|
||||
v-model="gadaiItem.norujukan"
|
||||
:readonly="!isEditing"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700">Tarikh</label>
|
||||
<input
|
||||
class="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue
|
||||
-500"
|
||||
type="date"
|
||||
v-model="gadaiItem.t_gadai"
|
||||
:readonly="!isEditing"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700">Pinjaman (RM)</label>
|
||||
<input
|
||||
class="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue
|
||||
-500"
|
||||
type="number"
|
||||
step="0.01"
|
||||
v-model="gadaiItem.pinjaman"
|
||||
:readonly="!isEditing"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700">Nilai Marhun (RM)</label>
|
||||
<input
|
||||
class="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue
|
||||
-500"
|
||||
type="number"
|
||||
step="0.01"
|
||||
v-model="gadaiItem.nilaimarhun"
|
||||
:readonly="!isEditing"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700">JBG</label>
|
||||
<input
|
||||
class="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue
|
||||
-500"
|
||||
type="number"
|
||||
v-model="gadaiItem.jbg"
|
||||
:readonly="!isEditing"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700">Keuntungan 1% (RM)</label>
|
||||
<input
|
||||
class="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue
|
||||
-500"
|
||||
type="number"
|
||||
step="0.01"
|
||||
v-model="gadaiItem.tunggakanonepercent"
|
||||
:readonly="!isEditing"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700">Lain-lain caj (RM)</label>
|
||||
<input
|
||||
class="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue
|
||||
-500"
|
||||
type="number"
|
||||
step="0.01"
|
||||
v-model="gadaiItem.tunggakanujrah"
|
||||
:readonly="!isEditing"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- BUTTONS -->
|
||||
<div class="flex justify-end space-x-2 mt-6">
|
||||
<button
|
||||
type="button"
|
||||
@click="toggleEdit"
|
||||
:class="isEditing ? 'bg-red-600 hover:bg-red-700' : 'bg-gray-600 hover:bg-blue-700'"
|
||||
class="px-4 py-2 text-white rounded-md shadow"
|
||||
>
|
||||
{{ isEditing ? 'Batal' : 'Ubah' }}
|
||||
</button>
|
||||
|
||||
<button
|
||||
v-if="isEditing"
|
||||
type="button"
|
||||
@click="kemaskini"
|
||||
class="px-4 py-2 bg-gray-600 text-white rounded-md shadow hover:bg-blue-700"
|
||||
>
|
||||
Kemaskini
|
||||
</button>
|
||||
|
||||
<button
|
||||
v-if="!isEditing"
|
||||
type="button"
|
||||
@click="daftar"
|
||||
class="px-4 py-2 bg-gray-600 text-white rounded-md shadow hover:bg-blue-700"
|
||||
>
|
||||
Daftar
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Swal from 'sweetalert2'
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
kodcaw: { type: String, required: true },
|
||||
customer: { type: Object, required: true },
|
||||
gadai: { type: Object, default: () => ({}) }
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
gadaiItem: {
|
||||
norujukan: '',
|
||||
t_gadai: '',
|
||||
pinjaman: '',
|
||||
teller: '',
|
||||
nilaimarhun: '',
|
||||
jbg: '',
|
||||
nota: '',
|
||||
tunggakan: '',
|
||||
tunggakanonepercent: '',
|
||||
tunggakanujrah: ''
|
||||
},
|
||||
originalGadaiItem: {},
|
||||
showSag: true,
|
||||
loading: false,
|
||||
isEditing: false
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
console.log("Props diterima:", this.customer)
|
||||
console.log('gadai Item:', this.gadai);
|
||||
|
||||
if (this.gadai && Object.keys(this.gadai).length > 0) {
|
||||
this.gadaiItem = { ...this.gadai }
|
||||
this.originalGadaiItem = { ...this.gadai }
|
||||
} else if (this.customer?.norujukan) {
|
||||
this.fetchGadaiByNorujukan(this.customer.norujukan)
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
async fetchGadaiByNorujukan(norujukan) {
|
||||
this.loading = true
|
||||
try {
|
||||
const url = this.$hostname + '/api/gadai/norujukan/' + this.customer.kodcaw + '/' + norujukan
|
||||
const res = await axios.get(url)
|
||||
this.gadaiItem = res.data || {}
|
||||
this.originalGadaiItem = { ...res.data }
|
||||
} catch (e) {
|
||||
console.error("Gagal fetch data gadai:", e)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
|
||||
toggleEdit() {
|
||||
// Jika sedang edit → klik Batal, reset data asal
|
||||
if (this.isEditing) {
|
||||
this.gadaiItem = { ...this.originalGadaiItem }
|
||||
this.isEditing = false
|
||||
} else {
|
||||
// Jika belum edit → klik Ubah, enable field
|
||||
this.isEditing = true
|
||||
}
|
||||
},
|
||||
|
||||
async daftar() {
|
||||
try {
|
||||
this.loading = true
|
||||
console.log("Customer data:", this.customer)
|
||||
console.log("Gadai Item:", this.gadaiItem)
|
||||
console.log("kod caw:", this.kodcaw)
|
||||
|
||||
let response = await axios.post(this.$hostname + '/api/barangkes/store', {
|
||||
...this.gadaiItem,
|
||||
})
|
||||
|
||||
if (response.data.success) {
|
||||
Swal.fire({ icon: 'success', title: 'Berjaya', text: response.data.message })
|
||||
this.originalGadaiItem = { ...this.gadaiItem }
|
||||
this.isEditing = false
|
||||
} else {
|
||||
Swal.fire({ icon: 'error', title: 'Ralat', text: response.data.message })
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("Error daftar:", e)
|
||||
Swal.fire({ icon: 'error', title: 'Server Error', text: 'Pendaftaran gagal' })
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
|
||||
async kemaskini() {
|
||||
try {
|
||||
this.loading = true
|
||||
let response = await axios.put(this.$hostname + '/api/barangkes/update/' + this.gadaiItem.recno, {
|
||||
...this.gadaiItem,
|
||||
})
|
||||
|
||||
if (response.data.success) {
|
||||
Swal.fire({ icon: 'success', title: 'Berjaya', text: response.data.message })
|
||||
this.originalGadaiItem = { ...this.gadaiItem }
|
||||
this.isEditing = false
|
||||
} else {
|
||||
Swal.fire({ icon: 'error', title: 'Ralat', text: response.data.message })
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("Error kemaskini:", e)
|
||||
Swal.fire({ icon: 'error', title: 'Server Error', text: 'Kemaskini gagal' })
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Vendored
+2
@@ -61,6 +61,7 @@ import AuditPage from './Audit/Audit'
|
||||
import KeuntunganSebenarPage from './Audit/KeuntunganSebenar'
|
||||
import UpahSimpanPage from './Audit/UpahSimpan'
|
||||
import LaporanLelong from './Akaun/LaporanLelong.vue'
|
||||
import Barangkes from './Akaun/Barangkes.vue'
|
||||
|
||||
|
||||
|
||||
@@ -105,6 +106,7 @@ export default new VueRouter({
|
||||
{ path: '/akaunhome/imbangdugabackup', component: ImbangDugaBackup },
|
||||
{ path: '/akaunhome/saghilang', component: SagHilang },
|
||||
{ path: '/akaunhome/laporanlelong', component: LaporanLelong },
|
||||
{ path: '/akaunhome/barangkes', component: Barangkes },
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,501 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Account Statements - {{ $bankDetails['name'] }}</title>
|
||||
<!-- Load Tailwind CSS -->
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<style>
|
||||
/* Custom styles for the Inter font */
|
||||
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
|
||||
|
||||
body {
|
||||
font-family: 'Inter', sans-serif;
|
||||
background-color: #f3f4f6;
|
||||
}
|
||||
|
||||
.statement-table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
/* A4 Print Optimization */
|
||||
@media print {
|
||||
@page {
|
||||
size: A4;
|
||||
margin: 8mm; /* Minimal margin to prevent printer cutoff */
|
||||
padding: 8mm;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: white;
|
||||
font-size: 9pt;
|
||||
-webkit-print-color-adjust: exact;
|
||||
color-adjust: exact;
|
||||
}
|
||||
|
||||
.statement-container {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
margin: 0 !important;
|
||||
padding: 3mm 5mm !important; /* Minimal padding */
|
||||
box-shadow: none;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.no-print {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
header {
|
||||
border-color: #1f2937 !important;
|
||||
}
|
||||
|
||||
/* Optimize table for print */
|
||||
.statement-table {
|
||||
font-size: 8pt;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.statement-table th {
|
||||
padding: 4px 6px !important;
|
||||
font-size: 7pt;
|
||||
}
|
||||
|
||||
.statement-table td {
|
||||
padding: 3px 6px !important;
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
/* Reduce header size */
|
||||
header h1 {
|
||||
font-size: 20pt !important;
|
||||
}
|
||||
|
||||
header .text-sm {
|
||||
font-size: 8pt !important;
|
||||
}
|
||||
|
||||
/* Reduce summary section */
|
||||
.bg-blue-50 {
|
||||
padding: 8px !important;
|
||||
margin-bottom: 12px !important;
|
||||
}
|
||||
|
||||
.bg-blue-50 h2 {
|
||||
font-size: 14pt !important;
|
||||
margin-bottom: 8px !important;
|
||||
}
|
||||
|
||||
.bg-blue-50 .text-sm {
|
||||
font-size: 8pt !important;
|
||||
}
|
||||
|
||||
/* Reduce final summary box */
|
||||
.max-w-lg {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
/* Prevent page breaks inside table rows */
|
||||
.statement-table tr {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
/* Keep header rows on every page if table spans multiple pages */
|
||||
.statement-table thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
|
||||
.statement-table tfoot {
|
||||
display: table-footer-group;
|
||||
}
|
||||
|
||||
/* Reduce margins and padding throughout */
|
||||
header {
|
||||
padding-bottom: 4mm !important;
|
||||
margin-bottom: 4mm !important;
|
||||
}
|
||||
|
||||
.mb-8 {
|
||||
margin-bottom: 4mm !important;
|
||||
}
|
||||
|
||||
.mb-6 {
|
||||
margin-bottom: 3mm !important;
|
||||
}
|
||||
|
||||
.p-8 {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.p-4 {
|
||||
padding: 6px !important;
|
||||
}
|
||||
|
||||
.p-6 {
|
||||
padding: 8px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.statement-container {
|
||||
max-width: 80rem;
|
||||
}
|
||||
|
||||
.print\:page-break-before {
|
||||
page-break-before: always;
|
||||
break-before: page;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="p-8">
|
||||
|
||||
@php
|
||||
// Helper function to format currency for the template
|
||||
function formatCurrency($amount, $currency = 'RM')
|
||||
{
|
||||
return is_numeric($amount) ? `$currency ` . number_format($amount, 2) : '-';
|
||||
}
|
||||
@endphp
|
||||
|
||||
<div class="statement-container mx-auto bg-white p-8 shadow-lg rounded-lg border border-gray-200">
|
||||
|
||||
<!-- Header Section -->
|
||||
<header class="flex justify-between items-start pb-6 border-b-4 border-gray-800 mb-6">
|
||||
<div class="flex-shrink-0">
|
||||
<h1 class="text-xl font-extrabold text-gray-800 uppercase tracking-widest">{{ $bankDetails['name'] }}
|
||||
</h1>
|
||||
<p class="text-sm mt-1 text-gray-600">{!! $bankDetails['address'] !!}</p>
|
||||
</div>
|
||||
<div class="text-right flex flex-col items-end">
|
||||
<div class="text-xl font-bold text-gray-700 mb-2">{{ $gadaian['norujukan'] }}</div>
|
||||
<div class="bg-gray-100 p-3 rounded-lg text-sm grid grid-cols-2 gap-x-4 gap-y-1 w-full">
|
||||
<span class="font-semibold text-gray-700">IC:</span>
|
||||
<span class="text-gray-900 font-mono">{{ $gadaian['nokp'] }}</span>
|
||||
|
||||
<span class="font-semibold text-gray-700">Tarikh Pembiayaan:</span>
|
||||
<span class="text-gray-900">{{ $gadaian['t_gadai'] }}</span>
|
||||
|
||||
<span class="font-semibold text-gray-700">Tempoh Pembiayaan:</span>
|
||||
<span class="text-gray-900 text-xs">{{ $gadaian['tempoh'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- Address and Statement Info -->
|
||||
<div class="flex justify-between items-start mb-8">
|
||||
<!-- Account Holder Address -->
|
||||
<div class="w-1/2 pr-4">
|
||||
<p class="text-lg font-bold text-gray-900 uppercase">{{ $accountHolder['name'] }}</p>
|
||||
<p class="text-sm text-gray-700 uppercase">{!! $accountHolder['address'] !!}</p>
|
||||
<p class="text-sm text-gray-700 uppercase">{{ $accountHolder['city_state_zip'] }}</p>
|
||||
</div>
|
||||
<!-- Branch Info (from PDF structure) -->
|
||||
<div class="w-1/2 text-right">
|
||||
<p class="text-sm font-semibold text-gray-700">{{ $bankDetails['branch'] }}</p>
|
||||
<p class="text-xs text-gray-500 mt-1">Page 1 of 1</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Account Summary -->
|
||||
<div class="mb-8 p-4 bg-blue-50 rounded-lg shadow-inner">
|
||||
<h2 class="text-xl font-bold text-blue-800 mb-3 border-b pb-2">Ringkasan Pembiayaan</h2>
|
||||
<div class="grid grid-cols-2 sm:grid-cols-3 gap-4 text-sm">
|
||||
<!-- Row 1 -->
|
||||
<div>
|
||||
<div class="font-semibold text-gray-700">Pembiayaan:</div>
|
||||
<div class="text-gray-900 font-bold text-lg">{{ formatCurrency($gadaian['pinjaman']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="font-semibold text-gray-700">Nilai Marhun:</div>
|
||||
<div class="text-green-600 font-bold text-lg">{{ formatCurrency($gadaian['nilaimarhun']) }}</div>
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<div>
|
||||
<div class="font-semibold text-gray-700">1 Percent:</div>
|
||||
<div class="text-red-600 font-bold text-lg">{{ formatCurrency($gadaian['ujrah']) }}</div>
|
||||
<div class="font-semibold text-gray-700">Ujrah:</div>
|
||||
<div class="text-red-600 font-bold text-lg">{{ formatCurrency($gadaian['onepercent']) }}</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="font-semibold text-gray-700">Keuntungan:</div>
|
||||
<div class="text-red-600 font-bold text-lg">{{ formatCurrency($gadaian['ujrah'] + $gadaian['onepercent']) }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Row 2 -->
|
||||
<div>
|
||||
<div class="font-semibold text-gray-700">Harga Jualan:</div>
|
||||
<div class="text-gray-900">{{ formatCurrency($gadaian['hargajualan']) }}</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="font-semibold text-gray-700">Jumlah Transaksi:</div>
|
||||
<div class="text-gray-900">{{ $transaction_count }}</div>
|
||||
</div>
|
||||
<div class="bg-blue-200 p-2 rounded-md shadow-md">
|
||||
<div class="font-semibold text-blue-900">Harga Tebus:</div>
|
||||
<div class="text-blue-900 font-extrabold text-xl">{{ formatCurrency($tebusTransaction['duit_masuk']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Transactions Table -->
|
||||
<div class="mb-6">
|
||||
<h2 class="text-xl font-bold text-gray-800 mb-3 border-b pb-2">Transaksi</h2>
|
||||
|
||||
<table class="w-full statement-table text-left text-sm">
|
||||
<thead>
|
||||
<tr class="bg-gray-100 text-gray-700 uppercase tracking-wider">
|
||||
<th class="py-3 px-4 border border-gray-300 w-1/12">Tarikh</th>
|
||||
<th class="py-3 px-4 border border-gray-300 w-2/12">Deskripsi</th>
|
||||
<th class="py-3 px-4 border border-gray-300 w-1/12">Tempoh</th>
|
||||
<th class="py-3 px-4 border border-gray-300 w-2/12 text-right">Bayaran (RM)</th>
|
||||
<th class="py-3 px-4 border border-gray-300 w-1/12 text-right">Upah (RM)</th>
|
||||
<th class="py-3 px-4 border border-gray-300 w-2/12 text-right">Pembiayaan (RM)</th>
|
||||
<th class="py-3 px-4 border border-gray-300 w-1/12 text-right">Rebet (RM)</th>
|
||||
<th class="py-3 px-4 border border-gray-300 w-2/12 text-right">Baki (RM)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php $totalUpahRebet=0;$totalUpah = 0; $totalBayaran = 0; $totalPembiayaan = 0; $totalRebet = 0; @endphp
|
||||
@foreach ($ansuranTransaction as $transaction)
|
||||
<tr class="hover:bg-gray-50">
|
||||
<td class="py-2 px-4 border border-gray-300">{{ date('d/m/Y', strtotime($transaction['created_at'])) }}</td>
|
||||
<td class="py-2 px-4 border border-gray-300">{{ ($transaction['teller'] == 'Online') ? 'Bayaran Online' : 'Bayaran Kaunter' }}</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right font-semibold text-gray-800">
|
||||
{{ $transaction['beza_tempoh'] }}
|
||||
</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right text-green-700 font-medium">
|
||||
@if ($transaction['duit_masuk'])
|
||||
{{ formatCurrency($transaction['duit_masuk']) }}
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right text-red-700 font-medium">
|
||||
@if ($transaction['bayaran_keuntungan'])
|
||||
{{ formatCurrency($transaction['bayaran_keuntungan']) }}
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right text-red-700 font-medium">
|
||||
@if ($transaction['bayaran_pembiayaan'])
|
||||
{{ formatCurrency($transaction['bayaran_pembiayaan']) }}
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right font-semibold text-gray-800">
|
||||
{{ formatCurrency($transaction['bayaran_keuntungan'] - $transaction['keuntungan_rebet']) }}
|
||||
</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right font-semibold text-gray-800">
|
||||
{{ formatCurrency($transaction['bakipinjaman']) }}
|
||||
</td>
|
||||
</tr>
|
||||
@php $totalUpahRebet += $transaction['keuntungan_rebet']; $totalUpah += $transaction['bayaran_keuntungan']; $totalBayaran += $transaction['duit_masuk']; $totalPembiayaan += $transaction['bayaran_pembiayaan']; $totalRebet += ($transaction['bayaran_keuntungan'] - $transaction['keuntungan_rebet']);@endphp
|
||||
@endforeach
|
||||
|
||||
<!-- Tebus Transaction Row -->
|
||||
<tr class="hover:bg-gray-50">
|
||||
<td class="py-2 px-4 border border-gray-300">{{ date('d/m/Y', strtotime($tebusTransaction['created_at'])) }}</td>
|
||||
<td class="py-2 px-4 border border-gray-300">Tebus Kaunter</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right font-semibold text-gray-800">
|
||||
{{ $tebusTransaction['beza_tempoh'] }}
|
||||
</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right text-green-700 font-medium">
|
||||
@if ($tebusTransaction['duit_masuk'])
|
||||
{{-- {{ formatCurrency($tebusTransaction['duit_masuk']) }} --}}
|
||||
-
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right text-red-700 font-medium">
|
||||
@if ($tebusTransaction['bayaran_keuntungan'])
|
||||
{{ formatCurrency($tebusTransaction['bayaran_keuntungan']) }}
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right text-red-700 font-medium">
|
||||
@if ($tebusTransaction['bayaran_pembiayaan'])
|
||||
{{-- {{ formatCurrency($tebusTransaction['bayaran_pembiayaan']) }} --}}
|
||||
-
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right font-semibold text-gray-800">
|
||||
@php $tebusRebet = ($tebusTransaction['bayaran_keuntungan'] - $tebusTransaction['keuntungan_rebet']) - $totalRebet;@endphp
|
||||
{{ formatCurrency($tebusRebet) }}
|
||||
</td>
|
||||
<td class="py-2 px-4 border border-gray-300 text-right font-semibold text-gray-800">
|
||||
0
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Closing Balance Row -->
|
||||
<tr class="bg-blue-100 font-bold text-base text-blue-900">
|
||||
<td colspan="3" class="py-3 px-4 border border-gray-300 text-center">Jumlah</td>
|
||||
<td class="py-3 px-4 border border-gray-300 text-right">
|
||||
{{ formatCurrency($totalBayaran) }}</td>
|
||||
<td class="py-3 px-4 border border-gray-300 text-right">
|
||||
{{ formatCurrency($totalUpah + $tebusTransaction['bayaran_keuntungan']) }}</td>
|
||||
<td class="py-3 px-4 border border-gray-300 text-right">
|
||||
{{ formatCurrency($totalPembiayaan) }}</td>
|
||||
<td class="py-3 px-4 border border-gray-300 text-right">
|
||||
{{ formatCurrency($totalRebet + $tebusRebet) }}</td>
|
||||
<td class="py-3 px-4 border border-gray-300 text-right">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="print:page-break-before flex">
|
||||
<div class="p-6 bg-white border border-gray-200 rounded-lg shadow-md max-w-lg mx-auto font-sans">
|
||||
<div class="flex items-center mb-4 border-b-2 border-black pb-1">
|
||||
<h2 class="text-xl font-bold bg-white px-2 py-1 border border-black inline-block tracking-widest">
|
||||
SEMAKAN BAKI PEMBIAYAAN</h2>
|
||||
</div>
|
||||
@php
|
||||
/*Calculation Baki Pembiayaan*/
|
||||
$bakiPembiayaan = $tebusTransaction['bayaran_pembiayaan'];
|
||||
$onePercent = $tebusTransaction['onepercent'];
|
||||
$onePercentRebet = $tebusTransaction['onepercent'] - $tebusTransaction['onepercent_rebet'];
|
||||
$ujrah = $tebusTransaction['ujrah'];
|
||||
$ujrahRebet = $tebusTransaction['ujrah'] - $tebusTransaction['ujrah_rebet'];
|
||||
$totalBayaranPembiayaan = $bakiPembiayaan + $onePercent - $onePercentRebet + $ujrah - $ujrahRebet;
|
||||
@endphp
|
||||
|
||||
<div class="grid grid-cols-2 gap-y-2 text-sm">
|
||||
<div class="col-span-1"></div>
|
||||
<div class="col-span-1 text-right font-bold tracking-widest text-xs">JUMLAH</div>
|
||||
|
||||
{{-- Beginning Balance --}}
|
||||
<div class="col-span-1 font-semibold">Baki Pembiayaan</div>
|
||||
<div class="col-span-1 text-right font-bold text-base border-b border-black">
|
||||
{{ formatCurrency($bakiPembiayaan) }}
|
||||
</div>
|
||||
|
||||
{{-- Deposits and Additions --}}
|
||||
<div class="col-span-1">(+) Keuntungan 1%</div>
|
||||
<div class="col-span-1 text-right">
|
||||
{{ formatCurrency($onePercent) }}
|
||||
</div>
|
||||
|
||||
{{-- ATM & Debit Card Withdrawals --}}
|
||||
<div class="col-span-1">(-) Rebet Keuntungan 1%</div>
|
||||
<div class="col-span-1 text-right text-red-600">
|
||||
{{ formatCurrency($onePercentRebet) }}
|
||||
</div>
|
||||
|
||||
{{-- Deposits and Additions --}}
|
||||
<div class="col-span-1">(+) Ujrah</div>
|
||||
<div class="col-span-1 text-right">
|
||||
{{ formatCurrency($ujrah) }}
|
||||
</div>
|
||||
|
||||
{{-- ATM & Debit Card Withdrawals --}}
|
||||
<div class="col-span-1">(-) Rebet Ujrah</div>
|
||||
<div class="col-span-1 text-right text-red-600">
|
||||
{{ formatCurrency($ujrahRebet) }}
|
||||
</div>
|
||||
|
||||
{{-- Separator Line (Visual emphasis for Ending Balance calculation) --}}
|
||||
<div class="col-span-2 my-2"></div>
|
||||
|
||||
{{-- Ending Balance --}}
|
||||
<div class="col-span-1 font-extrabold text-base">Jumlah Bayaran</div>
|
||||
<div class="col-span-1 text-right font-bold text-lg">
|
||||
{{ formatCurrency($totalBayaranPembiayaan) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p-6 bg-white border border-gray-200 rounded-lg shadow-md max-w-lg mx-auto font-sans">
|
||||
<div class="flex items-center mb-4 border-b-2 border-black pb-1">
|
||||
<h2 class="text-xl font-bold bg-white px-2 py-1 border border-black inline-block tracking-widest">
|
||||
SEMAKAN BAKI HARGA JUALAN</h2>
|
||||
</div>
|
||||
|
||||
@php
|
||||
/*Calculation Baki Harga Jualan*/
|
||||
$bakiHargaJualan = $gadaian['hargajualan'] - $totalBayaran;
|
||||
$upah12 = $gadaian['upah12'];
|
||||
$totalUpahRebet = $totalUpahRebet;
|
||||
$tebusRebet = ($tebusTransaction['bayaran_keuntungan'] - $tebusRebet);
|
||||
$totalBayaranBakiHargaJualan = $bakiHargaJualan - $upah12 + $totalUpahRebet + $tebusRebet;
|
||||
@endphp
|
||||
|
||||
<div class="grid grid-cols-2 gap-y-2 text-sm">
|
||||
<div class="col-span-1"></div>
|
||||
<div class="col-span-1 text-right font-bold tracking-widest text-xs">JUMLAH</div>
|
||||
|
||||
{{-- Beginning Balance --}}
|
||||
<div class="col-span-1 font-semibold">Baki Harga Jualan</div>
|
||||
<div class="col-span-1 text-right font-bold text-base border-b border-black">
|
||||
{{ formatCurrency($bakiHargaJualan) }}
|
||||
</div>
|
||||
|
||||
{{-- Deposits and Additions --}}
|
||||
<div class="col-span-1">(-) Upah 12</div>
|
||||
<div class="col-span-1 text-right text-red-600">
|
||||
{{ formatCurrency($upah12) }}
|
||||
</div>
|
||||
|
||||
{{-- ATM & Debit Card Withdrawals --}}
|
||||
<div class="col-span-1">(+) Jumlah Rebet</div>
|
||||
<div class="col-span-1 text-right ">
|
||||
{{ formatCurrency($totalUpahRebet) }}
|
||||
</div>
|
||||
|
||||
{{-- Deposits and Additions --}}
|
||||
<div class="col-span-1">(+) Upah Tebus Rebet</div>
|
||||
<div class="col-span-1 text-right">
|
||||
{{ formatCurrency($tebusRebet) }}
|
||||
</div>
|
||||
|
||||
{{-- Separator Line (Visual emphasis for Ending Balance calculation) --}}
|
||||
<div class="col-span-2 my-2"></div>
|
||||
|
||||
{{-- Ending Balance --}}
|
||||
<div class="col-span-1 font-extrabold text-base">Jumlah Bayaran</div>
|
||||
<div class="col-span-1 text-right font-bold text-lg">
|
||||
{{ formatCurrency($totalBayaranBakiHargaJualan) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Footer / Notices -->
|
||||
<footer class="pt-6 border-t border-gray-300 text-center text-xs text-gray-500">
|
||||
<p>Ini ialah penyata akaun yang dijana secara automatik. Sila hubungi kami untuk sebarang percanggahan</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<!-- Print Button (non-functional in this environment, but useful in a real app) -->
|
||||
<div class="no-print max-w-4xl mx-auto mt-4 text-center">
|
||||
<button onclick="window.print()"
|
||||
class="px-6 py-2 bg-indigo-600 text-white font-semibold rounded-lg shadow-md hover:bg-indigo-700 transition duration-150">
|
||||
<svg class="w-4 h-4 inline-block mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2z">
|
||||
</path>
|
||||
</svg>
|
||||
Print Statement
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -163,6 +163,16 @@
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
@php
|
||||
$reportNames = [
|
||||
'arrahnpay' => 'Laporan Ansuran Pembiayaan (Arrahn Pay)',
|
||||
'kaunter' => 'Laporan Ansuran Pembiayaan (Kaunter aros)',
|
||||
'all' => 'Laporan Ansuran Pembiayaan Semua'
|
||||
];
|
||||
|
||||
$displayJenisLaporan = $reportNames[$jenisLaporan] ?? 'Laporan Tidak Diketahui';
|
||||
@endphp
|
||||
|
||||
<table id="scan">
|
||||
<tr>
|
||||
@@ -171,10 +181,10 @@
|
||||
@endphp
|
||||
|
||||
@if(Str::contains($api_url, 'apiv3.arrahn'))
|
||||
<th colspan="5"><b>LAPORAN ANSURAN PEMBIAYAAN (arOSv3)</b></th>
|
||||
<th colspan="5"><b>{{ $displayJenisLaporan }} (arOSv3)</b></th>
|
||||
@else
|
||||
<th> </th>
|
||||
<th colspan ="5"><b>LAPORAN ANSURAN PEMBIAYAAN</b></thh>
|
||||
<th colspan ="5"><b>{{ $displayJenisLaporan }}</b></thh>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -233,6 +243,8 @@
|
||||
$totalbulansama = 0;
|
||||
@endphp
|
||||
@foreach($tebus as $index=>$item)
|
||||
{{-- @foreach($tebus as $index=>$item)
|
||||
@continue($item['teller'] === 'Online') --}}
|
||||
@php
|
||||
$tarikh_tebus = new DateTime($item['tarikh_bayaran']);
|
||||
$tarikh_gadai = new DateTime($item['t_gadai']);
|
||||
@@ -384,4 +396,13 @@
|
||||
<td colspan="2"><B>DI SAHKAN </B></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
<script>
|
||||
function filterLaporan(jenis) {
|
||||
// Dapatkan tarikh mula dan hingga jika ada dalam form
|
||||
const mula = '{{ $mula_date }}';
|
||||
const hingga = '{{ $hingga_date }}';
|
||||
window.location.href = `?jenis=${jenis}&mula=${mula}&hingga=${hingga}`;
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,339 @@
|
||||
<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;
|
||||
}
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
@media print {
|
||||
.new-page {
|
||||
page-break-before: always;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<table id="header">
|
||||
<tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:20px;font-weight:bold;">{{ $cawangan_detail['namacaw'] }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table id="scan">
|
||||
<tr>
|
||||
@php
|
||||
$api_url = request()->hostname;
|
||||
@endphp
|
||||
|
||||
@if(Str::contains($api_url, 'apiv3.arrahn'))
|
||||
<th colspan ="5"><b>LAPORAN BARANG KES(arOSv3)</b></th>
|
||||
@else
|
||||
<th colspan ="5"><b>LAPORAN BARANG KES</b></th>
|
||||
@endif
|
||||
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="5"><b> TARIKH CETAK:</b>
|
||||
@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
|
||||
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||
echo($formattedweddingdate);
|
||||
@endphp
|
||||
</th>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width:20px"> <b>TARIKH:</b></th>
|
||||
<th>@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $mula_date);
|
||||
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||
echo($formattedweddingdate);
|
||||
@endphp</th>
|
||||
<th style="width:20px"> <b>HINGGA:</b></th>
|
||||
<th>@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $hingga_date);
|
||||
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||
echo($formattedweddingdate);
|
||||
@endphp</th>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
{{-- <table id="details">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Tarikh</th>
|
||||
<th>IC Pelanggan</th>
|
||||
<th>Nama Pelanggan</th>
|
||||
<th>Norujukan</th>
|
||||
<th>Alasan</th>
|
||||
<th>Nilai Marhun(RM)</th>
|
||||
<th>Pembiayaan</th>
|
||||
<th>Sebulan</th>
|
||||
<th>Jumlah</th>
|
||||
<th>Margin</th>
|
||||
</tr>
|
||||
@foreach($polis as $index=>$sh)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration}}</td>
|
||||
<td> {{ $sh['tarikh'] }}</td>
|
||||
<td> {{ $sh['nokp'] }}</td>
|
||||
@php
|
||||
$noic = Http::withOptions(['verify' => config('app.api_verify')])->get($hostname . '/api/customers/' .$sh['nokp'] )->json();
|
||||
@endphp
|
||||
<td> {{ $noic['nama'] }} </td>
|
||||
<td> {{ $sh['norujukan'] }}</td>
|
||||
<td> {{ $sh['komen1'] }}</td>
|
||||
<td>{{ number_format($item['nilaimarhun'],2) }}</td>
|
||||
<td>{{ number_format($item['pinjaman'],2) }}</td>
|
||||
|
||||
@php
|
||||
$koddaerah = Http::withOptions(['verify' => config('app.api_verify')])->get($hostname . '/api/daerah/' .$sh['koddaerah'] )->json();
|
||||
$kodnegeri = Http::withOptions(['verify' => config('app.api_verify')])->get($hostname . '/api/negeri/' .$sh['kodnegeri'] )->json();
|
||||
@endphp
|
||||
<td> {{ $koddaerah['namadaerah'] }}</td>
|
||||
<td> {{ $kodnegeri['negeri'] }}</td>
|
||||
<td> {{ $sh['sttebus'] }}</td>
|
||||
<td> {{ $sh['t_update'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table> --}}
|
||||
{{-- <table id="details">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Tarikh</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>Nota</th>
|
||||
<th>Pembiayaan (RM)</th>
|
||||
<th>Nilai Marhun (RM)</th>
|
||||
<th>JBG</th>
|
||||
<th>Untung (RM)</th>
|
||||
<th>1% (RM)</th>
|
||||
<th>Caj Lain (RM)</th>
|
||||
</tr>
|
||||
|
||||
@foreach($palsu as $index => $item)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $item['tarikh'] }}</td>
|
||||
<td>{{ $item['norujukan'] }}</td>
|
||||
<td>{{ $item['nota'] }}</td>
|
||||
<td>{{ number_format($item['pembiayaan'], 2) }}</td>
|
||||
<td>{{ number_format($item['nilaimarhun'], 2) }}</td>
|
||||
<td>{{ number_format($item['jbg'], 2) }}</td>
|
||||
<td>{{ number_format($item['untung'], 2) }}</td>
|
||||
<td>{{ number_format($item['untungonepercent'], 2) }}</td>
|
||||
<td>{{ number_format($item['untungcajlain'], 2) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table> --}}
|
||||
<table id="details">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Tarikh</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>Nota</th>
|
||||
<th>Pembiayaan (RM)</th>
|
||||
<th>Nilai Marhun (RM)</th>
|
||||
<th>JBG</th>
|
||||
<th>Untung (RM)</th>
|
||||
<th>1% (RM)</th>
|
||||
<th>Caj Lain (RM)</th>
|
||||
</tr>
|
||||
@php $bil = 1; @endphp
|
||||
|
||||
@foreach($palsu as $item)
|
||||
<tr>
|
||||
<td>{{ $bil++ }}</td>
|
||||
<td>{{ $item['tarikh'] }}</td>
|
||||
<td>{{ $item['norujukan'] }}</td>
|
||||
<td>{{ $item['nota'] }}</td>
|
||||
<td>{{ number_format($item['pembiayaan'], 2) }}</td>
|
||||
<td>{{ number_format($item['nilaimarhun'], 2) }}</td>
|
||||
<td>{{ number_format($item['jbg'], 2) }}</td>
|
||||
<td>{{ number_format($item['untung'], 2) }}</td>
|
||||
<td>{{ number_format($item['untungonepercent'], 2) }}</td>
|
||||
<td>{{ number_format($item['untungcajlain'], 2) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</table>
|
||||
|
||||
<br><br>
|
||||
|
||||
<br>
|
||||
<br><br><br>
|
||||
<table id="sign">
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="2"> .................................................................. </td>
|
||||
<td> </td>
|
||||
<td colspan="2"> .................................................................. </td>
|
||||
<td> </td>
|
||||
<td colspan="2">.................................................................. </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="2"><B> Disediakan </B> </td>
|
||||
<td></td>
|
||||
<td colspan="2"><B> Disemak </B> </td>
|
||||
<td> </td>
|
||||
<td colspan="2"><B> Disahkan </B></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,316 +1,346 @@
|
||||
<style>
|
||||
#header {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html lang="ms">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Laporan Pembiayaan & Statistik</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
#header td, #customers th {
|
||||
/* Header Table Styles */
|
||||
#header {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
padding:4px;
|
||||
font-size:10px;
|
||||
}
|
||||
#header td, #header th {
|
||||
padding: 4px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
#header tr:nth-child(even){background-color: #ffffff;}
|
||||
#header tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#header tr:hover {background-color: #ddd;}
|
||||
#header tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#header th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
#header th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding: 4px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
/* Scan Table Styles */
|
||||
#scan {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#scan td, #scan th {
|
||||
padding: 8px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#scan tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
<style>
|
||||
#scan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
#scan tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#scan td, #scan th {
|
||||
#scan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding: 4px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
padding: 8px;
|
||||
font-size:11px;
|
||||
}
|
||||
/* Details Table Styles */
|
||||
#details {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||
#details td, #details th {
|
||||
padding: 8px;
|
||||
font-size: 8px;
|
||||
}
|
||||
|
||||
#scan tr:hover {background-color: #ddd;}
|
||||
#details tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#scan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
#details tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#details th {
|
||||
padding-top: 12px;
|
||||
font-weight: bold;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding: 4px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
<style>
|
||||
#scan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
/* Sign Table Styles */
|
||||
#sign {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#scan td, #scan th {
|
||||
border-collapse: collapse;
|
||||
padding: 8px;
|
||||
font-size:11px;
|
||||
}
|
||||
#sign td, #sign th {
|
||||
padding: 8px;
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||
#sign tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#scan tr:hover {background-color: #ddd;}
|
||||
#sign 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;
|
||||
}
|
||||
|
||||
#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>
|
||||
#sign th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding: 4px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
/* Statistics Table Styles */
|
||||
#statistik {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
#statistik th, #statistik td {
|
||||
border: 1px solid #ddd;
|
||||
padding: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#statistik th {
|
||||
background-color: #f2f2f2;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.header-row {
|
||||
background-color: #e0e0e0;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.bangsa { background-color: #fce4ec; }
|
||||
.pekerjaan { background-color: #e8f5e9; }
|
||||
.nilai { background-color: #e1f5fe; }
|
||||
.pembiayaan-col { background-color: #ffe4d9; }
|
||||
.jenis { background-color: #e8eaf6; }
|
||||
|
||||
.page-break {
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
margin: 30px 0 20px 0;
|
||||
padding: 10px;
|
||||
background-color: #f0f0f0;
|
||||
border-left: 5px solid #333;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- SECTION 1: LAPORAN PEMBIAYAAN -->
|
||||
<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> --}}
|
||||
<tr>
|
||||
<td style="font-size:20px;font-weight:bold;">{{ $cawangan_detail['namacaw'] }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table id="scan">
|
||||
<tr>
|
||||
<tr>
|
||||
@php
|
||||
$api_url = request()->hostname;
|
||||
@endphp
|
||||
@endphp
|
||||
|
||||
@if(Str::contains($api_url, 'apiv3.arrahn'))
|
||||
<th colspan="5"><b>LAPORAN PEMBIAYAAN (arOSv3)</b></th>
|
||||
@else
|
||||
<th colspan="5"><b>LAPORAN PEMBIAYAAN</b></th>
|
||||
@endif
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th>
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:100px"><b> Tarikh Mula: </b></td>
|
||||
<td style="text-align:left;"> @php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_mula);
|
||||
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||
echo($formattedweddingdate)
|
||||
@endphp</td>
|
||||
<td style="width:100px"><b> Tarikh Hingga: </b></td>
|
||||
<td style="text-align:left;"> @php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_akhir);
|
||||
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||
echo($formattedweddingdate)
|
||||
@endphp</td>
|
||||
<td style="width:100px"> <b>Tarikh Cetak: </b></td>
|
||||
<td style="text-align:left;">@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
|
||||
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||
echo($formattedweddingdate)
|
||||
@endphp</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="width:50px">
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
@if(Str::contains($api_url, 'api_arrahnv3.test'))
|
||||
<th colspan="5"><b>LAPORAN PEMBIAYAAN (arOSv3)</b></th>
|
||||
@else
|
||||
<th colspan="5"><b>LAPORAN PEMBIAYAAN</b></th>
|
||||
@endif
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:100px"><b> Tarikh Mula: </b></td>
|
||||
<td style="text-align:left;">
|
||||
@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_mula);
|
||||
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||
echo($formattedweddingdate)
|
||||
@endphp
|
||||
</td>
|
||||
<td style="width:100px"><b> Tarikh Hingga: </b></td>
|
||||
<td style="text-align:left;">
|
||||
@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_akhir);
|
||||
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||
echo($formattedweddingdate)
|
||||
@endphp
|
||||
</td>
|
||||
<td style="width:100px"> <b>Tarikh Cetak: </b></td>
|
||||
<td style="text-align:left;">
|
||||
@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
|
||||
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||
echo($formattedweddingdate)
|
||||
@endphp
|
||||
</td>
|
||||
</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>Bil</th>
|
||||
<th>Norujukan</th>
|
||||
<th>Nama</th>
|
||||
<th>Alamat</th>
|
||||
<th>Tarikh Pembiayaan</th>
|
||||
<th>No K/P</th>
|
||||
<th>Masa</th>
|
||||
<th>Berat</th>
|
||||
<th>N Marhun</th>
|
||||
<th>Pembiayaan</th>
|
||||
<th>Caj-caj Lain</th>
|
||||
<th>Keuntungan 1%</th>
|
||||
<th>Keuntungan</th>
|
||||
<th>Peratus (%)</th>
|
||||
</tr>
|
||||
@php
|
||||
$counter = 1;
|
||||
$totalpinjaman = 0;
|
||||
$totalberat = 0;
|
||||
$totalnm = 0;
|
||||
$totalupah = 0;
|
||||
$bil = 0;
|
||||
$full_total_ujrah = 0;
|
||||
$full_total_onepercent = 0;
|
||||
@endphp
|
||||
@foreach($gadai as $index=>$item)
|
||||
@php
|
||||
$ujrah = isset($item['ujrah']) ? $item['ujrah'] : 0;
|
||||
$onepercent = isset($item['onepercent']) ? $item['onepercent'] : 0;
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Norujukan</th>
|
||||
<th>Nama</th>
|
||||
<th>Alamat</th>
|
||||
<th>Tarikh Pembiayaan</th>
|
||||
<th>No K/P</th>
|
||||
<th>Masa</th>
|
||||
<th>Berat</th>
|
||||
<th>N Marhun</th>
|
||||
<th>Pembiayaan</th>
|
||||
<th>Lain-Lain Caj</th>
|
||||
<th>Keuntungan 1%</th>
|
||||
<th>Keuntungan</th>
|
||||
<th>Peratus (%)</th>
|
||||
</tr>
|
||||
@php
|
||||
$counter = 1;
|
||||
$totalpinjaman = 0;
|
||||
$totalberat = 0;
|
||||
$totalnm = 0;
|
||||
$totalupah = 0;
|
||||
$bil = 0;
|
||||
$full_total_ujrah = 0;
|
||||
$full_total_onepercent = 0;
|
||||
@endphp
|
||||
@foreach($gadai as $index=>$item)
|
||||
@php
|
||||
$ujrah = isset($item['ujrah']) ? $item['ujrah'] : 0;
|
||||
$onepercent = isset($item['onepercent']) ? $item['onepercent'] : 0;
|
||||
|
||||
$totalpinjaman += $item['pinjaman'];
|
||||
$totalberat += $item['berat'];
|
||||
$totalnm += $item['nilaimarhun'];
|
||||
$totalupah += $item['upah12'];
|
||||
$full_total_ujrah += $ujrah * 12;
|
||||
$full_total_onepercent += $onepercent * 12;
|
||||
@endphp
|
||||
@if($index > 0)
|
||||
@if($item['teller'] != $gadai[$index - 1]['teller'])
|
||||
$totalpinjaman += $item['pinjaman'];
|
||||
$totalberat += $item['berat'];
|
||||
$totalnm += $item['nilaimarhun'];
|
||||
$totalupah += $item['upah12'];
|
||||
$full_total_ujrah += $ujrah * 12;
|
||||
$full_total_onepercent += $onepercent * 12;
|
||||
@endphp
|
||||
@if($index > 0)
|
||||
@if($item['teller'] != $gadai[$index - 1]['teller'])
|
||||
<tr>
|
||||
<td colspan=10>Teller : <b>{{ $item['teller'] }}</b></td>
|
||||
</tr>
|
||||
@php
|
||||
$totalpinjamanteller = 0;
|
||||
$totalnmteller = 0;
|
||||
$totalberatteller = 0;
|
||||
$totalujrah = 0;
|
||||
$totalonepercent = 0;
|
||||
@endphp
|
||||
@endif
|
||||
@else
|
||||
<tr>
|
||||
<td colspan=10>Teller : <b>{{ $item['teller'] }}</b></td>
|
||||
</tr>
|
||||
@php
|
||||
@php
|
||||
$totalpinjamanteller = 0;
|
||||
$totalnmteller = 0;
|
||||
$totalberatteller = 0;
|
||||
$totalupah12 = 0;
|
||||
$totalujrah = 0;
|
||||
$totalonepercent = 0;
|
||||
$totalonepercent= 0;
|
||||
@endphp
|
||||
@endif
|
||||
@else
|
||||
<tr>
|
||||
<td colspan=10>Teller : <b>{{ $item['teller'] }}</b></td>
|
||||
<td>{{ $counter }}</td>
|
||||
<td style="width:100px">{{$item['norujukan']}}</td>
|
||||
<td>{{ $item['nama'] }}</td>
|
||||
<td>{{ $item['alamat1'] }}</td>
|
||||
<td>{{ $item['t_gadai'] }}</td>
|
||||
<td>{{ $item['nokp'] }}</td>
|
||||
<td>{{ $item['masa'] }}</td>
|
||||
<td>{{ number_format($item['berat'],2) }}</td>
|
||||
<td>{{ number_format($item['nilaimarhun'],2) }}</td>
|
||||
<td>{{ number_format($item['pinjaman'],2) }}</td>
|
||||
<td>{{ number_format($ujrah*12,2) }}</td>
|
||||
<td>{{ number_format($onepercent*12,2) }}</td>
|
||||
<td>{{ number_format($item['upah12'],2) }}</td>
|
||||
<td>{{ $item['percentpinj'] }}</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@php
|
||||
$totalpinjamanteller = 0;
|
||||
$totalnmteller = 0;
|
||||
$totalberatteller = 0;
|
||||
$totalupah12 = 0;
|
||||
$totalujrah = 0;
|
||||
$totalonepercent= 0;
|
||||
$totalpinjamanteller += $item['pinjaman'];
|
||||
$totalnmteller += $item['nilaimarhun'];
|
||||
$totalberatteller += $item['berat'];
|
||||
$totalupah12 += $item['upah12'];
|
||||
$totalujrah += $ujrah*12;
|
||||
$totalonepercent += $onepercent*12;
|
||||
@endphp
|
||||
|
||||
@endif
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td style="width:100px">{{$item['norujukan']}}</td>
|
||||
<td>
|
||||
{{ $item['nama'] }}
|
||||
</td>
|
||||
<td>{{ $item['alamat1'] }}</td>
|
||||
<td>{{ $item['t_gadai'] }}</td>
|
||||
<td>{{ $item['nokp'] }}</td>
|
||||
<td>{{ $item['masa'] }}</td>
|
||||
<td>{{ number_format($item['berat'],2) }}</td>
|
||||
<td>{{ number_format($item['nilaimarhun'],2) }}</td>
|
||||
<td>{{ number_format($item['pinjaman'],2) }}</td>
|
||||
<td>{{ number_format($ujrah*12,2) }}</td>
|
||||
<td>{{ number_format($onepercent*12,2) }}</td>
|
||||
<td>{{ number_format($item['upah12'],2) }}</td>
|
||||
<td>{{ $item['percentpinj'] }}</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@php
|
||||
$totalpinjamanteller += $item['pinjaman'];
|
||||
$totalnmteller += $item['nilaimarhun'];
|
||||
$totalberatteller += $item['berat'];
|
||||
$totalupah12 += $item['upah12'];
|
||||
$totalujrah += $ujrah*12;
|
||||
$totalonepercent += $onepercent*12;
|
||||
@endphp
|
||||
@if($index+1 < sizeof($gadai))
|
||||
@if($item['teller'] != $gadai[$index + 1]['teller'])
|
||||
@php if($item['teller'] != '')$bil += ($counter-1); @endphp
|
||||
@if($index+1 < sizeof($gadai))
|
||||
@if($item['teller'] != $gadai[$index + 1]['teller'])
|
||||
@php if($item['teller'] != '')$bil += ($counter-1); @endphp
|
||||
<tr>
|
||||
<td colspan="7"><b>{{ $counter-1 }}</b> Jumlah surat bagi teller : <b>{{ $item['teller'] }}</b></td>
|
||||
<td><b>{{ number_format($totalberatteller,2) }} </b></td>
|
||||
<td><b>{{ number_format($totalnmteller,2) }} </b></td>
|
||||
<td><b>{{ number_format($totalpinjamanteller,2) }} </b></td>
|
||||
<td><b>{{ number_format($totalujrah,2) }}</b></td>
|
||||
<td><b>{{ number_format($totalonepercent,2) }}</b></td>
|
||||
<td><b>{{ number_format($totalupah12,2) }} </b></td>
|
||||
</tr>
|
||||
@php
|
||||
$counter = 1;
|
||||
$totalupah12 = 0;
|
||||
$totalpinjamanteller = 0;
|
||||
$totalnmteller = 0;
|
||||
$totalujrah = 0;
|
||||
$totalonepercent = 0;
|
||||
@endphp
|
||||
@endif
|
||||
@else
|
||||
@php $bil += ($counter-1); @endphp
|
||||
<tr>
|
||||
<td colspan="7"><b>{{ $counter-1 }}</b> Jumlah surat bagi teller : <b>{{ $item['teller'] }}</b></td>
|
||||
<td><b>{{ number_format($totalberatteller,2) }} </b></td>
|
||||
@@ -319,77 +349,180 @@
|
||||
<td><b>{{ number_format($totalujrah,2) }}</b></td>
|
||||
<td><b>{{ number_format($totalonepercent,2) }}</b></td>
|
||||
<td><b>{{ number_format($totalupah12,2) }} </b></td>
|
||||
|
||||
</tr>
|
||||
@php
|
||||
$counter = 1;
|
||||
$totalupah12 = 0;
|
||||
$totalpinjamanteller = 0;
|
||||
$totalnmteller = 0;
|
||||
$totalujrah = 0;
|
||||
$totalonepercent = 0;
|
||||
@endphp
|
||||
@endif
|
||||
@else
|
||||
@php $bil += ($counter-1); @endphp
|
||||
<tr>
|
||||
<td colspan="7"><b>{{ $counter-1 }}</b> Jumlah surat bagi teller : <b>{{ $item['teller'] }}</b></td>
|
||||
<td><b>{{ number_format($totalberatteller,2) }} </b></td>
|
||||
<td><b>{{ number_format($totalnmteller,2) }} </b></td>
|
||||
<td><b>{{ number_format($totalpinjamanteller,2) }} </b></td>
|
||||
<td><b>{{ number_format($totalujrah,2) }}</b></td>
|
||||
<td><b>{{ number_format($totalonepercent,2) }}</b></td>
|
||||
<td><b>{{ number_format($totalupah12,2) }} </b></td>
|
||||
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
<br><br>
|
||||
<table id="details" style="border-top:1px solid black;border-bottom:1px solid black;text-align:center;">
|
||||
<tr>
|
||||
<th colspan="9" style="text-align: center;"><b>JUMLAH BILANGAN = {{ $bil }}</b></th>
|
||||
<th style="text-align:center;">Berat (g/m)</th>
|
||||
<th style="text-align:center;">Nilai Marhun (RM)</th>
|
||||
<th style="text-align:center;">Pembiayaan (RM)</th>
|
||||
<th style="text-align:center;">Caj-caj Lain (RM)</th>
|
||||
<th style="text-align:center;">Keuntungan 1% (RM)</th>
|
||||
<th style="text-align:center;">Keuntungan (RM)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9" style="text-align: center;"><b>JUMLAH KESELURUHAN</b></td>
|
||||
<td>{{ number_format($totalberat,2) }}</td>
|
||||
<td>{{ number_format($totalnm,2) }}</td>
|
||||
<td>{{ number_format($totalpinjaman,2) }}</td>
|
||||
<td>{{ number_format($full_total_ujrah,2) }}</td>
|
||||
<td>{{ number_format($full_total_onepercent,2) }}</td>
|
||||
<td>{{ number_format($totalupah,2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="9" style="text-align: center;"><b>JUMLAH BILANGAN = {{ $bil }}</b></th>
|
||||
<th style="text-align:center;">Berat (g/m)</th>
|
||||
<th style="text-align:center;">Nilai Marhun (RM)</th>
|
||||
<th style="text-align:center;">Pembiayaan (RM)</th>
|
||||
<th style="text-align:center;">Caj-caj Lain (RM)</th>
|
||||
<th style="text-align:center;">Keuntungan 1% (RM)</th>
|
||||
<th style="text-align:center;">Keuntungan (RM)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9" style="text-align: center;"><b>JUMLAH KESELURUHAN</b></td>
|
||||
<td>{{ number_format($totalberat,2) }}</td>
|
||||
<td>{{ number_format($totalnm,2) }}</td>
|
||||
<td>{{ number_format($totalpinjaman,2) }}</td>
|
||||
<td>{{ number_format($full_total_ujrah,2) }}</td>
|
||||
<td>{{ number_format($full_total_onepercent,2) }}</td>
|
||||
<td>{{ number_format($totalupah,2) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{{-- <h5 style="float:right;">JUMLAH KESELURUHAN GADAIAN : RM {{ number_format($totalpinjaman,2) }}</h5> --}}
|
||||
|
||||
<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>
|
||||
<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>
|
||||
|
||||
|
||||
<!-- PAGE BREAK FOR PRINT -->
|
||||
<div class="page-break"></div>
|
||||
|
||||
<!-- SECTION 2: STATISTIK JENIS -->
|
||||
<div class="section-title">STATISTIK JENIS PEMBIAYAAN</div>
|
||||
|
||||
<table id="statistik" class="min-w-full border border-gray-300">
|
||||
<thead>
|
||||
<tr class="header-row bg-gray-100 text-center">
|
||||
<th colspan="2">Bangsa</th>
|
||||
<th colspan="2">Pekerjaan</th>
|
||||
<th colspan="2">Nilai Marhun</th>
|
||||
<th colspan="2">Pembiayaan</th>
|
||||
<th colspan="2">Pembiayaan Margin</th>
|
||||
<th colspan="2">Jenis Pembiayaan</th>
|
||||
</tr>
|
||||
<tr class="bg-gray-50 text-center text-sm">
|
||||
<th>Jenis</th>
|
||||
<th>Bil</th>
|
||||
<th>Jenis</th>
|
||||
<th>Bil</th>
|
||||
<th>RM</th>
|
||||
<th>Bil</th>
|
||||
<th>RM</th>
|
||||
<th>Bil</th>
|
||||
<th>%</th>
|
||||
<th>Bil</th>
|
||||
<th>Jenis</th>
|
||||
<th>Bil</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody class="text-sm text-center">
|
||||
@php
|
||||
// Get all arrays from statistik
|
||||
$bangsaData = $statistik['reportCustomerRace'];
|
||||
$pekerjaanData = $statistik['reportCustomerJob'];
|
||||
$marhunData = $statistik['reportMarhunValue'];
|
||||
$pembiayaanData = $statistik['reportLoanAmount'];
|
||||
$marginData = $statistik['reportMarhunMargin'];
|
||||
$jenisPembiayaanData = $statistik['reportPembiayaan'];
|
||||
|
||||
// Get maximum rows needed
|
||||
$maxRows = max(
|
||||
count($bangsaData),
|
||||
count($pekerjaanData),
|
||||
count($marhunData),
|
||||
count($pembiayaanData),
|
||||
count($marginData),
|
||||
count($jenisPembiayaanData)
|
||||
);
|
||||
|
||||
// Convert to indexed arrays (preserving order)
|
||||
$bangsaKeys = array_keys($bangsaData);
|
||||
$bangsa = array_values($bangsaData);
|
||||
|
||||
$pekerjaanKeys = array_keys($pekerjaanData);
|
||||
$pekerjaan = array_values($pekerjaanData);
|
||||
|
||||
$marhunKeys = array_keys($marhunData);
|
||||
$marhun = array_values($marhunData);
|
||||
|
||||
$pembiayaanKeys = array_keys($pembiayaanData);
|
||||
$pembiayaan = array_values($pembiayaanData);
|
||||
|
||||
$marginKeys = array_keys($marginData);
|
||||
$margin = array_values($marginData);
|
||||
|
||||
$jenisPembiayaanKeys = array_keys($jenisPembiayaanData);
|
||||
$jenisPembiayaan = array_values($jenisPembiayaanData);
|
||||
|
||||
// Labels for jenis pembiayaan
|
||||
$jenisLabels = [
|
||||
'pembiayaanbaru' => 'Pembiayaan Baru',
|
||||
'pembiayaansemula' => 'Pembiayaan Semula',
|
||||
'lelongan' => 'Lelongan'
|
||||
];
|
||||
|
||||
// Check if there's any data at all
|
||||
$hasAnyData = count($bangsaData) > 0 || count($pekerjaanData) > 0 ||
|
||||
count($marhunData) > 0 || count($pembiayaanData) > 0 ||
|
||||
count($marginData) > 0 || count($jenisPembiayaanData) > 0;
|
||||
@endphp
|
||||
|
||||
@if($hasAnyData)
|
||||
@for($i = 0; $i < $maxRows; $i++)
|
||||
<tr>
|
||||
{{-- Bangsa: Nama | Jumlah --}}
|
||||
<td>{{ $bangsaKeys[$i] ?? '-' }}</td>
|
||||
<td>{{ $bangsa[$i] ?? '-' }}</td>
|
||||
|
||||
{{-- Pekerjaan: Jenis | Jumlah --}}
|
||||
<td>{{ $pekerjaanKeys[$i] ?? '-' }}</td>
|
||||
<td>{{ $pekerjaan[$i] ?? '-' }}</td>
|
||||
|
||||
{{-- Nilai Marhun: RM | Berat (g) --}}
|
||||
<td>{{ $marhunKeys[$i] ?? '-' }}</td>
|
||||
<td>{{ isset($marhun[$i]) ? number_format($marhun[$i]) : '-' }}</td>
|
||||
|
||||
{{-- Pembiayaan: RM | Bil --}}
|
||||
<td>{{ $pembiayaanKeys[$i] ?? '-' }}</td>
|
||||
<td>{{ isset($pembiayaan[$i]) ? number_format($pembiayaan[$i]) : '-' }}</td>
|
||||
|
||||
{{-- Pembiayaan Margin: RM | % --}}
|
||||
<td>{{ $marginKeys[$i] ?? '-' }}</td>
|
||||
<td>{{ isset($margin[$i]) ? number_format($margin[$i]) : '-' }}</td>
|
||||
|
||||
{{-- Jenis Pembiayaan: Jenis | Bil --}}
|
||||
<td>
|
||||
@if(isset($jenisPembiayaanKeys[$i]))
|
||||
{{ $jenisLabels[$jenisPembiayaanKeys[$i]] ?? ucfirst($jenisPembiayaanKeys[$i]) }}
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $jenisPembiayaan[$i] ?? '-' }}</td>
|
||||
</tr>
|
||||
@endfor
|
||||
@else
|
||||
{{-- Show "Not Available" if no data at all --}}
|
||||
<tr>
|
||||
<td colspan="12" style="text-align: center; color: #999; font-style: italic;">
|
||||
Not Available
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -164,7 +164,7 @@
|
||||
<table id="scan">
|
||||
<tr>
|
||||
@php
|
||||
$api_url = request()->hostname;
|
||||
$api_url = $api_url;
|
||||
@endphp
|
||||
|
||||
@if(Str::contains($api_url, 'apiv3.arrahn'))
|
||||
@@ -227,7 +227,7 @@
|
||||
@foreach($tuntutbaki as $index=>$item)
|
||||
@php $totaljumlah += $item['jumlah'] @endphp
|
||||
@if($index > 0)
|
||||
@if($item['teller'] != $tuntutbaki[$index - 1]['teller'])
|
||||
@if($item['teller'] != ($tuntutbaki[$index - 1]['teller'] ?? null))
|
||||
<tr>
|
||||
<td colspan=10>Teller : <b>{{ $item['teller'] }}</b></td>
|
||||
</tr>
|
||||
@@ -240,17 +240,20 @@
|
||||
@php $totalpinjamanteller = 0;$totalcajlelong = 0; @endphp
|
||||
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td style="width:100px">
|
||||
@php
|
||||
|
||||
$gadaidetail = Http::get($api_url . '/api/gadai/norujukan/' . $item['norujukan'])->json();
|
||||
$customer_detail = Http::get($api_url . '/api/customers/' . $gadaidetail[0][0]['nokp'])->json();
|
||||
//// $gadaidetail = Http::get($api_url . '/api/gadai/norujukan/' . $item['norujukan'])->json(); - code asal
|
||||
//// $gadaidetail = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/gadai/norujukankodcaw/' . $item['kodcaw'] . '/' . $item['norujukan'])->json();
|
||||
$gadaidetail = Http::get($api_url . '/api/gadai/norujukan/' . $item['kodcaw'] . '/' . $item['norujukan'])->json();
|
||||
$customer_detail = Http::get($api_url . '/api/customers/' . $gadaidetail[0]['nokp'])->json();
|
||||
echo $customer_detail['nama'];
|
||||
@endphp
|
||||
|
||||
</td>
|
||||
<td style="width:100px">{{$gadaidetail[0][0]['nokp']}}</td>
|
||||
<td style="width:100px">{{$gadaidetail[0]['nokp']}}</td>
|
||||
<td style="width:100px">{{$item['norujukan']}}</td>
|
||||
<td>{{ $item['tarikh'] }}</td>
|
||||
<td>{{ $item['cajlelong'] }}</td>
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="bg-gray-900 opacity-50 hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
|
||||
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
|
||||
<main>
|
||||
|
||||
<div class="pt-6 px-4">
|
||||
|
||||
<breadcrumb :items="[{ 'title' : 'Pelanggan', 'icon' : 'fas fa-users' },{ 'title' : 'Barangkes', 'icon' : 'fas fa-box' }]"></breadcrumb>
|
||||
|
||||
<searchbarangkes-component kodcaw="{{ Auth::user()->cawangan }}"></searchbarangkes-component>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,7 @@
|
||||
<div>
|
||||
<button type="button"
|
||||
onclick="window.location.href='{{ route('simulate.generate') }}'"
|
||||
class="bg-yellow-500 p-4 rounded text-white mr-4">
|
||||
Jana Simulasi
|
||||
</button>
|
||||
</div>
|
||||
@@ -0,0 +1,15 @@
|
||||
{{-- <div class="bg-white p-6 shadow rounded-lg">
|
||||
<button type="button"
|
||||
onclick="window.location.href='{{ route('simulate.list') }}'"
|
||||
class="focus:outline-none text-white bg-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300 font-medium rounded-lg text-sm px-5 py-2.5 me-2 mb-2 dark:focus:ring-yellow-900">
|
||||
Senarai Simulasi
|
||||
</button>
|
||||
</div> --}}
|
||||
|
||||
<div>
|
||||
<button type="button"
|
||||
onclick="window.location.href='{{ route('simulate.list') }}'"
|
||||
class="bg-yellow-500 p-4 rounded text-white">
|
||||
Senarai Simulasi
|
||||
</button>
|
||||
</div>
|
||||
@@ -48,6 +48,7 @@
|
||||
<th>Baki Pembiayaan (RM)</th>
|
||||
<th>Keuntungan (RM)</th>
|
||||
<th>Caj Lelong (RM)</th>
|
||||
<th>Harga Asas (RM)</th>
|
||||
<th>Harga Jual (RM)</th>
|
||||
<th>Baki(RM)</th>
|
||||
</tr>
|
||||
@@ -68,6 +69,7 @@
|
||||
<td>{{ $lelongan_detail['bakipjm'] }}</td>
|
||||
<td>{{ $lelongan_detail['keuntungan'] }}</td>
|
||||
<td>{{ $lelongan_detail['cajlelong'] }}</td>
|
||||
<td>{{ $lelongan_detail['hargaasas'] }}</td>
|
||||
<td>{{ $lelongan_detail['hargajual'] }}</td>
|
||||
<td>{{ $lelongan_detail['baki'] }}</td>
|
||||
|
||||
@@ -87,6 +89,7 @@
|
||||
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_bakipjm'] }}</td>
|
||||
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_keuntungan'] }}</td>
|
||||
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_cajlelong'] }}</td>
|
||||
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_hargaasas'] }}</td>
|
||||
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_hargajual'] }}</td>
|
||||
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_baki'] }}</td>
|
||||
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
<table border="1" cellspacing="0" cellpadding="3">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="14" style="text-align: center; font-weight: bold; font-size: 16px;">
|
||||
SENARAI LELONGAN KESELURUHAN
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="14" style="text-align: center;">
|
||||
Cawangan: {{ $cawangan_detail['nama'] ?? '-' }} |
|
||||
Tarikh: {{ $query['startDate'] ?? '-' }} hingga {{ $query['endDate'] ?? '-' }}
|
||||
</th>
|
||||
</tr>
|
||||
<tr><td colspan="14"> </td></tr>
|
||||
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>Nama</th>
|
||||
<th>No KP</th>
|
||||
<th>Marhun</th>
|
||||
<th>Berat</th>
|
||||
<th>Nilai Marhun (RM)</th>
|
||||
<th>Pembiayaan (RM)</th>
|
||||
<th>%</th>
|
||||
<th>Baki Pembiayaan (RM)</th>
|
||||
<th>Keuntungan (RM)</th>
|
||||
<th>Caj Lelong (RM)</th>
|
||||
<th>Harga Asas (RM)</th>
|
||||
<th>Harga Jual (RM)</th>
|
||||
<th>Baki (RM)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$total_berat = 0;
|
||||
$total_nilaimarhun = 0;
|
||||
$total_pinjaman = 0;
|
||||
$total_hargajual = 0;
|
||||
$total_keuntungan = 0;
|
||||
$total_cajlelong = 0;
|
||||
$total_baki = 0;
|
||||
$total_hargaasas = 0;
|
||||
$row_no = 1;
|
||||
@endphp
|
||||
|
||||
@foreach ($lelongan_data as $item)
|
||||
@php
|
||||
$total_berat += (float) $item['berat'];
|
||||
$total_nilaimarhun += (float) $item['nilai_marhun'];
|
||||
$total_pinjaman += (float) $item['pinjaman'];
|
||||
$total_hargajual += (float) $item['hargajual'];
|
||||
$total_keuntungan += (float) ($item['keuntungan'] ?? 0);
|
||||
$total_cajlelong += (float) ($item['cajlelong'] ?? 0);
|
||||
$total_baki += (float) ($item['baki'] ?? 0);
|
||||
$total_hargaasas += (float) ($item['hargaasas'] ?? 0);
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $row_no++ }}</td>
|
||||
<td>{{ $item['no_rujukan'] ?? '' }}</td>
|
||||
<td>{{ $item['nama'] ?? '' }}</td>
|
||||
<td>'{{ $item['no_kp'] ?? '' }}</td>
|
||||
<td>{{ $item['marhun'] ?? 0 }}</td>
|
||||
<td>{{ $item['berat'] ?? 0 }}</td>
|
||||
<td>{{ $item['nilai_marhun'] ?? 0 }}</td>
|
||||
<td>{{ $item['pinjaman'] ?? 0 }}</td>
|
||||
<td>{{ $item['peratusan_margin_pinjaman'] ?? 0 }}</td>
|
||||
<td>{{ $item['bakipjm'] ?? 0 }}</td>
|
||||
<td>{{ $item['keuntungan'] ?? 0 }}</td>
|
||||
<td>{{ $item['cajlelong'] ?? 0 }}</td>
|
||||
<td>{{ $item['hargaasas'] ?? 0 }}</td>
|
||||
<td>{{ $item['hargajual'] ?? 0 }}</td>
|
||||
<td>{{ $item['baki'] ?? 0 }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
<tr>
|
||||
<td colspan="5"><strong>Jumlah</strong></td>
|
||||
<td><strong>{{ number_format($total_berat, 2) }}</strong></td>
|
||||
<td><strong>{{ number_format($total_nilaimarhun, 2) }}</strong></td>
|
||||
<td><strong>{{ number_format($total_pinjaman, 2) }}</strong></td>
|
||||
<td></td>
|
||||
<td><strong>{{ number_format($total_pinjaman, 2) }}</strong></td>
|
||||
<td><strong>{{ number_format($total_keuntungan, 2) }}</strong></td>
|
||||
<td><strong>{{ number_format($total_cajlelong, 2) }}</strong></td>
|
||||
<td><strong>{{ number_format($total_hargaasas ?? 0, 2) }}</strong></td>
|
||||
<td><strong>{{ number_format($total_hargajual, 2) }}</strong></td>
|
||||
<td><strong>{{ number_format($total_baki, 2) }}</strong></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -35,6 +35,7 @@
|
||||
<th>Baki Pembiayaan(RM)</th>
|
||||
<th>Keuntungan(RM)</th>
|
||||
<th>Caj Lelong(RM)</th>
|
||||
<th>Harga Asas(RM)</th>
|
||||
<th>Harga Jual(RM)</th>
|
||||
<th>Baki(RM)</th>
|
||||
|
||||
@@ -49,6 +50,7 @@
|
||||
<td>{{ $data['summary_lelongan_teller']['total_bakipjm'] }}</td>
|
||||
<td>{{ $data['summary_lelongan_teller']['total_keuntungan'] }}</td>
|
||||
<td>{{ $data['summary_lelongan_teller']['total_cajlelong'] }}</td>
|
||||
<td>{{ $data['summary_lelongan_teller']['total_hargaasas'] }}</td>
|
||||
<td>{{ $data['summary_lelongan_teller']['total_hargajual'] }}</td>
|
||||
<td>{{ $data['summary_lelongan_teller']['total_baki'] }}</td>
|
||||
|
||||
@@ -64,6 +66,7 @@
|
||||
<td>{{ $summary_lelongan['total_bakipjm'] }}</td>
|
||||
<td>{{ $summary_lelongan['total_keuntungan'] }}</td>
|
||||
<td>{{ $summary_lelongan['total_cajlelong'] }}</td>
|
||||
<td>{{ $summary_lelongan['total_hargaasas'] }}</td>
|
||||
<td>{{ $summary_lelongan['total_hargajual'] }}</td>
|
||||
<td>{{ $summary_lelongan['total_baki'] }}</td>
|
||||
|
||||
|
||||
@@ -104,6 +104,36 @@
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Transaksi Segera(By Masa)</h2>
|
||||
</a>
|
||||
</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">
|
||||
<a href="{{ route('reports.saringan-gadaian.index', ['startDate' => now()->toDateString(), 'endDate' => now()->toDateString()]) }}" class="">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Saringan Gadaian</h2>
|
||||
</a>
|
||||
</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">
|
||||
<a href="{{ route('reports.summary-wtd.index', ['startDate' => now()->toDateString(), 'endDate' => now()->toDateString()]) }}" class="">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Selesai WTD</h2>
|
||||
</a>
|
||||
</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">
|
||||
<a href="{{ route('reports.dataPelanggan.index', ['startDate' => now()->toDateString(), 'endDate' => now()->toDateString()]) }}" class="">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Data Pelanggan</h2>
|
||||
</a>
|
||||
</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">
|
||||
<a href="{{ route('reports.dataPelangganBycaw.index', ['startDate' => now()->toDateString(), 'endDate' => now()->toDateString()]) }}" class="">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Data Pelanggan By Cawangan</h2>
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
class="px-6 py-4 mb-2 ml-2 bg-white border border-solid rounded-lg shadow cursor-pointer hover:bg-yellow-300 hover:transition-all">
|
||||
<a href="{{ route('reports.agingtebus.index', ['startDate' => now()->toDateString(), 'endDate' => now()->toDateString()]) }}" class="">
|
||||
<h2 class="mx-auto text-2xl font-bold text-center uppercase">Keuntungan Penyelesaian Pembiayaan By Tempoh</h2>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<link href="{{ asset('css/all.min.css') }}" rel="stylesheet">
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="{{asset(mix('js/app.js')), true}}" defer></script>
|
||||
<script src="{{ asset(mix('js/app.js')), true }}" defer></script>
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="dns-prefetch" href="//fonts.gstatic.com">
|
||||
@@ -151,13 +151,15 @@
|
||||
|
||||
@auth
|
||||
<clock-component></clock-component>
|
||||
<cawangan-component roles={{ Auth::user()->roles }}
|
||||
<cawangan-component @clickEvent_="getText()" roles={{ Auth::user()->roles }}
|
||||
route={{ Route::is('home') || Route::is('akaun.home') || Route::is('audit.index') ? 'ada' : 'tiada' }}
|
||||
akaun={{ Route::is('akaun.home') || Route::is('audit.index') ? 'yes' : 'no' }}>
|
||||
akaun={{ Route::is('akaun.home') || Route::is('audit.index') ? 'yes' : 'no' }}
|
||||
>
|
||||
</cawangan-component>
|
||||
<div class="mx-auto">
|
||||
<a class="text-yellow-200 rounded bg-gray-400 px-6 py-3 font-bold mr-4 uppercase sm:invisible lg:visible xl:visible">
|
||||
{{Auth::user()->roles}} : {{Auth::user()->name}}
|
||||
<a
|
||||
class="text-yellow-200 rounded bg-gray-400 px-6 py-3 font-bold mr-4 uppercase sm:invisible lg:visible xl:visible">
|
||||
{{ Auth::user()->roles }} : {{ Auth::user()->name }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -255,6 +257,15 @@
|
||||
<script>
|
||||
let response_status = {!! json_encode(\Session::get('response_status')) !!};
|
||||
let response_message = {!! json_encode(\Session::get('response_message')) !!};
|
||||
let peti_besi_error_message = {!! json_encode(\Session::get('peti_besi_error_message')) !!};
|
||||
|
||||
if(peti_besi_error_message){
|
||||
Swal.fire({
|
||||
title: "Tiada Data",
|
||||
text: peti_besi_error_message,
|
||||
icon: "warning"
|
||||
});
|
||||
}
|
||||
|
||||
let successToastMessage = document.querySelector('#success-toast-message')
|
||||
let failToastMessage = document.querySelector('#fail-toast-message')
|
||||
|
||||
@@ -129,6 +129,18 @@
|
||||
</div>
|
||||
</li>
|
||||
</a>
|
||||
|
||||
<a href="{{ route('wtd.debugWTD.home') }}" class="rounded mb-2 mr-2 {{ Route::is('wtd.debugWTD') || Route::is('wtd.debugWTD.home') ? 'bg-gray-200 rounded text-white-500' : 'hover:bg-yellow-300 ' }}">
|
||||
<li class="flex w-full justify-between text-gray-600 hover:text-gray-500 cursor-pointer items-center ">
|
||||
<div class="flex items-center">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
|
||||
</svg>
|
||||
<span class="ml-2 text-lg">Debug Proses WTD</span>
|
||||
</div>
|
||||
</li>
|
||||
</a>
|
||||
|
||||
{{-- <a href="#" class="rounded mb-2 mr-2 {{ Route::is('online') || Route::is('online.*') ? 'bg-gray-200 rounded text-white-500' : 'hover:bg-yellow-300 ' }}">
|
||||
<li class="flex w-full justify-between text-gray-600 hover:text-gray-500 cursor-pointer items-center ">
|
||||
<div class="flex items-center">
|
||||
@@ -179,7 +191,18 @@
|
||||
</div>
|
||||
</li>
|
||||
</a>
|
||||
|
||||
<a href="{{ route('barangkes') }}"
|
||||
class="rounded mb-2 mr-2 {{ Route::is('barangkes') || Route::is('barangkes.*') ? 'bg-gray-200 text-white-500' : 'hover:bg-yellow-300' }}">
|
||||
<li class="flex w-full justify-between text-gray-600 hover:text-gray-500 cursor-pointer items-center ">
|
||||
<div class="flex items-center">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
|
||||
class="bi bi-box-seam" viewBox="0 0 16 16">
|
||||
<path d="M3.5 0a.5.5 0 0 0-.5.5v1.086l-1.553.777A.5.5 0 0 0 1 2.8v10.4a.5.5 0 0 0 .276.447l6 3a.5.5 0 0 0 .448 0l6-3A.5.5 0 0 0 14 13.2V2.8a.5.5 0 0 0-.447-.447L12 1.586V.5a.5.5 0 0 0-.5-.5h-8zM2 3.515 7.5 6.309v7.918L2 11.433V3.515zm6 10.712V6.309L14 3.515v7.918l-6 3.294zM12 2v.5L8 4.691 4 2.5V2h8z"/>
|
||||
</svg>
|
||||
<span class="ml-2 text-lg">Barang Kes</span>
|
||||
</div>
|
||||
</li>
|
||||
</a>
|
||||
<a href="{{ route('lelong') }}" class="rounded mb-2 mr-2 {{ Route::is('lelong') || Route::is('lelong.*') ? 'bg-gray-200 rounded text-white-500' : 'hover:bg-yellow-300 ' }}">
|
||||
<li class="flex w-full justify-between text-gray-600 hover:text-gray-500 cursor-pointer items-center ">
|
||||
<div class="flex items-center">
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="bg-gray-900 opacity-50 hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
|
||||
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
|
||||
<main>
|
||||
|
||||
<div class="pt-6 px-4">
|
||||
|
||||
<breadcrumb :items="[{ 'title' : 'Pelanggan', 'icon' : 'fas fa-users' },{ 'title' : 'Barangkes', 'icon' : 'fas fa-box' }]"></breadcrumb>
|
||||
|
||||
<barangkes-pelanggan kodcaw="{{ Auth::user()->cawangan }}"></barangkes-pelanggan>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,21 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="bg-gray-900 opacity-50 hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
|
||||
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
|
||||
<main >
|
||||
|
||||
<div class="pt-6 px-4">
|
||||
|
||||
<breadcrumb :items="[{ 'title' : 'Pelanggan', 'icon' : 'fas fa-users' },{ 'title' : 'Butiran', 'icon' : 'fas fa-users' }]"></breadcrumb>
|
||||
|
||||
<details-sag :customer="{{ json_encode($customer_info) }}" :gadai="{{ json_encode($gadai) }}" kodcaw="{{ Auth::user()->cawangan }}"></details-sag>
|
||||
{{-- <details-sag :customer="{{ json_encode($customer_info) }}" :gadai="{{ json_encode($gadai) }}" kodcaw="{{ Auth::user()->cawangan }}" norujukan="{{ $norujukan }}"></details-sag> --}}
|
||||
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -0,0 +1,276 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="bg-gray-900 opacity-50 hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
|
||||
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
|
||||
<main>
|
||||
|
||||
<div class="pt-6 px-4">
|
||||
|
||||
<breadcrumb
|
||||
:items="[{ 'title': 'Laporan Keseluruhan', 'icon': 'fas fa-users', 'url': '{{ route('reports') }}' }, { 'title': 'Keuntungan Penyelesaian Pembiayaan By Tempoh', 'icon': 'fas fa-file' }]">
|
||||
</breadcrumb>
|
||||
|
||||
<div class="container">
|
||||
<div class="flex w-full">
|
||||
<div class="w-full xl:w-4/5 2xl:w-5/6 p-12 mx-auto">
|
||||
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-4 rounded-t-lg">
|
||||
<a href="/reports" class="router-link-active">
|
||||
<i class="fas fa-backspace text-white"></i>
|
||||
</a>
|
||||
<span class="text-center mx-auto text-white font-bold">Keuntungan Penyelesaian Pembiayaan By Tempoh</span>
|
||||
</div>
|
||||
|
||||
<form id="formAging" method="GET" action="{{ route('reports.agingtebus.show') }}">
|
||||
|
||||
<div class="rounded bg-white shadow p-6">
|
||||
<div class="pb-6">
|
||||
|
||||
<label class="font-semibold text-gray-700 block pb-3">
|
||||
Pilih Tarikh
|
||||
</label>
|
||||
|
||||
<div class="flex flex-wrap lg:flex-nowrap items-end gap-4">
|
||||
|
||||
{{-- Dari --}}
|
||||
<div>
|
||||
<label class="text-gray-600 block pb-1">
|
||||
Dari
|
||||
</label>
|
||||
|
||||
<input
|
||||
id="startDate"
|
||||
name="startDate"
|
||||
type="date"
|
||||
value="{{ request()->startDate ?? $startDate ?? '' }}"
|
||||
class="border border-yellow-600 rounded-lg px-4 py-3 bg-white text-gray-800 focus:ring-2 focus:ring-yellow-500 focus:outline-none transition-all duration-300 hover:border-yellow-500"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{{-- Hingga --}}
|
||||
<div>
|
||||
<label class="text-gray-600 block pb-1">
|
||||
Hingga
|
||||
</label>
|
||||
|
||||
<input
|
||||
id="endDate"
|
||||
name="endDate"
|
||||
type="date"
|
||||
value="{{ request()->endDate ?? $endDate ?? '' }}"
|
||||
class="border border-yellow-600 rounded-lg px-4 py-3 bg-white text-gray-800 focus:ring-2 focus:ring-yellow-500 focus:outline-none transition-all duration-300 hover:border-yellow-500"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="action" id="formAction" value="search">
|
||||
|
||||
{{-- Button Group --}}
|
||||
<div class="flex gap-3 w-full md:w-auto">
|
||||
|
||||
{{-- Button Group --}}
|
||||
<div class="flex gap-3">
|
||||
|
||||
{{-- Search --}}
|
||||
<button
|
||||
type="submit"
|
||||
onclick="setAction('search')"
|
||||
class="border border-yellow-600 text-yellow-600 font-montserrat py-3 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300 whitespace-nowrap">
|
||||
|
||||
<i class="fas fa-magnifying-glass mr-2"></i>
|
||||
Search
|
||||
</button>
|
||||
|
||||
{{-- Excel --}}
|
||||
<button
|
||||
type="submit"
|
||||
onclick="setAction('excel')"
|
||||
class="border border-yellow-600 text-yellow-600 py-3 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300 whitespace-nowrap">
|
||||
|
||||
<i class="fas fa-file-excel mr-2"></i>
|
||||
Excel
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div kodcaw="operasi">
|
||||
<div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div>
|
||||
<div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div>
|
||||
<div class="flex justify-between mb-2">
|
||||
|
||||
</div>
|
||||
|
||||
@if(empty($aging))
|
||||
<div class="alert alert-warning">
|
||||
Tiada data dijumpai untuk tarikh {{ $endDate }}.
|
||||
</div>
|
||||
@else
|
||||
<!-- <h1>Summary Report</h1> -->
|
||||
|
||||
<div class="overflow-x-auto">
|
||||
<!-- Create a table with horizontal headers -->
|
||||
<table class="table-auto w-full border-collapse border border-gray-200">
|
||||
<thead class="bg-yellow-500 text-white">
|
||||
<tr>
|
||||
<th class="px-4 py-2 border">Bil.</th> <!-- Add Bilangan here -->
|
||||
<th class="px-4 py-2 border">Cawangan</th>
|
||||
@foreach ($aging[0]['summary_by_tempoh'] as $summary)
|
||||
<th class="px-4 py-2 border" colspan="2">{{ $summary['label'] }}</th> <!-- Merge Tempoh with Bilangan and Jumlah -->
|
||||
@endforeach
|
||||
<th class="px-4 py-2 border" colspan="2">Keseluruhan</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="px-4 py-2 border"> </th> <!-- Empty for Bilangan Row -->
|
||||
<th class="px-4 py-2 border"> </th> <!-- Empty for Cawangan Row -->
|
||||
@foreach ($aging[0]['summary_by_tempoh'] as $summary)
|
||||
<th class="px-4 py-2 border">Bil</th> <!-- Bilangan Column Title -->
|
||||
<th class="px-4 py-2 border">RM</th> <!-- Jumlah Column Title -->
|
||||
@endforeach
|
||||
<th class="px-4 py-2 border">Bil</th>
|
||||
<th class="px-4 py-2 border">RM</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@php
|
||||
$counter = 1;
|
||||
|
||||
$totalGrandCountByTempoh = array_fill(
|
||||
0,
|
||||
count($aging[0]['summary_by_tempoh']),
|
||||
0
|
||||
);
|
||||
|
||||
$totalGrandKeuntunganByTempoh = array_fill(
|
||||
0,
|
||||
count($aging[0]['summary_by_tempoh']),
|
||||
0
|
||||
);
|
||||
@endphp
|
||||
|
||||
@foreach ($aging as $branch)
|
||||
|
||||
@php
|
||||
$totalCount = 0;
|
||||
$totalKeuntungan = 0;
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
<td class="px-4 py-2 border">
|
||||
{{ $counter++ }}
|
||||
</td>
|
||||
|
||||
<td class="px-4 py-2 border font-bold">
|
||||
{{ $branch['cawangan'] }}
|
||||
</td>
|
||||
|
||||
@foreach ($branch['summary_by_tempoh'] as $index => $summary)
|
||||
|
||||
{{-- Bil --}}
|
||||
<td class="px-4 py-2 border">
|
||||
{{ $summary['count'] }}
|
||||
</td>
|
||||
|
||||
{{-- RM --}}
|
||||
<td class="px-4 py-2 border">
|
||||
{{ number_format($summary['sum_bayaran_keuntungan_rebet'], 2) }}
|
||||
</td>
|
||||
|
||||
@php
|
||||
// Total per cawangan
|
||||
$totalCount += $summary['count'];
|
||||
|
||||
$totalKeuntungan +=
|
||||
$summary['sum_bayaran_keuntungan_rebet'];
|
||||
|
||||
// Grand total
|
||||
$totalGrandCountByTempoh[$index] +=
|
||||
$summary['count'];
|
||||
|
||||
$totalGrandKeuntunganByTempoh[$index] +=
|
||||
$summary['sum_bayaran_keuntungan_rebet'];
|
||||
@endphp
|
||||
|
||||
@endforeach
|
||||
|
||||
{{-- Keseluruhan --}}
|
||||
<td class="px-4 py-2 border">
|
||||
{{ $totalCount }}
|
||||
</td>
|
||||
|
||||
<td class="px-4 py-2 border">
|
||||
{{ number_format($totalKeuntungan, 2) }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
|
||||
<td class="px-4 py-2 border font-bold" colspan="2">
|
||||
Total
|
||||
</td>
|
||||
|
||||
@foreach ($totalGrandCountByTempoh as $index => $grandCount)
|
||||
|
||||
{{-- Grand total bil --}}
|
||||
<td class="px-4 py-2 border">
|
||||
{{ $grandCount }}
|
||||
</td>
|
||||
|
||||
{{-- Grand total RM --}}
|
||||
<td class="px-4 py-2 border">
|
||||
{{ number_format($totalGrandKeuntunganByTempoh[$index], 2) }}
|
||||
</td>
|
||||
|
||||
@endforeach
|
||||
|
||||
{{-- Total keseluruhan --}}
|
||||
<td class="px-4 py-2 border">
|
||||
{{ array_sum($totalGrandCountByTempoh) }}
|
||||
</td>
|
||||
|
||||
<td class="px-4 py-2 border">
|
||||
{{ number_format(array_sum($totalGrandKeuntunganByTempoh), 2) }}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
<!-- JavaScript to Change Action -->
|
||||
<script>
|
||||
function setAction(action) {
|
||||
document.getElementById('formAction').value = action;
|
||||
document.getElementById('formAging').submit();
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,241 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="bg-gray-900 opacity-50 hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
|
||||
|
||||
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
|
||||
<main>
|
||||
<div class="pt-6 px-4">
|
||||
|
||||
{{-- Breadcrumb --}}
|
||||
<breadcrumb
|
||||
:items="[
|
||||
{ 'title': 'Laporan Keseluruhan', 'icon': 'fas fa-users', 'url': '{{ route('reports') }}' },
|
||||
{ 'title': 'Data Pelanggan By Cawangan', 'icon': 'fas fa-users' }
|
||||
]">
|
||||
</breadcrumb>
|
||||
|
||||
<div class="container">
|
||||
|
||||
{{-- Error Alert --}}
|
||||
@if ($errors->any())
|
||||
<div class="flex justify-center mb-4">
|
||||
<div class="flex items-center p-4 text-red-800 border-t-4 border-red-300 bg-red-50 px-10"
|
||||
role="alert">
|
||||
<svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" fill="currentColor"
|
||||
viewBox="0 0 20 20">
|
||||
<path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Z"/>
|
||||
</svg>
|
||||
<div class="ml-3 text-sm font-medium">
|
||||
@foreach ($errors->all() as $error)
|
||||
{{ $error }}
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="flex w-full">
|
||||
<div class="xl:w-2/3 2xl:w-1/2 p-8 mx-auto">
|
||||
|
||||
{{-- Header --}}
|
||||
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-4 rounded-t-lg">
|
||||
<a href="{{ route('reports') }}">
|
||||
<i class="fas fa-backspace text-white"></i>
|
||||
</a>
|
||||
<span class="text-white font-bold ml-2">
|
||||
Laporan Data Pelanggan By Cawangan
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{{-- FORM --}}
|
||||
<form method="GET"
|
||||
id="formStokAudit"
|
||||
action="{{ route('reports.dataPelangganBycaw.show') }}">
|
||||
|
||||
<iframe name="downloadFrame" class="hidden"></iframe>
|
||||
|
||||
<div class="rounded bg-white shadow p-6">
|
||||
|
||||
{{-- Tahun --}}
|
||||
<div class="pb-6">
|
||||
<label class="font-semibold text-gray-700 block pb-1">
|
||||
Tahun Laporan
|
||||
</label>
|
||||
|
||||
<div class="flex items-center">
|
||||
<span class="text-gray-600 border rounded-l px-4 py-2 bg-gray-50">
|
||||
Tahun
|
||||
</span>
|
||||
|
||||
<select name="year"
|
||||
id="report_year"
|
||||
class="border border-l-0 rounded-r px-4 py-2 w-40 mr-4"
|
||||
required>
|
||||
<option value="">-- Pilih Tahun --</option>
|
||||
@for ($y = now()->year; $y >= 2019; $y--)
|
||||
<option value="{{ $y }}">{{ $y }}</option>
|
||||
@endfor
|
||||
</select>
|
||||
|
||||
{{-- Hidden generate type --}}
|
||||
<input type="radio" name="generateType" id="generateTypePdf" value="pdf" hidden>
|
||||
<input type="radio" name="generateType" id="generateTypeExcel" value="excel" hidden>
|
||||
|
||||
{{-- Excel --}}
|
||||
<button type="button" id="generateExcel"
|
||||
class="border border-yellow-600 text-yellow-600 py-2 px-6
|
||||
rounded-xl hover:bg-yellow-600 hover:text-white transition-all">
|
||||
<i class="fas fa-file-excel mr-2"></i> Excel
|
||||
</button>
|
||||
|
||||
{{-- PDF --}}
|
||||
<button type="button" id="generatePdf"
|
||||
class="border border-yellow-600 text-yellow-600 py-2 px-6 ml-4
|
||||
rounded-xl hover:bg-yellow-600 hover:text-white transition-all">
|
||||
<i class="fas fa-eye mr-2"></i> View
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Pilih Cawangan --}}
|
||||
<div class="pb-6">
|
||||
<label class="font-semibold text-gray-700 block pb-2">
|
||||
Pilih Cawangan
|
||||
</label>
|
||||
|
||||
{{-- Select All --}}
|
||||
<div class="mb-2">
|
||||
<label class="inline-flex items-center">
|
||||
<input type="checkbox" id="checkAllCawangan"
|
||||
class="rounded border-gray-300">
|
||||
<span class="ml-2 text-sm font-medium">Pilih Semua</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div id="cawanganContainer"
|
||||
class="grid grid-cols-2 gap-3 max-h-64 overflow-y-auto
|
||||
border rounded p-4 bg-gray-50 text-sm text-gray-500">
|
||||
Memuatkan senarai cawangan...
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@include('layouts.footer')
|
||||
</div>
|
||||
|
||||
{{-- Loading Overlay --}}
|
||||
<div id="loadingOverlay"
|
||||
class="hidden fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center">
|
||||
<div class="bg-white p-6 rounded-xl flex flex-col items-center">
|
||||
<svg class="animate-spin h-10 w-10 text-yellow-600 mb-4"
|
||||
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
||||
<circle class="opacity-25" cx="12" cy="12" r="10"
|
||||
stroke="currentColor" stroke-width="4"></circle>
|
||||
</svg>
|
||||
<span class="text-gray-700 font-semibold">
|
||||
Sedang menjana laporan..
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('additional_scripts')
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
|
||||
const form = document.getElementById('formStokAudit');
|
||||
const loading = document.getElementById('loadingOverlay');
|
||||
|
||||
const container = document.getElementById('cawanganContainer');
|
||||
const checkAll = document.getElementById('checkAllCawangan');
|
||||
|
||||
let downloadFrame = null;
|
||||
let forceHideTimeout = null;
|
||||
|
||||
// =====================
|
||||
// Fetch Cawangan API
|
||||
// =====================
|
||||
fetch("{{ config('api.url') }}/api/cawangan")
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
container.innerHTML = '';
|
||||
if (!data.length) {
|
||||
container.innerHTML = '<span class="text-gray-400">Tiada cawangan</span>';
|
||||
return;
|
||||
}
|
||||
data.forEach(caw => {
|
||||
container.innerHTML += `
|
||||
<label class="flex items-center space-x-2">
|
||||
<input type="checkbox"
|
||||
name="cawangan[]"
|
||||
value="${caw.kodcaw}"
|
||||
class="cawangan-item rounded border-gray-300">
|
||||
<span>${caw.kodcaw} - ${caw.details_caw}</span>
|
||||
</label>
|
||||
`;
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
container.innerHTML = '<span class="text-red-500">Gagal load cawangan</span>';
|
||||
});
|
||||
|
||||
// =====================
|
||||
// Select All Checkbox
|
||||
// =====================
|
||||
checkAll.addEventListener('change', function () {
|
||||
document.querySelectorAll('.cawangan-item').forEach(cb => cb.checked = this.checked);
|
||||
});
|
||||
|
||||
// =====================
|
||||
// Submit Form Function
|
||||
// =====================
|
||||
function submitForm(isExcel = false) {
|
||||
|
||||
if (document.querySelectorAll('.cawangan-item:checked').length === 0) {
|
||||
alert('Sila pilih sekurang-kurangnya satu cawangan');
|
||||
return;
|
||||
}
|
||||
|
||||
// set generateType
|
||||
if (isExcel) document.getElementById('generateTypeExcel').checked = true;
|
||||
else document.getElementById('generateTypePdf').checked = true;
|
||||
|
||||
// Show loading
|
||||
loading.classList.remove('hidden');
|
||||
|
||||
// Excel via iframe
|
||||
if (isExcel) {
|
||||
if (downloadFrame) downloadFrame.remove();
|
||||
downloadFrame = document.createElement('iframe');
|
||||
downloadFrame.name = 'downloadFrame';
|
||||
downloadFrame.style.display = 'none';
|
||||
document.body.appendChild(downloadFrame);
|
||||
form.target = 'downloadFrame';
|
||||
} else {
|
||||
form.removeAttribute('target');
|
||||
}
|
||||
|
||||
form.submit();
|
||||
|
||||
// Hide overlay after max 15 sec
|
||||
forceHideTimeout = setTimeout(() => loading.classList.add('hidden'), 15000);
|
||||
}
|
||||
|
||||
// =====================
|
||||
// Button Handlers
|
||||
// =====================
|
||||
document.getElementById('generateExcel').addEventListener('click', () => submitForm(true));
|
||||
document.getElementById('generatePdf').addEventListener('click', () => submitForm(false));
|
||||
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -0,0 +1,247 @@
|
||||
<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: #030101;}
|
||||
|
||||
#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:11px;
|
||||
}
|
||||
|
||||
#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>Semua Cawangan</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table id="scan">
|
||||
<tr>
|
||||
<th colspan="6"><b>Laporan Data Pelanggan</b></th>
|
||||
<th colspan="3" style="text-align:right">
|
||||
<b>Tarikh Cetak:</b> {{ $tarikh_cetak }}
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="width:120px"><b>TAHUN LAPORAN</b></td>
|
||||
<td colspan="8">{{ $tebus_date }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<table id="details">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Cawangan</th>
|
||||
<!-- <th>Nama Pelanggan</th> -->
|
||||
<th>No.Pelanggan</th>
|
||||
<th>Umur</th>
|
||||
<th>Jantina</th>
|
||||
<th>Pekerjaan</th>
|
||||
<th>Lokasi</th>
|
||||
<th>Tempoh Pajakan</th>
|
||||
<th>Tarikh Mula</th>
|
||||
<th>Tarikh Tamat</th>
|
||||
<th>Hari Sejak Transaksi Terakhir</th>
|
||||
<th>Bil Transaksi</th>
|
||||
<th>Bil Outstanding</th>
|
||||
<th>Bil Tebus</th>
|
||||
<th>Jumlah Pinjaman (RM)</th>
|
||||
<th>Jumlah Ujrah (RM)</th>
|
||||
<th>Tujuan Gadaian</th>
|
||||
<th>Status Aktif</th>
|
||||
<th>Cara Bayaran</th>
|
||||
<th>Tarikh Lelong</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($pelanggan as $index => $row)
|
||||
<tr>
|
||||
<td>{{ $index + 1 }}</td>
|
||||
<td>{{ $row['cawangan'] }}</td>
|
||||
<!-- <td>{{ strtoupper($row['nama']) }}</td> -->
|
||||
<td>{{ $row['nopelanggan'] }}</td>
|
||||
<td>{{ $row['umur'] }}</td>
|
||||
<td>{{ $row['jantina'] }}</td>
|
||||
<td>{{ $row['pekerjaan'] }}</td>
|
||||
<td>{{ $row['daerah'] }}</td>
|
||||
<td>{{ $row['tempoh_pajakan'] }}</td>
|
||||
<td>{{ $row['tarikh_mula'] }}</td>
|
||||
<td>{{ $row['tarikh_tamat'] }}</td>
|
||||
<td>{{ $row['hari_sejak_transaksi'] }}</td>
|
||||
<td>{{ $row['bil_transaksi'] }}</td>
|
||||
<td>{{ $row['bil_outstanding'] }}</td>
|
||||
<td>{{ $row['bil_tebus'] }}</td>
|
||||
<td>{{ number_format($row['jumlah_pinjaman'], 2) }}</td>
|
||||
<td>{{ number_format($row['jumlah_ujrah'], 2) }}</td>
|
||||
<td>{{ $row['tujuan_gadai'] }}</td>
|
||||
<td>{{ $row['status_aktif'] }}</td>
|
||||
<td>{{ $row['cara_bayaran'] }}</td>
|
||||
<td>{{ $row['tarikh_lelong'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<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>
|
||||
@@ -0,0 +1,223 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="bg-gray-900 opacity-50 hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
|
||||
|
||||
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
|
||||
<main>
|
||||
<div class="pt-6 px-4">
|
||||
|
||||
{{-- Breadcrumb --}}
|
||||
<breadcrumb
|
||||
:items="[
|
||||
{ 'title': 'Laporan Keseluruhan', 'icon': 'fas fa-users', 'url': '{{ route('reports') }}' },
|
||||
{ 'title': 'Data Pelanggan', 'icon': 'fas fa-users' }
|
||||
]">
|
||||
</breadcrumb>
|
||||
|
||||
<div class="container">
|
||||
|
||||
{{-- Error Alert --}}
|
||||
@if ($errors->any())
|
||||
<div id="error-alert" class="flex justify-center">
|
||||
<div class="flex items-center p-4 text-red-800 border-t-4 border-red-300 bg-red-50 px-10"
|
||||
role="alert">
|
||||
<svg class="flex-shrink-0 w-4 h-4" xmlns="http://www.w3.org/2000/svg" fill="currentColor"
|
||||
viewBox="0 0 20 20">
|
||||
<path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3
|
||||
1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1
|
||||
1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"/>
|
||||
</svg>
|
||||
<div class="ms-3 text-sm font-medium ml-2">
|
||||
@foreach ($errors->all() as $error)
|
||||
{{ $error }}
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="flex w-full">
|
||||
<div class="xl:w-2/3 2xl:w-1/2 p-8 mx-auto">
|
||||
|
||||
{{-- Header --}}
|
||||
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-4 rounded-t-lg">
|
||||
<a href="{{ route('reports') }}">
|
||||
<i class="fas fa-backspace text-white"></i>
|
||||
</a>
|
||||
<span class="text-white font-bold ml-2">
|
||||
Laporan Data Pelanggan
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{{-- FORM --}}
|
||||
<form method="GET" id="formStokAudit"
|
||||
action="{{ route('reports.dataPelanggan.show') }}">
|
||||
<iframe name="downloadFrame" class="hidden"></iframe>
|
||||
|
||||
<div class="rounded bg-white shadow p-6">
|
||||
|
||||
{{-- Tahun --}}
|
||||
<div class="pb-6">
|
||||
<label class="font-semibold text-gray-700 block pb-1">
|
||||
Tahun Laporan
|
||||
</label>
|
||||
|
||||
<div class="flex items-center">
|
||||
<span
|
||||
class="text-gray-600 border border-2 rounded-l px-4 py-2"
|
||||
style="background-color: rgb(249, 250, 251);">
|
||||
Tahun
|
||||
</span>
|
||||
|
||||
<select name="year" id="report_year"
|
||||
class="border border-2 border-l-0 rounded-r px-4 py-2 w-40 mr-4"
|
||||
required>
|
||||
<option value="">-- Pilih Tahun --</option>
|
||||
@for ($y = now()->year; $y >= 2019; $y--)
|
||||
<option value="{{ $y }}">{{ $y }}</option>
|
||||
@endfor
|
||||
</select>
|
||||
|
||||
{{-- Hidden generate type --}}
|
||||
<div class="hidden">
|
||||
<input type="radio" name="generateType"
|
||||
id="generateTypePdf" value="pdf">
|
||||
<input type="radio" name="generateType"
|
||||
id="generateTypeExcel" value="excel">
|
||||
</div>
|
||||
|
||||
{{-- Excel --}}
|
||||
<button id="generateExcel" type="button"
|
||||
class="border border-yellow-600 text-yellow-600 py-2 px-6
|
||||
rounded-xl hover:bg-yellow-600 hover:text-white transition-all">
|
||||
<i class="fas fa-file-excel mr-2"></i> Excel
|
||||
</button>
|
||||
|
||||
{{-- PDF --}}
|
||||
<button id="generatePdf" type="button"
|
||||
class="border border-yellow-600 text-yellow-600 py-2 px-6 ml-4
|
||||
rounded-xl hover:bg-yellow-600 hover:text-white transition-all">
|
||||
<i class="fas fa-eye mr-2"></i> View
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@include('layouts.footer')
|
||||
</div>
|
||||
|
||||
{{-- Loading Overlay --}}
|
||||
<div id="loadingOverlay"
|
||||
class="hidden fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center">
|
||||
<div class="bg-white p-6 rounded-xl flex flex-col items-center">
|
||||
<svg class="animate-spin h-10 w-10 text-yellow-600 mb-4"
|
||||
xmlns="http://www.w3.org/2000/svg" fill="none"
|
||||
viewBox="0 0 24 24">
|
||||
<circle class="opacity-25" cx="12" cy="12" r="10"
|
||||
stroke="currentColor" stroke-width="4"></circle>
|
||||
<path class="opacity-75" fill="currentColor"
|
||||
d="M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z">
|
||||
</path>
|
||||
</svg>
|
||||
<span class="text-gray-700 font-semibold">
|
||||
Sedang menjana laporan..
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
{{-- =======================
|
||||
| Scripts
|
||||
|======================= --}}
|
||||
@push('additional_scripts')
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
const form = document.getElementById('formStokAudit');
|
||||
const loading = document.getElementById('loadingOverlay');
|
||||
|
||||
let downloadFrame = null;
|
||||
let forceHideTimeout = null;
|
||||
let minLoadingTimeout = null;
|
||||
|
||||
function showLoading() {
|
||||
loading.classList.remove('hidden');
|
||||
}
|
||||
|
||||
function hideLoading() {
|
||||
loading.classList.add('hidden');
|
||||
|
||||
clearTimeout(forceHideTimeout);
|
||||
clearTimeout(minLoadingTimeout);
|
||||
}
|
||||
|
||||
// =====================
|
||||
// EXCEL DOWNLOAD
|
||||
// =====================
|
||||
document.getElementById('generateExcel').addEventListener("click", function () {
|
||||
|
||||
document.getElementById('generateTypeExcel').checked = true;
|
||||
|
||||
showLoading();
|
||||
|
||||
// Remove iframe lama
|
||||
if (downloadFrame) downloadFrame.remove();
|
||||
|
||||
downloadFrame = document.createElement('iframe');
|
||||
downloadFrame.name = 'downloadFrame';
|
||||
downloadFrame.style.display = 'none';
|
||||
document.body.appendChild(downloadFrame);
|
||||
|
||||
form.target = 'downloadFrame';
|
||||
form.submit();
|
||||
|
||||
/**
|
||||
* 🔐 Minimum loading time
|
||||
* elak tutup terlalu awal
|
||||
*/
|
||||
minLoadingTimeout = setTimeout(() => {
|
||||
// Lepas 5 saat, barulah loading boleh ditutup
|
||||
}, 10000);
|
||||
|
||||
/**
|
||||
* 🧯 Fallback safety
|
||||
* Tutup paksa selepas 20 saat
|
||||
*/
|
||||
forceHideTimeout = setTimeout(() => {
|
||||
hideLoading();
|
||||
}, 20000);
|
||||
});
|
||||
|
||||
// =====================
|
||||
// PDF VIEW
|
||||
// =====================
|
||||
document.getElementById('generatePdf').addEventListener("click", function () {
|
||||
|
||||
document.getElementById('generateTypePdf').checked = true;
|
||||
|
||||
form.removeAttribute('target');
|
||||
showLoading();
|
||||
|
||||
form.submit();
|
||||
|
||||
// PDF cepat → tutup awal
|
||||
setTimeout(() => {
|
||||
hideLoading();
|
||||
}, 10000);
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
@@ -0,0 +1,245 @@
|
||||
<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:11px;
|
||||
}
|
||||
|
||||
#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>Semua Cawangan</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table id="scan">
|
||||
<tr>
|
||||
<th colspan="6"><b>Laporan Data Pelanggan</b></th>
|
||||
<th colspan="3" style="text-align:right">
|
||||
<b>Tarikh Cetak:</b> {{ $tarikh_cetak }}
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="width:120px"><b>TAHUN LAPORAN</b></td>
|
||||
<td colspan="8">{{ $tebus_date }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<table id="details">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Nama Pelanggan</th>
|
||||
<th>No.Pelanggan</th>
|
||||
<th>Umur</th>
|
||||
<th>Jantina</th>
|
||||
<th>Pekerjaan</th>
|
||||
<th>Lokasi</th>
|
||||
<th>Tempoh Pajakan</th>
|
||||
<th>Tarikh Mula</th>
|
||||
<th>Tarikh Tamat</th>
|
||||
<th>Hari Sejak Transaksi Terakhir</th>
|
||||
<th>Bil Transaksi</th>
|
||||
<th>Bil Outstanding</th>
|
||||
<th>Bil Tebus</th>
|
||||
<th>Jumlah Pinjaman (RM)</th>
|
||||
<th>Jumlah Ujrah (RM)</th>
|
||||
<th>Tujuan Gadaian</th>
|
||||
<th>Status Aktif</th>
|
||||
<th>Cara Bayaran</th>
|
||||
<th>Tarikh Lelong</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($pelanggan as $index => $row)
|
||||
<tr>
|
||||
<td>{{ $index + 1 }}</td>
|
||||
<td>{{ strtoupper($row['nama']) }}</td>
|
||||
<td>{{ $row['nopelanggan'] }}</td>
|
||||
<td>{{ $row['umur'] }}</td>
|
||||
<td>{{ $row['jantina'] }}</td>
|
||||
<td>{{ $row['pekerjaan'] }}</td>
|
||||
<td>{{ $row['daerah'] }}</td>
|
||||
<td>{{ $row['tempoh_pajakan'] }}</td>
|
||||
<td>{{ $row['tarikh_mula'] }}</td>
|
||||
<td>{{ $row['tarikh_tamat'] }}</td>
|
||||
<td>{{ $row['hari_sejak_transaksi'] }}</td>
|
||||
<td>{{ $row['bil_transaksi'] }}</td>
|
||||
<td>{{ $row['bil_outstanding'] }}</td>
|
||||
<td>{{ $row['bil_tebus'] }}</td>
|
||||
<td>{{ number_format($row['jumlah_pinjaman'], 2) }}</td>
|
||||
<td>{{ number_format($row['jumlah_ujrah'], 2) }}</td>
|
||||
<td>{{ $row['tujuan_gadai'] }}</td>
|
||||
<td>{{ $row['status_aktif'] }}</td>
|
||||
<td>{{ $row['cara_bayaran'] }}</td>
|
||||
<td>{{ $row['tarikh_lelong'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<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>
|
||||
@@ -89,6 +89,10 @@
|
||||
<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">
|
||||
Pinjaman(RM)
|
||||
</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">
|
||||
Pendapatan 12 Bulan(RM)
|
||||
</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">
|
||||
@@ -101,6 +105,7 @@
|
||||
$totalberat = 0;
|
||||
$totalnm = 0;
|
||||
$totalpinjaman = 0;
|
||||
$totalupah12 = 0;
|
||||
@endphp
|
||||
<tbody>
|
||||
@forelse ($gadaian as $gadai)
|
||||
@@ -109,6 +114,8 @@
|
||||
$totalberat += $gadai['sum_berat'];
|
||||
$totalnm += $gadai['sum_nilai_marhun'];
|
||||
$totalpinjaman += $gadai['sum_pinjaman'];
|
||||
$totalupah12 += $gadai['sum_upah_12'];
|
||||
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
@@ -164,6 +171,14 @@
|
||||
{{ number_format($gadai['sum_pinjaman'], 2) }}</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">
|
||||
{{ number_format($gadai['sum_upah_12'], 2) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="flex items-center">
|
||||
@@ -228,6 +243,14 @@
|
||||
</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">
|
||||
{{ number_format($totalupah12,2) }}</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">
|
||||
|
||||
@@ -110,6 +110,10 @@
|
||||
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(RM)
|
||||
</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">
|
||||
Harga Asas(RM)
|
||||
</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">
|
||||
Harga Jual(RM)
|
||||
@@ -133,6 +137,7 @@
|
||||
$totalkeuntungan = 0;
|
||||
$totalcajlelong = 0;
|
||||
$totalhargajual= 0;
|
||||
$totalhargaasas= 0;
|
||||
$totalbaki= 0;
|
||||
@endphp
|
||||
<tbody>
|
||||
@@ -146,6 +151,7 @@
|
||||
$totalkeuntungan += $lelong['sum_bakiupah'];
|
||||
$totalcajlelong+= $lelong['sum_cajlelong'];
|
||||
$totalhargajual+= $lelong['sum_hargajual'];
|
||||
$totalhargaasas+= $lelong['sum_hargaasas'];
|
||||
$totalbaki+= $lelong['sum_baki'];
|
||||
@endphp
|
||||
|
||||
@@ -227,6 +233,14 @@
|
||||
</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">
|
||||
{{ number_format($lelong['sum_hargaasas'], 2) }}</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">
|
||||
@@ -330,6 +344,14 @@
|
||||
</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">
|
||||
{{ number_format($totalhargaasas,2) }}</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">
|
||||
|
||||
@@ -51,6 +51,8 @@
|
||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">No</th>
|
||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">Kod Cawangan</th>
|
||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 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-xs font-semibold text-gray-600 uppercase tracking-wider">Bil Pembiayaan (BRG KES)</th>
|
||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">Jumlah Pembiayaan (RM)</th>
|
||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">Bil Pembiayaan (SAG LAMA)</th>
|
||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">Jumlah Pembiayaan (RM)</th>
|
||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">Bil Pembiayaan (SAG BARU)</th>
|
||||
@@ -61,8 +63,10 @@
|
||||
</tr>
|
||||
</thead>
|
||||
@php
|
||||
$totalbilgadaikes = 0; // KES
|
||||
$totalbilgadai = 0; // LAMA
|
||||
$totalbilgadai2 = 0; // BARU
|
||||
$totalpinjamankes = 0; // KES
|
||||
$totalpinjaman = 0; // LAMA
|
||||
$totalpinjaman2 = 0; // BARU
|
||||
|
||||
@@ -72,6 +76,8 @@
|
||||
<tbody>
|
||||
@forelse ($outstanding as $outs)
|
||||
@php
|
||||
$totalbilgadaikes += $outs['total_gadaian_kes'];
|
||||
$totalpinjamankes += $outs['sum_pinjaman_kes'];
|
||||
$totalbilgadai += $outs['total_gadaian'];
|
||||
$totalpinjaman += $outs['sum_pinjaman'];
|
||||
$totalbilgadai2 += $outs['total_gadaian2'];
|
||||
@@ -84,6 +90,8 @@
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ $loop->iteration }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ $outs['kodcaw'] }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ $outs['details_caw'] }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ $outs['total_gadaian_kes'] }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ number_format($outs['sum_pinjaman_kes'], 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ $outs['total_gadaian'] }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ number_format($outs['sum_pinjaman'], 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ $outs['total_gadaian2'] }}</td>
|
||||
@@ -99,6 +107,8 @@
|
||||
@endforelse
|
||||
<tr class="font-semibold bg-gray-50">
|
||||
<td colspan="3" class="px-5 py-5 border-b border-gray-200 text-sm">Jumlah Keseluruhan</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 text-sm">{{ $totalbilgadaikes }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 text-sm">{{ number_format($totalpinjamankes,2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 text-sm">{{ $totalbilgadai }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 text-sm">{{ number_format($totalpinjaman,2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 text-sm">{{ $totalbilgadai2 }}</td>
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="9" style="font-weight:bold; font-size:16px; text-align:center;">
|
||||
LAPORAN SARINGAN PEMBIAYAAN
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9" style="text-align:center;">
|
||||
Cawangan : {{ $branch['details_caw'] ?? '-' }} ({{ $branch['kodcaw'] ?? '-' }})
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9" style="text-align:center;">
|
||||
Tempoh : {{ request()->startDate }} hingga {{ request()->endDate }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9" style="text-align:center;">
|
||||
Tarikh Dijana : {{ $generatedAt }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
<table border="1">
|
||||
<thead>
|
||||
<tr style="font-weight:bold; background:#f3f3f3;">
|
||||
<th>Bil</th>
|
||||
<th>No Rujukan Tebus</th>
|
||||
<th>No Rujukan Gadai Balik</th>
|
||||
<th>No KP</th>
|
||||
<th>Berat (g)</th>
|
||||
<th>Nilai Marhun (RM)</th>
|
||||
<th>Pinjaman (RM)</th>
|
||||
<th>Tag Lelong</th>
|
||||
<th>Tarikh Gadai</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
{{-- ================= TGB LELONG ================= --}}
|
||||
<tr>
|
||||
<td colspan="9" style="font-weight:bold;">TGB LELONG</td>
|
||||
</tr>
|
||||
|
||||
@php
|
||||
$bil = 1;
|
||||
$subBerat = $subNM = $subPinjam = 0;
|
||||
@endphp
|
||||
|
||||
@foreach ($tgb_lelong as $item)
|
||||
<tr>
|
||||
<td>{{ $bil++ }}</td>
|
||||
<td>{{ $item['norujukan_tebus'] ?? null }}</td>
|
||||
<td>{{ $item['norujukan_gadai_balik'] ?? null }}</td>
|
||||
<td>{{ $item['nokp'] ?? null }}</td>
|
||||
<td>{{ $item['berat'] ?? 0 }}</td>
|
||||
<td>{{ $item['nilaimarhun'] ?? 0 }}</td>
|
||||
<td>{{ $item['pinjaman'] ?? 0 }}</td>
|
||||
<td>Ya</td>
|
||||
<td>{{ $item['t_gadai'] ?? null }}</td>
|
||||
</tr>
|
||||
|
||||
@php
|
||||
$subBerat += $item['berat'] ?? 0;
|
||||
$subNM += $item['nilaimarhun'] ?? 0;
|
||||
$subPinjam += $item['pinjaman'] ?? 0;
|
||||
@endphp
|
||||
@endforeach
|
||||
|
||||
<tr style="font-weight:bold;">
|
||||
<td colspan="4">Subtotal</td>
|
||||
<td>{{ number_format($subBerat, 2) }}</td>
|
||||
<td>{{ number_format($subNM, 2) }}</td>
|
||||
<td>{{ number_format($subPinjam, 2) }}</td>
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
|
||||
{{-- ================= TGB BIASA ================= --}}
|
||||
<tr>
|
||||
<td colspan="9" style="font-weight:bold;">TGB BIASA</td>
|
||||
</tr>
|
||||
|
||||
@php
|
||||
$bil = 1;
|
||||
$subBerat = $subNM = $subPinjam = 0;
|
||||
@endphp
|
||||
|
||||
@foreach ($tgb_biasa as $item)
|
||||
<tr>
|
||||
<td>{{ $bil++ }}</td>
|
||||
<td>{{ $item['norujukan_tebus'] ?? null }}</td>
|
||||
<td>{{ $item['norujukan_gadai_balik'] ?? null }}</td>
|
||||
<td>{{ $item['nokp'] ?? null }}</td>
|
||||
<td>{{ $item['berat'] ?? 0 }}</td>
|
||||
<td>{{ $item['nilaimarhun'] ?? 0 }}</td>
|
||||
<td>{{ $item['pinjaman'] ?? 0 }}</td>
|
||||
<td>Tidak</td>
|
||||
<td>{{ $item['t_gadai'] ?? null }}</td>
|
||||
</tr>
|
||||
|
||||
@php
|
||||
$subBerat += $item['berat'] ?? 0;
|
||||
$subNM += $item['nilaimarhun'] ?? 0;
|
||||
$subPinjam += $item['pinjaman'] ?? 0;
|
||||
@endphp
|
||||
@endforeach
|
||||
|
||||
<tr style="font-weight:bold;">
|
||||
<td colspan="4">Subtotal</td>
|
||||
<td>{{ number_format($subBerat, 2) }}</td>
|
||||
<td>{{ number_format($subNM, 2) }}</td>
|
||||
<td>{{ number_format($subPinjam, 2) }}</td>
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
|
||||
{{-- ================= GADAI BIASA ================= --}}
|
||||
<tr>
|
||||
<td colspan="9" style="font-weight:bold;">GADAI BIASA</td>
|
||||
</tr>
|
||||
|
||||
@php
|
||||
$bil = 1;
|
||||
$subBerat = $subNM = $subPinjam = 0;
|
||||
@endphp
|
||||
|
||||
@foreach ($gadai_biasa as $item)
|
||||
<tr>
|
||||
<td>{{ $bil++ }}</td>
|
||||
<td></td>
|
||||
<td>{{ $item['norujukan_gadai_balik'] ?? null }}</td>
|
||||
<td>{{ $item['nokp'] ?? null }}</td>
|
||||
<td>{{ $item['berat'] ?? 0 }}</td>
|
||||
<td>{{ $item['nilaimarhun'] ?? 0 }}</td>
|
||||
<td>{{ $item['pinjaman'] ?? 0 }}</td>
|
||||
<td></td>
|
||||
<td>{{ $item['t_gadai'] ?? null }}</td>
|
||||
</tr>
|
||||
|
||||
@php
|
||||
$subBerat += $item['berat'] ?? 0;
|
||||
$subNM += $item['nilaimarhun'] ?? 0;
|
||||
$subPinjam += $item['pinjaman'] ?? 0;
|
||||
@endphp
|
||||
@endforeach
|
||||
|
||||
<tr style="font-weight:bold;">
|
||||
<td colspan="4">Subtotal</td>
|
||||
<td>{{ number_format($subBerat, 2) }}</td>
|
||||
<td>{{ number_format($subNM, 2) }}</td>
|
||||
<td>{{ number_format($subPinjam, 2) }}</td>
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<tr>
|
||||
<td colspan="4" style="font-weight:bold; background:#eee;">
|
||||
JUMLAH KESELURUHAN
|
||||
</td>
|
||||
<td style="font-weight:bold;">
|
||||
{{ number_format($grandTotal['berat'], 2) }}
|
||||
</td>
|
||||
<td style="font-weight:bold;">
|
||||
{{ number_format($grandTotal['nilai'], 2) }}
|
||||
</td>
|
||||
<td style="font-weight:bold;">
|
||||
{{ number_format($grandTotal['pinjaman'], 2) }}
|
||||
</td>
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
|
||||
@@ -0,0 +1,328 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="bg-gray-900 opacity-50 hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
|
||||
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
|
||||
<main>
|
||||
|
||||
<div class="pt-6 px-4">
|
||||
|
||||
<breadcrumb
|
||||
:items="[{ 'title': 'Laporan Keseluruhan', 'icon': 'fas fa-users', 'url': '{{ route('reports') }}' },
|
||||
{ 'title': 'Gadaian', 'icon': 'fas fa-users' }
|
||||
]">
|
||||
</breadcrumb>
|
||||
|
||||
<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"><a href="/reports"
|
||||
class="router-link-active"><i class="fas fa-backspace text-white"></i></a> <span
|
||||
class="text-center mx-auto text-white font-bold">Laporan Saringan Pembiayaan</span>
|
||||
</div>
|
||||
<form method="get" id="formgadaian" action="{{ route('reports.saringan-gadaian.index') }}">
|
||||
<div class="rounded bg-white shadow p-6">
|
||||
<div class="pb-6"><label for="username"
|
||||
class="font-semibold text-gray-700 block pb-1">Tarikh</label>
|
||||
<div class="flex">
|
||||
<span
|
||||
class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap"
|
||||
style="background-color: rgb(249, 250, 251);">Mula</span>
|
||||
<input id="tarikhmula" name="startDate" type="date"
|
||||
value="{{ request()->startDate ?? $startDate }}"
|
||||
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
||||
<span
|
||||
class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap"
|
||||
style="background-color: rgb(249, 250, 251);">Hingga</span>
|
||||
<input id="tarikhhingga" name="endDate" type="date"
|
||||
value="{{ request()->endDate ?? $endDate }}"
|
||||
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
||||
<button
|
||||
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 ml-5">
|
||||
<i class="fas fa-magnifying-glass mr-2"></i>Search
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div kodcaw="operasi">
|
||||
<div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div>
|
||||
<div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div>
|
||||
<div class="flex justify-between mb-2">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<table class="min-w-full leading-normal">
|
||||
<thead class="text-center">
|
||||
<tr>
|
||||
<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">
|
||||
No
|
||||
</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">
|
||||
Kod 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">
|
||||
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">
|
||||
Jumlah Surat
|
||||
</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">
|
||||
TGB 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">
|
||||
TGB Biasa
|
||||
</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">
|
||||
Gadai Biasa
|
||||
</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">
|
||||
Berat (g)
|
||||
</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">
|
||||
Nilai Marhun(RM)
|
||||
</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">
|
||||
Pinjaman(RM)
|
||||
</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">
|
||||
NM TGB 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">
|
||||
NM TGB Biasa
|
||||
</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">
|
||||
NM Gadai Biasa
|
||||
</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">
|
||||
Pinjaman TGB Lelong(RM)
|
||||
</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">
|
||||
Pinjaman TGB Biasa(RM)
|
||||
</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">
|
||||
Pinjaman Gadai Biasa(RM)
|
||||
</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>
|
||||
|
||||
@php
|
||||
$totalbilgadai = 0; // jumlah semua surat
|
||||
$total_tgb_lelong = 0;
|
||||
$total_tgb_biasa = 0;
|
||||
$total_gadai_biasa = 0;
|
||||
$totalberat = 0;
|
||||
$totalnm = 0;
|
||||
$totalpinjaman = 0;
|
||||
|
||||
$total_nm_tgb_lelong = 0;
|
||||
$total_nm_tgb_biasa = 0;
|
||||
$total_nm_gadai_biasa = 0;
|
||||
|
||||
$total_pinjaman_tgb_lelong = 0;
|
||||
$total_pinjaman_tgb_biasa = 0;
|
||||
$total_pinjaman_gadai_biasa = 0;
|
||||
@endphp
|
||||
|
||||
<tbody>
|
||||
@forelse ($gadaian as $gadai)
|
||||
@php
|
||||
// Jumlah semua surat
|
||||
$totalbilgadai += $gadai['jumlah_surat'] ?? 0;
|
||||
|
||||
// Jumlah per kategori
|
||||
$total_tgb_lelong += $gadai['total_tgb_lelong'] ?? 0;
|
||||
$total_tgb_biasa += $gadai['total_tgb_biasa'] ?? 0;
|
||||
$total_gadai_biasa += $gadai['total_gadai_biasa'] ?? 0;
|
||||
|
||||
// Jumlah nilai
|
||||
$totalberat += $gadai['sum_berat'] ?? 0;
|
||||
$totalnm += $gadai['sum_nilai_marhun'] ?? 0;
|
||||
$totalpinjaman += $gadai['sum_pinjaman'] ?? 0;
|
||||
|
||||
$nm_tgb_lelong = $gadai['details'] ?? [];
|
||||
$nm_tgb_lelong = collect($nm_tgb_lelong)
|
||||
->where('jenis', 'TGB_LELONG')
|
||||
->sum('nilaimarhun');
|
||||
|
||||
$nm_tgb_biasa = collect($gadai['details'] ?? [])
|
||||
->where('jenis', 'TGB_BIASA')
|
||||
->sum('nilaimarhun');
|
||||
$nm_gadai_biasa = collect($gadai['details'] ?? [])
|
||||
->where('jenis', 'GADAI_BIASA')
|
||||
->sum('nilaimarhun');
|
||||
|
||||
$pinjaman_tgb_lelong = collect($gadai['details'] ?? [])
|
||||
->where('jenis', 'TGB_LELONG')
|
||||
->sum('pinjaman');
|
||||
$pinjaman_tgb_biasa = collect($gadai['details'] ?? [])
|
||||
->where('jenis', 'TGB_BIASA')
|
||||
->sum('pinjaman');
|
||||
$pinjaman_gadai_biasa = collect($gadai['details'] ?? [])
|
||||
->where('jenis', 'GADAI_BIASA')
|
||||
->sum('pinjaman');
|
||||
|
||||
$total_nm_tgb_lelong += $nm_tgb_lelong;
|
||||
$total_nm_tgb_biasa += $nm_tgb_biasa;
|
||||
$total_nm_gadai_biasa += $nm_gadai_biasa;
|
||||
|
||||
$total_pinjaman_tgb_lelong += $pinjaman_tgb_lelong;
|
||||
$total_pinjaman_tgb_biasa += $pinjaman_tgb_biasa;
|
||||
$total_pinjaman_gadai_biasa += $pinjaman_gadai_biasa;
|
||||
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $loop->iteration }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $gadai['kodcaw'] }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $gadai['details_caw'] }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $gadai['jumlah_surat'] }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $gadai['total_tgb_lelong'] }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $gadai['total_tgb_biasa'] }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $gadai['total_gadai_biasa'] }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ number_format($gadai['sum_berat'], 2) }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ number_format($gadai['sum_nilai_marhun'], 2) }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ number_format($gadai['sum_pinjaman'], 2) }}</div>
|
||||
</td>
|
||||
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($nm_tgb_lelong, 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($nm_tgb_biasa, 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($nm_gadai_biasa, 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($pinjaman_tgb_lelong, 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($pinjaman_tgb_biasa, 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($pinjaman_gadai_biasa, 2) }}</td>
|
||||
|
||||
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">
|
||||
<a href="{{ route('reports.saringan.gadaian.cawangan.excel', [$gadai['kodcaw'], 'startDate' => request()->startDate, 'endDate' => request()->endDate]) }}"
|
||||
target="_blank" rel="noopener noreferrer"
|
||||
class="border border-blue-600 text-blue-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-blue-600 hover:text-white transition-all duration-300">
|
||||
<i class="fas fa-download mr-2"></i>Download
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="11"
|
||||
class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-center">
|
||||
Data not available
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
|
||||
<tr>
|
||||
<td colspan="3" class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
Jumlah Keseluruhan
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ $totalbilgadai }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ $total_tgb_lelong }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ $total_tgb_biasa }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ $total_gadai_biasa }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($totalberat, 2) }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($totalnm, 2) }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($totalpinjaman, 2) }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($total_nm_tgb_lelong, 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($total_nm_tgb_biasa, 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($total_nm_gadai_biasa, 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($total_pinjaman_tgb_lelong, 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($total_pinjaman_tgb_biasa, 2) }}</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
{{ number_format($total_pinjaman_gadai_biasa, 2) }}</td>
|
||||
|
||||
<td colspan="1"
|
||||
class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-center">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
</div>
|
||||
@endsection
|
||||
@@ -15,10 +15,7 @@
|
||||
<div class="container">
|
||||
@if ($errors->any())
|
||||
<div id="error-alert" class="flex justify-center">
|
||||
<div id="alert-border-2" class="flex items-center p-4 text-red-800 border-t-4 border-red-300 bg-red-50 dark:text-red-400 dark:bg-gray-800 dark:border-red-800 px-10" role="alert">
|
||||
<svg class="flex-shrink-0 w-4 h-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"/>
|
||||
</svg>
|
||||
<div class="flex items-center p-4 text-red-800 border-t-4 border-red-300 bg-red-50 px-10" role="alert">
|
||||
<div class="ms-3 text-sm font-medium ml-2 ">
|
||||
@foreach ($errors->all() as $error)
|
||||
{{ $error }}
|
||||
@@ -29,58 +26,75 @@
|
||||
@endif
|
||||
<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"><a href="/reports"
|
||||
class="router-link-active"><i class="fas fa-backspace text-white"></i></a> <span
|
||||
class="text-center mx-auto text-white font-bold">Laporan Stok Audit</span></div>
|
||||
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-4 rounded-t-lg">
|
||||
<a href="/reports">
|
||||
<i class="fas fa-backspace text-white"></i>
|
||||
</a>
|
||||
<span class="text-center mx-auto text-white font-bold">
|
||||
Laporan Stok Audit
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<form method="get" id="formStokAudit" action="{{ route('reports.stok-audit.show') }}">
|
||||
<div class="rounded bg-white shadow p-6">
|
||||
<div class="pb-6"><label for="username"
|
||||
class="font-semibold text-gray-700 block pb-1">Tarikh</label>
|
||||
|
||||
{{-- PILIHAN TARIKH --}}
|
||||
<div class="pb-4">
|
||||
<label class="font-semibold text-gray-700 block pb-1">
|
||||
Pilihan Tarikh
|
||||
</label>
|
||||
|
||||
<div class="flex items-center space-x-6 mb-3">
|
||||
<label class="flex items-center">
|
||||
<input type="radio" name="dateOption" value="manual" checked class="mr-2">
|
||||
Pilih Tarikh
|
||||
</label>
|
||||
|
||||
<label class="flex items-center">
|
||||
<input type="radio" name="dateOption" value="current" class="mr-2">
|
||||
Tarikh Semasa (Hari Ini)
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<label class="font-semibold text-gray-700 block pb-1">
|
||||
Tarikh
|
||||
</label>
|
||||
|
||||
<div class="flex">
|
||||
<span
|
||||
class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap"
|
||||
style="background-color: rgb(249, 250, 251);">Mula</span>
|
||||
<input id="stock_audit_monthYear" name="monthYear" value=""
|
||||
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
||||
class="text-gray-600 border border-2 rounded-l px-4 py-2"
|
||||
style="background-color: rgb(249, 250, 251);">
|
||||
Pilih
|
||||
</span>
|
||||
|
||||
<input type="date"
|
||||
id="stock_audit_monthYear"
|
||||
name="monthYear"
|
||||
value=""
|
||||
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80 mr-2">
|
||||
|
||||
<div class="hidden">
|
||||
<input type="radio" name="generateType" id="generateTypePdf"
|
||||
value="pdf">
|
||||
<input type="radio" name="generateType" id="generateTypeExcel"
|
||||
value="excel">
|
||||
<input type="radio" name="generateType" id="generateTypePdf" value="pdf">
|
||||
<input type="radio" name="generateType" id="generateTypeExcel" value="excel">
|
||||
</div>
|
||||
<button id="generateExcel"
|
||||
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 ml-5"
|
||||
class="border border-yellow-600 text-yellow-600 py-2 px-8 rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300 ml-5"
|
||||
type="button">
|
||||
<i class="fas fa-file-excel mr-2"></i>Excel
|
||||
</button>
|
||||
<button id="generatePdf"
|
||||
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 ml-5"
|
||||
class="border border-yellow-600 text-yellow-600 py-2 px-8 rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300 ml-5"
|
||||
type="button">
|
||||
<i class="fas fa-eye mr-2"></i>View
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div kodcaw="operasi">
|
||||
<div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div>
|
||||
<div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div>
|
||||
<div class="flex justify-between mb-2">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
@@ -90,30 +104,58 @@
|
||||
|
||||
@push('additional_scripts')
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function(event) {
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
|
||||
let form = document.querySelector('#formStokAudit')
|
||||
let form = document.querySelector('#formStokAudit');
|
||||
|
||||
document.querySelector('button#generatePdf').addEventListener("click", function(event) {
|
||||
// ===== BUTTON PDF =====
|
||||
document.querySelector('#generatePdf').addEventListener("click", function() {
|
||||
document.querySelector('#generateTypePdf').checked = true;
|
||||
form.submit();
|
||||
})
|
||||
});
|
||||
|
||||
document.querySelector('button#generateExcel').addEventListener("click", function(event) {
|
||||
// ===== BUTTON EXCEL =====
|
||||
document.querySelector('#generateExcel').addEventListener("click", function() {
|
||||
document.querySelector('#generateTypeExcel').checked = true;
|
||||
form.submit();
|
||||
})
|
||||
});
|
||||
|
||||
// ===== TARIKH OPTION =====
|
||||
const dateInput = document.getElementById('stock_audit_monthYear');
|
||||
const dateOptions = document.querySelectorAll('input[name="dateOption"]');
|
||||
|
||||
dateOptions.forEach(option => {
|
||||
option.addEventListener('change', function () {
|
||||
|
||||
if (this.value === 'current') {
|
||||
|
||||
let today = new Date();
|
||||
let day = String(today.getDate()).padStart(2, '0');
|
||||
let month = String(today.getMonth() + 1).padStart(2, '0');
|
||||
let year = today.getFullYear();
|
||||
|
||||
dateInput.value = year + '-' + month + '-' + day;
|
||||
|
||||
// Ganti readOnly dengan disable
|
||||
dateInput.disabled = true;
|
||||
|
||||
} else {
|
||||
dateInput.disabled = false;
|
||||
dateInput.value = '';
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// ===== AUTO HIDE ERROR =====
|
||||
const errorAlert = document.getElementById("error-alert");
|
||||
|
||||
if (errorAlert) {
|
||||
|
||||
setTimeout(function() {
|
||||
errorAlert.classList.add = "opacity-0";
|
||||
errorAlert.classList.add("opacity-0");
|
||||
setTimeout(function() {
|
||||
errorAlert.style.display = "none";
|
||||
}, 500)
|
||||
}, 5000); // 5000 milliseconds = 5 seconds
|
||||
}, 500);
|
||||
}, 5000);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="9" style="font-weight:bold; font-size:16px; text-align:center;">
|
||||
LAPORAN RUMUSAN WTD
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9" style="text-align:center;">
|
||||
Cawangan : {{ $branch['details_caw'] ?? '-' }} ({{ $branch['kodcaw'] ?? '-' }})
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9" style="text-align:center;">
|
||||
Tarikh : {{ $startDate }} hingga {{ $endDate }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9" style="text-align:center;">
|
||||
Tarikh Dijana : {{ $generatedAt }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<table border="1">
|
||||
<thead>
|
||||
<tr style="font-weight:bold; background:#f3f3f3;">
|
||||
<th>Bil</th>
|
||||
<th>Batch WTD</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>No KP</th>
|
||||
<th>Nama</th>
|
||||
<th>Tarikh Proses</th>
|
||||
<th>Jumlah (RM)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@php
|
||||
$bil = 1;
|
||||
$sum_baki = 0;
|
||||
$jumlah = 0;
|
||||
@endphp
|
||||
|
||||
@foreach ($details as $item)
|
||||
|
||||
@php
|
||||
$jumlah = $item['jumlah'];
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
<td>{{ $bil++ }}</td>
|
||||
<td>{{ $item['batchno'] ?? 0 }}</td>
|
||||
<td>{{ $item['norujukan'] ?? null }}</td>
|
||||
<td>{{ $item['nokp'] ?? null }}</td>
|
||||
<td>{{ $item['nama_cust'] ?? null }}</td>
|
||||
<td>{{ $item['t_proses'] ?? null }}</td>
|
||||
<td>{{ number_format($jumlah, 2) }}</td>
|
||||
</tr>
|
||||
@php
|
||||
$sum_baki += $item['jumlah'];
|
||||
@endphp
|
||||
@endforeach
|
||||
|
||||
|
||||
<tr>
|
||||
<td colspan="6" style="font-weight:bold; background:#eee;">
|
||||
JUMLAH KESELURUHAN
|
||||
</td>
|
||||
<td style="font-weight:bold;">
|
||||
{{ number_format($sum_baki, 2) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="bg-gray-900 opacity-50 hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
|
||||
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
|
||||
<main>
|
||||
|
||||
<div class="pt-6 px-4">
|
||||
|
||||
<breadcrumb
|
||||
:items="[{ 'title': 'Laporan Keseluruhan', 'icon': 'fas fa-users', 'url': '{{ route('reports') }}' },
|
||||
{ 'title': 'WTD', 'icon': 'fas fa-users' }
|
||||
]">
|
||||
</breadcrumb>
|
||||
|
||||
<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"><a href="/reports"
|
||||
class="router-link-active"><i class="fas fa-backspace text-white"></i></a> <span
|
||||
class="text-center mx-auto text-white font-bold">Laporan Selesai WTD</span>
|
||||
</div>
|
||||
<form method="get" id="formwtd" action="{{ route('reports.summary-wtd.index') }}">
|
||||
<div class="rounded bg-white shadow p-6">
|
||||
<div class="pb-6"><label for="username"
|
||||
class="font-semibold text-gray-700 block pb-1">Tarikh</label>
|
||||
<div class="flex">
|
||||
<span
|
||||
class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap"
|
||||
style="background-color: rgb(249, 250, 251);">Mula</span>
|
||||
<input id="tarikhmula" name="startDate" type="date"
|
||||
value="{{ request()->startDate ?? $startDate }}"
|
||||
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
||||
<span
|
||||
class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap"
|
||||
style="background-color: rgb(249, 250, 251);">Hingga</span>
|
||||
<input id="tarikhhingga" name="endDate" type="date"
|
||||
value="{{ request()->endDate ?? $endDate }}"
|
||||
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
||||
<button
|
||||
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 ml-5">
|
||||
<i class="fas fa-magnifying-glass mr-2"></i>Search
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div kodcaw="operasi">
|
||||
<div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div>
|
||||
<div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div>
|
||||
<div class="flex justify-between mb-2">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<table class="min-w-full leading-normal">
|
||||
<thead class="text-center">
|
||||
<tr>
|
||||
<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">
|
||||
No
|
||||
</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">
|
||||
Kod 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">
|
||||
Cawangan
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-center text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Jumlah Surat
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-center text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Jumlah WTD Dihantar
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-center text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Action
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@php
|
||||
$totalsag = 0; // jumlah semua surat
|
||||
$totalbaki = 0;
|
||||
@endphp
|
||||
|
||||
<tbody>
|
||||
|
||||
@forelse ($summarywtd ?? [] as $wtd)
|
||||
@php
|
||||
// Jumlah semua surat
|
||||
$totalsag += $wtd['jumlah_surat'] ?? 0;
|
||||
$totalbaki += $wtd['sum_baki'] ?? 0;
|
||||
@endphp
|
||||
<tr>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $loop->iteration }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $wtd['kodcaw'] }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $wtd['details_caw'] }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3 text-right">{{ $wtd['jumlah_surat'] }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3 text-right">{{ number_format($wtd['sum_baki'], 2) }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3 text-center">
|
||||
<a href="{{ route('reports.wtd.cawangan.excel', [$wtd['kodcaw'], 'startDate' => request()->startDate, 'endDate' => request()->endDate]) }}"
|
||||
target="_blank" rel="noopener noreferrer"
|
||||
class="border border-blue-600 text-blue-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-blue-600 hover:text-white transition-all duration-300">
|
||||
<i class="fas fa-download mr-2"></i>Download
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="11"
|
||||
class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-center">
|
||||
Data not available
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
|
||||
<tr>
|
||||
<td colspan="3" class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
Jumlah Keseluruhan
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-right">
|
||||
{{ $totalsag }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-right">
|
||||
{{ number_format($totalbaki, 2) }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-right"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
</div>
|
||||
@endsection
|
||||
@@ -440,14 +440,13 @@ hr.new5 {
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td colspan="3">DiSemak </td>
|
||||
<td></td>
|
||||
<td colspan="3"> Cagaran Di Keluarkan</td>
|
||||
<td></td>
|
||||
<td colspan="3">Cagaran Diterima </td>
|
||||
<td></td>
|
||||
<td colspan="3"> Ar-Rahn <br> <b>{{ Auth::user()->name }}</b></td>
|
||||
|
||||
<td colspan="3">DiSemak </td>
|
||||
<td></td>
|
||||
<td colspan="3"> Cagaran Di Keluarkan</td>
|
||||
<td></td>
|
||||
<td colspan="3">Cagaran Diterima </td>
|
||||
<td></td>
|
||||
<td colspan="3"> Ar-Rahn <br> <b>{{ optional(Auth::user())->name ?? '' }}</b></td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
@@ -549,7 +548,7 @@ hr.new5 {
|
||||
<td></td>
|
||||
<td colspan="3">Cagaran Diterima </td>
|
||||
<td></td>
|
||||
<td colspan="3"> Ar-Rahn <br> <b>{{ Auth::user()->name }}</b></td>
|
||||
<td colspan="3"> Ar-Rahn <br> <b>{{ optional(Auth::user())->name ?? '' }}</b></td>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
@@ -0,0 +1,702 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
window.print();
|
||||
window.onfocus = function() {
|
||||
window.close();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<style>
|
||||
/* Red border */
|
||||
hr.new1 {
|
||||
border-top: 1px solid red;
|
||||
}
|
||||
|
||||
/* Dashed red border */
|
||||
hr.new2 {
|
||||
border-top: 1px dashed red;
|
||||
}
|
||||
|
||||
/* Dotted red border */
|
||||
hr.new3 {
|
||||
border-top: 1px dotted red;
|
||||
}
|
||||
|
||||
/* Thick red border */
|
||||
hr.new4 {
|
||||
border: 1px solid red;
|
||||
}
|
||||
|
||||
/* Large rounded green border */
|
||||
hr.new5 {
|
||||
border: 10px solid green;
|
||||
border-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
#cust {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 20%;
|
||||
font-size: 12px;
|
||||
border: 1px solid black;
|
||||
|
||||
}
|
||||
|
||||
#cust td,
|
||||
#cust th {
|
||||
border: 0px solid;
|
||||
padding: 3px;
|
||||
font-size: 10px;
|
||||
text-align: right;
|
||||
|
||||
}
|
||||
|
||||
#cust tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#cust tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#cust th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: right;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#cust {
|
||||
margin-left: auto;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
hr.new1 {
|
||||
border-top: 1px dotted black;
|
||||
}
|
||||
|
||||
.khazanah {
|
||||
border: 1px solid black;
|
||||
margin-left: 20px;
|
||||
padding: 10px;
|
||||
width: 250px;
|
||||
transform: rotate(-90deg);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#inside {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
#inside td,
|
||||
#inside th {
|
||||
border: none;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#inside tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#inside tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#inside th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 10px;
|
||||
text-align: left;
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#semakan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
margin-top: 40px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#semakan td,
|
||||
#semakan th {
|
||||
border: none;
|
||||
padding: 2px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#semakan tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#semakan tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#semakan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 10px;
|
||||
text-align: left;
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#salinan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#salinan td,
|
||||
#salinan th {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
|
||||
#salinan tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#salinan tr:hover {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#salinan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 10px;
|
||||
text-align: right;
|
||||
background-color: #ffffff;
|
||||
color: black;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#perjanjian {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
font-size: 12px;
|
||||
|
||||
}
|
||||
|
||||
#perjanjian td,
|
||||
#perjanjian th {
|
||||
border: 1px solid #ddd;
|
||||
padding: 2px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
#perjanjian tr:nth-child(even) {
|
||||
background-color: #ffffff
|
||||
}
|
||||
|
||||
#perjanjian tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#perjanjian th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: center;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#keuntungan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
font-size: 12px;
|
||||
|
||||
}
|
||||
|
||||
#keuntungan td,
|
||||
#keuntungan th {
|
||||
border: 1px solid #ddd;
|
||||
padding: 2px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
#keuntungan tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#keuntungan tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#keuntungan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: center;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#payment {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 90%;
|
||||
font-size: 13px;
|
||||
border: 1px solid black;
|
||||
|
||||
}
|
||||
|
||||
#payment td,
|
||||
#payment th {
|
||||
border: 0px solid;
|
||||
padding: 3px;
|
||||
font-size: 15px;
|
||||
text-align: left;
|
||||
|
||||
}
|
||||
|
||||
#payment tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#payment tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#payment th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#payment {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
#akuan td,
|
||||
#akuan th {
|
||||
padding: 7px;
|
||||
font-size: 10px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
#akuan tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#akuan tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#akuan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: center;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.page-break {
|
||||
page-break-before: always;
|
||||
}
|
||||
|
||||
.formula {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#copy_cust {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 10%;
|
||||
font-size: 12px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#copy_cust tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#copy_cust tr:hover {
|
||||
background-color: #ffffff
|
||||
}
|
||||
|
||||
#copy_cust th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: center;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
|
||||
#copy_cust {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 50%;
|
||||
font-size: 12px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#copy_cust td,
|
||||
#copy_cust th {
|
||||
border: 1px solid #ddd;
|
||||
padding: 2px;
|
||||
font-size: 9px;
|
||||
text-align: right;
|
||||
width: 10%;
|
||||
|
||||
}
|
||||
|
||||
#copy_cust {
|
||||
margin-right: 0px;
|
||||
margin-left: auto
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#inside tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#inside tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#inside th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: center;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.header-style {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center
|
||||
}
|
||||
|
||||
.header-style span {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
text-align: right;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 2px;
|
||||
font-size: 10px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
.receipt-type-style {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
height: 100%;
|
||||
width:40px;
|
||||
display:flex;
|
||||
justify-content:center;
|
||||
align-items:end;
|
||||
font-size: 45px;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
<div class="header-style">
|
||||
<!-- Logo Section -->
|
||||
<div style="display: flex; align-items: center;">
|
||||
<img src="{{ asset('img/pkb.png') }}" style="width: 80px; margin-right: 10px;" alt="KOPKB Logo" class="center">
|
||||
<img src="{{ asset('img/ARRAHN1.png') }}" style="width: 50px;" alt="ARRAHN Logo" class="center">
|
||||
</div>
|
||||
|
||||
<!-- Cawangan Info -->
|
||||
<div style="display: flex; align-items: center; margin-top: 10px;">
|
||||
<span style="color: #0a0b0b; font-weight: bold;">
|
||||
<strong>{{ $cawangan_info["details_caw"] }}</strong>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Notice Section -->
|
||||
<div style="margin-top: 10px;">
|
||||
<span><strong>UNTUK KEGUNAAN PELANGGAN</strong></span>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div style="position: relative">
|
||||
<div class="receipt-type-style">A</div>
|
||||
<table id="inside">
|
||||
|
||||
<tr>
|
||||
<td colspan="3">Nama</td>
|
||||
<td>: {{ $customers_info['nama'] }} </td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td><b> No SAG</b></td>
|
||||
<td>: <b style="font-size:15px">{{ $transaction['norujukan'] }}</b> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">No K/P </td>
|
||||
<td>: @php
|
||||
if ($customers_info['kpbaru'] == '') {
|
||||
echo $customers_info['kplama'];
|
||||
} else {
|
||||
echo $customers_info['kpbaru'];
|
||||
}
|
||||
@endphp </td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> Tarikh Bayar</td>
|
||||
<td>: @php
|
||||
$time = new DateTime($transaction['created_at']);
|
||||
$date = $time->format('d/m/Y');
|
||||
echo $date;
|
||||
@endphp</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>Masa Bayaran</td>
|
||||
@php
|
||||
$masa_bayaran = strtotime($transaction['tarikh_bayaran']);
|
||||
$masa = date('H:i:s', $masa_bayaran);
|
||||
@endphp
|
||||
<td>: {{ $masa }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<table id="payment" style="width: 60%">
|
||||
<tr>
|
||||
<td>Ansuran Pembiayaan</td>
|
||||
<td>: RM {{ number_format($transaction['bayaran_pembiayaan'], 2) }} </td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Keuntungan</td>
|
||||
<td>: RM {{ number_format($transaction['onepercent'], 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lain-Lain Caj</td>
|
||||
<td>: RM {{ number_format($transaction['ujrah'], 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 17px"><strong>Jumlah Bayaran</strong></td>
|
||||
@php
|
||||
$jumlah_perlu_dibayar = $transaction['bayaran_pembiayaan'] + $transaction['bayaran_keuntungan'] + $transaction['ujrah'];
|
||||
@endphp
|
||||
<td><strong>: RM {{ number_format($transaction['duit_masuk'], 2) }}</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
{{-- <table id="payment" style="border: none; margin-top:20px; width: 60%">
|
||||
<tr>
|
||||
<td>Marhun: {{ $gadai['marhun'] }}</td>
|
||||
</tr>
|
||||
</table> --}}
|
||||
<br>
|
||||
<table id="semakan">
|
||||
<tr>
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td colspan="9"></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td colspan="3">Pelanggan</td>
|
||||
<td colspan="9"></td>
|
||||
<td colspan="3">Teller</td>
|
||||
</tr>
|
||||
{{-- <tr>
|
||||
<td colspan="3">{{ $customers_info['nama'] }}</td>
|
||||
<td colspan="9"></td>
|
||||
<td colspan="3">{{ Auth::user()->name }}</td>
|
||||
</tr> --}}
|
||||
</table>
|
||||
<hr class="new2">
|
||||
</hr>
|
||||
</table>
|
||||
<div class="header-style">
|
||||
<div style="display: flex; align-items:center">
|
||||
<img src="{{ asset('img/pkb.png') }}" style="width:80px; margin-right: 10px" alt="User Image"class="center">
|
||||
<img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center">
|
||||
</div>
|
||||
<div style="display: flex; align-items: center;">
|
||||
<span style="color: #0a0b0b; font-weight: bold;">
|
||||
<strong>{{ $cawangan_info["details_caw"] }} (arOS V2)</strong>
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span><strong>UNTUK KEGUNAAN PEJABAT</strong></span>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div style="position: relative">
|
||||
<div class="receipt-type-style">A</div>
|
||||
<table id="inside">
|
||||
|
||||
<tr>
|
||||
<td colspan="3">Nama</td>
|
||||
<td>: {{ $customers_info['nama'] }} </td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td><b> No SAG</b></td>
|
||||
<td>: <b style="font-size:15px">{{ $transaction['norujukan'] }}</b> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">No K/P </td>
|
||||
<td>: @php
|
||||
if ($customers_info['kpbaru'] == '') {
|
||||
echo $customers_info['kplama'];
|
||||
} else {
|
||||
echo $customers_info['kpbaru'];
|
||||
}
|
||||
@endphp </td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> Tarikh Bayar</td>
|
||||
<td>: @php
|
||||
$time = new DateTime($transaction['created_at']);
|
||||
$date = $time->format('d/m/Y');
|
||||
echo $date;
|
||||
@endphp</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="7"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>Masa Bayaran</td>
|
||||
@php
|
||||
$masa_bayaran = strtotime($transaction['tarikh_bayaran']);
|
||||
$masa = date('H:i:s', $masa_bayaran);
|
||||
@endphp
|
||||
<td>: {{ $masa }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<table id="payment" style="width: 60%">
|
||||
<tr>
|
||||
<td>Ansuran Pembiayaan</td>
|
||||
<td>: RM {{ number_format($transaction['bayaran_pembiayaan'], 2) }} </td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Keuntungan</td>
|
||||
<td>: RM {{ number_format($transaction['onepercent'], 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lain-Lain Caj</td>
|
||||
<td>: RM {{ number_format($transaction['ujrah'], 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 17px"><strong>Jumlah Bayaran</strong></td>
|
||||
@php
|
||||
$jumlah_perlu_dibayar = $transaction['bayaran_pembiayaan'] + $transaction['bayaran_keuntungan'] + $transaction['ujrah'];
|
||||
@endphp
|
||||
<td><strong>: RM {{ number_format($transaction['duit_masuk'], 2) }}</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
{{-- <table id="payment" style="border: none; margin-top:20px; width: 60%">
|
||||
<tr>
|
||||
<td>Marhun: {{ $gadai['marhun'] }}</td>
|
||||
</tr>
|
||||
</table> --}}
|
||||
<br>
|
||||
<table id="semakan">
|
||||
<tr>
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td colspan="9"></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td colspan="3">Pelanggan</td>
|
||||
<td colspan="9"></td>
|
||||
<td colspan="3">Teller</td>
|
||||
</tr>
|
||||
{{-- <tr>
|
||||
<td colspan="3">{{ $customers_info['nama'] }}</td>
|
||||
<td colspan="9"></td>
|
||||
<td colspan="3">{{ Auth::user()->name }}</td>
|
||||
</tr> --}}
|
||||
</table>
|
||||
<table id="inside" style="width: 45%; margin-top:20px">
|
||||
<tr>
|
||||
<td>Duit Pelanggan</td>
|
||||
<td>: RM {{ number_format($transaction['duitpelanggan'], 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jumlah Perlu Dibayar</td>
|
||||
<td>: RM {{ number_format($transaction['duit_masuk'], 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Baki</td>
|
||||
<td>: RM {{ number_format($transaction['bakipelanggan'], 2) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="semakan">
|
||||
<tr style="visibility: hidden">
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
@@ -473,7 +473,7 @@ hr.new5 {
|
||||
<td></td>
|
||||
<td colspan="3">Cagaran Diterima </td>
|
||||
<td></td>
|
||||
<td colspan="3"> Ar-Rahn <br> <b>{{ Auth::user()->name }}</b></td>
|
||||
<td colspan="3">Ar-Rahn <br> <b>{{ optional(Auth::user())->name ?? '' }}</b></td>
|
||||
|
||||
|
||||
</tr>
|
||||
@@ -575,7 +575,7 @@ hr.new5 {
|
||||
<td></td>
|
||||
<td colspan="3">Cagaran Diterima </td>
|
||||
<td></td>
|
||||
<td colspan="3"> Ar-Rahn <br> <b>{{ Auth::user()->name }}</b></td>
|
||||
<td colspan="3"> Ar-Rahn <br> <b>{{ optional(Auth::user())->name ?? '' }}</b></td>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
@@ -0,0 +1,947 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
window.print();
|
||||
window.onfocus = function() {
|
||||
window.close();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<style>
|
||||
/* Red border */
|
||||
hr.new1 {
|
||||
border-top: 1px solid red;
|
||||
}
|
||||
|
||||
/* Dashed red border */
|
||||
hr.new2 {
|
||||
border-top: 1px dashed red;
|
||||
}
|
||||
|
||||
/* Dotted red border */
|
||||
hr.new3 {
|
||||
border-top: 1px dotted red;
|
||||
}
|
||||
|
||||
/* Thick red border */
|
||||
hr.new4 {
|
||||
border: 1px solid red;
|
||||
}
|
||||
|
||||
/* Large rounded green border */
|
||||
hr.new5 {
|
||||
border: 10px solid green;
|
||||
border-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
#cust {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 20%;
|
||||
font-size: 12px;
|
||||
border: 1px solid black;
|
||||
|
||||
}
|
||||
|
||||
#cust td,
|
||||
#cust th {
|
||||
border: 0px solid;
|
||||
padding: 3px;
|
||||
font-size: 10px;
|
||||
text-align: right;
|
||||
|
||||
}
|
||||
|
||||
#cust tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#cust tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#cust th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: right;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#cust {
|
||||
margin-left: auto;
|
||||
margin-right: 0;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
hr.new1 {
|
||||
border-top: 1px dotted black;
|
||||
}
|
||||
|
||||
.khazanah {
|
||||
border: 1px solid black;
|
||||
margin-left: 20px;
|
||||
padding: 10px;
|
||||
width: 250px;
|
||||
transform: rotate(-90deg);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#inside {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
#inside td,
|
||||
#inside th {
|
||||
border: none;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#inside tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#inside tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#inside th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 10px;
|
||||
text-align: left;
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#semakan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
margin-top: 40px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#semakan td,
|
||||
#semakan th {
|
||||
border: none;
|
||||
padding: 2px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#semakan tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#semakan tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#semakan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 10px;
|
||||
text-align: left;
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#salinan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#salinan td,
|
||||
#salinan th {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
|
||||
#salinan tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#salinan tr:hover {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#salinan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 10px;
|
||||
text-align: right;
|
||||
background-color: #ffffff;
|
||||
color: black;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#perjanjian {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
font-size: 12px;
|
||||
|
||||
}
|
||||
|
||||
#perjanjian td,
|
||||
#perjanjian th {
|
||||
border: 1px solid #ddd;
|
||||
padding: 2px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
#perjanjian tr:nth-child(even) {
|
||||
background-color: #ffffff
|
||||
}
|
||||
|
||||
#perjanjian tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#perjanjian th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: center;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#keuntungan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
font-size: 12px;
|
||||
|
||||
}
|
||||
|
||||
#keuntungan td,
|
||||
#keuntungan th {
|
||||
border: 1px solid #ddd;
|
||||
padding: 2px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
#keuntungan tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#keuntungan tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#keuntungan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: center;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#payment {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 60%;
|
||||
font-size: 12px;
|
||||
border: 1px solid black;
|
||||
|
||||
}
|
||||
|
||||
#payment td,
|
||||
#payment th {
|
||||
border: 0px solid;
|
||||
padding: 3px;
|
||||
font-size: 15px;
|
||||
text-align: left;
|
||||
|
||||
}
|
||||
|
||||
#payment tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#payment tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#payment th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#payment {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
#akuan td,
|
||||
#akuan th {
|
||||
padding: 7px;
|
||||
font-size: 10px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
#akuan tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#akuan tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#akuan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: center;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.page-break {
|
||||
page-break-before: always;
|
||||
}
|
||||
|
||||
.formula {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#copy_cust {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 10%;
|
||||
font-size: 12px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#copy_cust tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#copy_cust tr:hover {
|
||||
background-color: #ffffff
|
||||
}
|
||||
|
||||
#copy_cust th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: center;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
|
||||
#copy_cust {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 50%;
|
||||
font-size: 12px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#copy_cust td,
|
||||
#copy_cust th {
|
||||
border: 1px solid #ddd;
|
||||
padding: 2px;
|
||||
font-size: 10px;
|
||||
text-align: right;
|
||||
width: 10%;
|
||||
|
||||
}
|
||||
|
||||
#copy_cust {
|
||||
margin-right: 0px;
|
||||
margin-left: auto
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#inside tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
#inside tr:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#inside th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: center;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.header-style {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center
|
||||
}
|
||||
|
||||
.header-style span {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
text-align: right;
|
||||
background-color: #d9deda;
|
||||
color: black;
|
||||
padding: 2px;
|
||||
font-size: 10px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
.center-table-style-border {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
border: 1px solid black
|
||||
}
|
||||
|
||||
.center-table-style {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.receipt-type-style {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
height: 100%;
|
||||
width: 40px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: end;
|
||||
font-size: 45px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.custom-table-right {
|
||||
border: none !important;
|
||||
border-left: 1px solid !important;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.vertical-baseline {
|
||||
vertical-align: baseline !important;
|
||||
}
|
||||
</style>
|
||||
<div class="header-style">
|
||||
<!-- Logo Section -->
|
||||
<div style="display: flex; align-items: center;">
|
||||
<img src="{{ asset('img/pkb.png') }}" style="width: 80px; margin-right: 10px;" alt="KOPKB Logo" class="center">
|
||||
<img src="{{ asset('img/ARRAHN1.png') }}" style="width: 50px;" alt="ARRAHN Logo" class="center">
|
||||
</div>
|
||||
|
||||
<!-- Cawangan Info -->
|
||||
<div style="display: flex; align-items: center; margin-top: 10px;">
|
||||
<span style="color: #0a0b0b; font-weight: bold;">
|
||||
<strong>{{ $cawangan_info["details_caw"] }}</strong>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Notice Section -->
|
||||
<div style="margin-top: 10px;">
|
||||
<span><strong>UNTUK KEGUNAAN PELANGGAN</strong></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div style="position: relative">
|
||||
<div class="receipt-type-style">T</div>
|
||||
<table id="inside">
|
||||
|
||||
@if (sizeof($wakil) != 0)
|
||||
<tr>
|
||||
<td colspan="3">Nama Wakil</td>
|
||||
<td class="text-center vertical-baseline">:</td>
|
||||
<td class="vertical-baseline">{{ $wakil['nama'] }}</td>
|
||||
<td colspan="2"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> <b>No SAG</b></td>
|
||||
<td>: <b>{{ $gadai['norujukan'] }}</b> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">No K/P Wakil</td>
|
||||
<td class="text-center vertical-baseline">:</td>
|
||||
<td>{{ $wakil['nokp'] }}</td>
|
||||
<td colspan="2"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> Tarikh Bayar</td>
|
||||
<td>: @php
|
||||
$time = new DateTime($penebusan['t_tebus']);
|
||||
$date = $time->format('d/m/Y');
|
||||
echo $date;
|
||||
@endphp</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">No Telefon</td>
|
||||
<td class="text-center vertical-baseline">:</td>
|
||||
<td>{{ $wakil['telefon'] }}</td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td>Masa Bayaran </td>
|
||||
@php
|
||||
$masa_bayaran = strtotime($transaction_tebus['tarikh_bayaran']);
|
||||
$masa = date('H:i:s', $masa_bayaran);
|
||||
@endphp
|
||||
<td>: {{ $masa }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="vertical-baseline">Alamat </td>
|
||||
<td class="text-center vertical-baseline">:</td>
|
||||
<td style="max-width: 180px">{{ $wakil['alamat1'] }}</td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td class="vertical-baseline">Tempoh Simpan</td>
|
||||
<td class="vertical-baseline">: {{ $gadai['tempoh'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">No Wakil</td>
|
||||
<td class="text-center vertical-baseline">:</td>
|
||||
<td>{{ sizeof($surat_wakil) == 0 ? '-' : $surat_wakil['no_surat'] }}</td>
|
||||
<td colspan="7"> </td>
|
||||
</tr>
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="3">Nama</td>
|
||||
<td>: {{ $customers_info['nama'] }} </td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td><strong>No SAG</strong></td>
|
||||
<td>: <strong>{{ $gadai['norujukan'] }}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">No K/P </td>
|
||||
<td>: @php
|
||||
if ($customers_info['kpbaru'] == '') {
|
||||
echo $customers_info['kplama'];
|
||||
} else {
|
||||
echo $customers_info['kpbaru'];
|
||||
}
|
||||
@endphp</td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> Tarikh Bayar</td>
|
||||
<td>: @php
|
||||
$time = new DateTime($penebusan['t_tebus']);
|
||||
$date = $time->format('d/m/Y');
|
||||
echo $date;
|
||||
@endphp</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="7"></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>Masa Bayaran</td>
|
||||
@php
|
||||
$masa_bayaran = strtotime($transaction_tebus['tarikh_bayaran']);
|
||||
$masa = date('H:i:s', $masa_bayaran);
|
||||
@endphp
|
||||
<td>: {{ $masa }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="7"></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>Tempoh Simpan</td>
|
||||
<td>: {{ $gadai['tempoh'] }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="{{ sizeof($wakil) != 0 ? 'center-table-style-border' : 'center-table-style' }}" style="margin-top: 10px">
|
||||
@if (sizeof($wakil) != 0)
|
||||
<table id="payment" style="border: none; height: fit-content">
|
||||
<tr>
|
||||
<td colspan="3">Maklumat Pelanggan</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:75px" class="vertical-baseline">Nama</td>
|
||||
<td style="width: 1px" class="text-center vertical-baseline">:</td>
|
||||
<td style="">{{ $customers_info['nama'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:75px" class="vertical-baseline">No K/P</td>
|
||||
<td style="width: 1px" class="text-center vertical-baseline">:</td>
|
||||
<td>
|
||||
@php
|
||||
if ($customers_info['kpbaru'] == '') {
|
||||
echo $customers_info['kplama'];
|
||||
} else {
|
||||
echo $customers_info['kpbaru'];
|
||||
}
|
||||
@endphp
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
<table id="payment" class="{{ sizeof($wakil) != 0 ? 'custom-table-right' : '' }}">
|
||||
<tr>
|
||||
<td style="width:10px">Baki Pembiayaan</td>
|
||||
<td style="width:10px">: RM {{ number_format($gadai['bakipjm'], 2) }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px">Keuntungan</td>
|
||||
<td style="width:10px">: RM {{ number_format($transaction_tebus['onepercent'], 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px">(-) Rebat Untung</td>
|
||||
<td style="width:10px">: RM
|
||||
{{ number_format($totalrebate['onepercent'], 2) }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px">Lain-Lain Caj</td>
|
||||
<td style="width:10px">: RM {{ number_format($transaction_tebus['ujrah'], 2) }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px">(-) Rebat Lain-Lain Caj</td>
|
||||
<td style="width:10px">: RM
|
||||
{{ number_format($totalrebate['ujrah'], 2) }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:17px"><strong>Jumlah Bayaran</strong></td>
|
||||
<td style="font-size: 17px"><strong>: RM
|
||||
{{ number_format($transaction_tebus['duit_masuk'], 2) }}</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<table id="payment" style="border: none; margin-top:10px; width: 60%">
|
||||
<tr>
|
||||
<td>Marhun: {{ $gadai['marhun'] }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="semakan">
|
||||
<tr>
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Teller</td>
|
||||
<td></td>
|
||||
<td colspan="3">{{ sizeof($wakil) != 0 ? 'Wakil' : 'Pelanggan' }}</td>
|
||||
<td></td>
|
||||
<td colspan="3">Khazanah</td>
|
||||
|
||||
</tr>
|
||||
{{-- <tr> --}}
|
||||
{{-- <td colspan="3">{{ Auth::user()->name }}</td> --}}
|
||||
|
||||
{{-- <td></td> --}}
|
||||
{{-- <td colspan="3">{{ sizeof($wakil) != 0 ? $wakil['nama'] : $customers_info['nama'] }}</td> --}}
|
||||
{{-- <td></td> --}}
|
||||
{{-- <td colspan="3"> {{ $khazanah_user->name }}</td> --}} {{-- <td colspan="3">{{ $khazanah_user->name ?? '' }}</td> --}}
|
||||
{{-- </tr> --}}
|
||||
</table>
|
||||
<hr class="new2">
|
||||
|
||||
</table>
|
||||
|
||||
<div class="header-style">
|
||||
<div style="display: flex; align-items:center">
|
||||
<img src="{{ asset('img/pkb.png') }}" style="width:80px; margin-right: 10px" alt="User Image"class="center">
|
||||
<img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center">
|
||||
</div>
|
||||
<div style="display: flex; align-items: center;">
|
||||
<span style="color: #0a0b0b; font-weight: bold;">
|
||||
<strong>{{ $cawangan_info["details_caw"] }} (arOS V2)</strong>
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span><strong>UNTUK KEGUNAAN PEJABAT</strong></span>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div style="position: relative">
|
||||
<div class="receipt-type-style">T</div>
|
||||
<table id="inside">
|
||||
|
||||
@if (sizeof($wakil) != 0)
|
||||
<tr>
|
||||
<td colspan="3">Nama Wakil</td>
|
||||
<td class="text-center vertical-baseline">:</td>
|
||||
<td class="vertical-baseline">{{ $wakil['nama'] }}</td>
|
||||
<td colspan="2"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> <b>No SAG</b></td>
|
||||
<td>: <b>{{ $gadai['norujukan'] }}</b> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">No K/P Wakil</td>
|
||||
<td class="text-center vertical-baseline">:</td>
|
||||
<td>{{ $wakil['nokp'] }}</td>
|
||||
<td colspan="2"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> Tarikh Bayar</td>
|
||||
<td>: @php
|
||||
$time = new DateTime($penebusan['t_tebus']);
|
||||
$date = $time->format('d/m/Y');
|
||||
echo $date;
|
||||
@endphp</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">No Telefon</td>
|
||||
<td class="text-center vertical-baseline">:</td>
|
||||
<td>{{ $wakil['telefon'] }}</td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td>Masa Bayaran </td>
|
||||
@php
|
||||
$masa_bayaran = strtotime($transaction_tebus['tarikh_bayaran']);
|
||||
$masa = date('H:i:s', $masa_bayaran);
|
||||
@endphp
|
||||
<td>: {{ $masa }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="vertical-baseline">Alamat </td>
|
||||
<td class="text-center vertical-baseline">:</td>
|
||||
<td style="max-width: 180px">{{ $wakil['alamat1'] }}</td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td class="vertical-baseline">Tempoh Simpan</td>
|
||||
<td class="vertical-baseline">: {{ $gadai['tempoh'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">No Wakil</td>
|
||||
<td class="text-center vertical-baseline">:</td>
|
||||
<td>{{ sizeof($surat_wakil) == 0 ? '-' : $surat_wakil['no_surat'] }}</td>
|
||||
<td colspan="7"> </td>
|
||||
</tr>
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="3">Nama</td>
|
||||
<td>: {{ $customers_info['nama'] }} </td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td><strong>No SAG</strong></td>
|
||||
<td>: <strong>{{ $gadai['norujukan'] }}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">No K/P </td>
|
||||
<td>: @php
|
||||
if ($customers_info['kpbaru'] == '') {
|
||||
echo $customers_info['kplama'];
|
||||
} else {
|
||||
echo $customers_info['kpbaru'];
|
||||
}
|
||||
@endphp</td>
|
||||
<td colspan="3"> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> Tarikh Bayar</td>
|
||||
<td>: @php
|
||||
$time = new DateTime($penebusan['t_tebus']);
|
||||
$date = $time->format('d/m/Y');
|
||||
echo $date;
|
||||
@endphp</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="7"></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>Masa Bayaran</td>
|
||||
@php
|
||||
$masa_bayaran = strtotime($transaction_tebus['tarikh_bayaran']);
|
||||
$masa = date('H:i:s', $masa_bayaran);
|
||||
@endphp
|
||||
<td>: {{ $masa }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="7"></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>Tempoh Simpan</td>
|
||||
<td>: {{ $gadai['tempoh'] }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="{{ sizeof($wakil) != 0 ? 'center-table-style-border' : 'center-table-style' }}" style="margin-top: 10px">
|
||||
@if (sizeof($wakil) != 0)
|
||||
<table id="payment" style="border: none; height: fit-content">
|
||||
<tr>
|
||||
<td colspan="3">Maklumat Pelanggan</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:75px" class="vertical-baseline">Nama</td>
|
||||
<td style="width: 1px" class="text-center vertical-baseline">:</td>
|
||||
<td style="">{{ $customers_info['nama'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:75px" class="vertical-baseline">No K/P</td>
|
||||
<td style="width: 1px" class="text-center vertical-baseline">:</td>
|
||||
<td>
|
||||
@php
|
||||
if ($customers_info['kpbaru'] == '') {
|
||||
echo $customers_info['kplama'];
|
||||
} else {
|
||||
echo $customers_info['kpbaru'];
|
||||
}
|
||||
@endphp
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
<table id="payment" class="{{ sizeof($wakil) != 0 ? 'custom-table-right' : '' }}">
|
||||
<tr>
|
||||
<td style="width:10px">Baki Pembiayaan</td>
|
||||
<td style="width:10px">: RM {{ number_format($gadai['bakipjm'], 2) }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px">Keuntungan</td>
|
||||
<td style="width:10px">: RM {{ number_format($transaction_tebus['onepercent'], 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px">(-) Rebat Untung</td>
|
||||
<td style="width:10px">: RM
|
||||
{{ number_format($totalrebate['onepercent'], 2) }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px">Lain-Lain Caj</td>
|
||||
<td style="width:10px">: RM {{ number_format($transaction_tebus['ujrah'], 2) }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px">(-) Rebat Lain-Lain Caj</td>
|
||||
<td style="width:10px">: RM
|
||||
{{ number_format($totalrebate['ujrah'], 2) }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:17px"><strong>Jumlah Bayaran</strong></td>
|
||||
<td style="font-size: 17px"><strong>: RM
|
||||
{{ number_format($transaction_tebus['duit_masuk'], 2) }}</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<table id="payment" style="border: none; margin-top:10px; width: 60%">
|
||||
<tr>
|
||||
<td>Marhun: {{ $gadai['marhun'] }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="semakan">
|
||||
<tr>
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Teller</td>
|
||||
<td></td>
|
||||
<td colspan="3">{{ sizeof($wakil) != 0 ? 'Wakil' : 'Pelanggan' }}</td>
|
||||
<td></td>
|
||||
<td colspan="3">Khazanah</td>
|
||||
|
||||
</tr>
|
||||
{{-- <tr>
|
||||
<td colspan="3"> {{ Auth::user()->name }}</td>
|
||||
<td></td>
|
||||
<td colspan="3">{{ sizeof($wakil) != 0 ? $wakil['nama'] : $customers_info['nama'] }}</td>
|
||||
<td></td> --}}
|
||||
{{-- <td colspan="3">{{ $khazanah_user->name }}</td> --}}
|
||||
{{-- <td colspan="3">{{ $khazanah_user->name ?? '-' }}</td>
|
||||
</tr> --}}
|
||||
</table>
|
||||
<table id="inside" style="width: 45%; margin-top:20px">
|
||||
<tr>
|
||||
<td>Duit Pelanggan</td>
|
||||
<td>: RM {{ number_format($transaction_tebus['duitpelanggan'], 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jumlah Perlu Dibayar</td>
|
||||
<td>: RM {{ number_format($transaction_tebus['duit_masuk'], 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Baki</td>
|
||||
<td>: RM {{ number_format($transaction_tebus['bakipelanggan'], 2) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="semakan" style="margin-top: 0">
|
||||
<tr style="visibility: hidden">
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
<td></td>
|
||||
<td colspan="3">.................................................... </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
@@ -0,0 +1,48 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="fixed inset-0 z-10 hidden bg-gray-900 opacity-50" id="sidebarBackdrop"></div>
|
||||
<div id="main-content" class="relative w-full h-full overflow-y-auto bg-gray-50">
|
||||
<main>
|
||||
|
||||
<div class="px-4 pt-6">
|
||||
|
||||
<breadcrumb :items="[{'title' : 'Debug Proses WTD', 'icon' : 'fas fa-file-invoice','url' : {{ json_encode(route('wtd.debugWTD.home')) }}}]"></breadcrumb>
|
||||
|
||||
|
||||
@if (Session::has('type'))
|
||||
<div class="@if(Session::get('type') == 'error') bg-red-100 border-red-500 text-red-900 @else bg-yellow-100 border-green-500 text-green-900 @endif border-t-4 rounded-b px-4 py-3 shadow-md w-96 mx-auto mb-5" role="alert">
|
||||
<div class="flex">
|
||||
<div class="py-1">
|
||||
@if(Session::get('type') == 'error')
|
||||
<svg class="w-6 h-6 mr-4 text-red-500 fill-current" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.93 17.07A10 10 0 1 1 17.07 2.93 10 10 0 0 1 2.93 17.07zm12.73-1.41A8 8 0 1 0 4.34 4.34a8 8 0 0 0 11.32 11.32zM9 11V9h2v6H9v-4zm0-6h2v2H9V5z"/></svg>
|
||||
@else
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6 mr-4 text-green-500 fill-current" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z" />
|
||||
</svg>
|
||||
@endif
|
||||
</div>
|
||||
<div>
|
||||
<p class="font-bold">{{ Session::get('message') }}</p>
|
||||
<p class="text-sm">{{ Session::get('title') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="flex items-center justify-center pt-5 mx-auto mr-3 ">
|
||||
<a href="{{ route('wtd.debugWTD.trail', ['startDate' => \Carbon\Carbon::yesterday()->format('Y-m-d'), 'endDate' => \Carbon\Carbon::yesterday()->format('Y-m-d')]) }}" class="w-1/6 px-6 py-4 mr-3 transition transform bg-white border border-solid rounded-lg shadow cursor-pointer hover:bg-yellow-300 hover:transition-all hover:-translate-y-1 ">
|
||||
<div class="flex items-center justify-center">
|
||||
<svg fill="#000000" width="128px" height="128px" viewBox="0 0 256 256" id="Flat" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M208,72V184a7.99989,7.99989,0,0,1-8,8H176V104L136,64H80V40.00006a7.99989,7.99989,0,0,1,8-8L168,32Z" opacity="0.2"></path> <path d="M213.65723,66.34326l-40-40A8.00076,8.00076,0,0,0,168,24H88A16.01833,16.01833,0,0,0,72,40V56H56A16.01833,16.01833,0,0,0,40,72V216a16.01833,16.01833,0,0,0,16,16H168a16.01833,16.01833,0,0,0,16-16V200h16a16.01833,16.01833,0,0,0,16-16V72A8.00035,8.00035,0,0,0,213.65723,66.34326ZM168,216H56V72h76.68652L168,107.314l.00781,84.53083c-.001.05212-.00781.10284-.00781.15521,0,.05255.00684.10345.00781.15576l.002,23.84375Zm32-32H184V104a8.00035,8.00035,0,0,0-2.34277-5.65674l-40-40A8.00076,8.00076,0,0,0,136,56H88V40h76.68652L200,75.314Zm-56-32a8.00008,8.00008,0,0,1-8,8H88a8,8,0,0,1,0-16h48A8.00008,8.00008,0,0,1,144,152Zm0,32a8.00008,8.00008,0,0,1-8,8H88a8,8,0,0,1,0-16h48A8.00008,8.00008,0,0,1,144,184Z"></path> </g></svg>
|
||||
</div>
|
||||
<h2 class="mx-auto mt-4 text-2xl font-bold text-center uppercase">Trail Proses WTD</h2>
|
||||
</a>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
@endsection
|
||||
@@ -0,0 +1,198 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="bg-gray-900 opacity-50 hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
|
||||
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
|
||||
<main>
|
||||
|
||||
<div class="pt-6 px-4">
|
||||
|
||||
<breadcrumb
|
||||
:items="[{ 'title': 'Debug Proses WTD', 'icon': 'fas fa-users', 'url': '{{ route('wtd.debugWTD.home') }}' },
|
||||
{ 'title': 'Data WTD', 'icon': 'fas fa-users' }
|
||||
]">
|
||||
</breadcrumb>
|
||||
|
||||
<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"><a href=""
|
||||
class="router-link-active"><i class="fas fa-backspace text-white"></i></a> <span
|
||||
class="text-center mx-auto text-white font-bold">Selesai WTD</span>
|
||||
</div>
|
||||
<form method="get" id="formwtd" action="{{ route('wtd.debugWTD.trail') }}">
|
||||
<div class="rounded bg-white shadow p-6">
|
||||
<div class="pb-6"><label for="username"
|
||||
class="font-semibold text-gray-700 block pb-1">Tarikh</label>
|
||||
<div class="flex">
|
||||
<span
|
||||
class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap"
|
||||
style="background-color: rgb(249, 250, 251);">Mula</span>
|
||||
<input id="tarikhmula" name="startDate" type="date"
|
||||
value="{{ request()->startDate ?? $startDate }}"
|
||||
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
||||
<span
|
||||
class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap"
|
||||
style="background-color: rgb(249, 250, 251);">Hingga</span>
|
||||
<input id="tarikhhingga" name="endDate" type="date"
|
||||
value="{{ request()->endDate ?? $endDate }}"
|
||||
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
||||
<button
|
||||
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 ml-5">
|
||||
<i class="fas fa-magnifying-glass mr-2"></i>Search
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div kodcaw="operasi">
|
||||
<div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div>
|
||||
<div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div>
|
||||
<div class="flex justify-between mb-2">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<table class="min-w-full leading-normal">
|
||||
<thead class="text-center">
|
||||
<tr>
|
||||
<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">
|
||||
No
|
||||
</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">
|
||||
Kod 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">
|
||||
Cawangan
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-center text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Table Serahbaki
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-center text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Table Tuntutbaki
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-center text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Table WTD
|
||||
</th>
|
||||
<th
|
||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-center text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||
Action
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@php
|
||||
$totalserahbaki = 0;
|
||||
$totaltuntutbaki = 0;
|
||||
$totalwtd = 0;
|
||||
@endphp
|
||||
|
||||
<tbody>
|
||||
|
||||
@forelse ($debugwtd ?? [] as $dwtd)
|
||||
@php
|
||||
// Total
|
||||
$totalserahbaki += $dwtd['serahb'] ?? 0;
|
||||
$totaltuntutbaki += $dwtd['tuntutb'] ?? 0;
|
||||
$totalwtd += $dwtd['twtd'] ?? 0;
|
||||
@endphp
|
||||
<tr>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $loop->iteration }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $dwtd['kodcaw'] }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3">{{ $dwtd['details_caw'] }}</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3 text-right">{{ number_format($dwtd['serahb'], 2) }}
|
||||
@if($dwtd['serahb'] == $dwtd['tuntutb'] && $dwtd['serahb'] == $dwtd['twtd'])
|
||||
<span class="inline-block w-3 h-3 bg-green-500 rounded-full"></span>
|
||||
@else
|
||||
<span class="inline-block w-3 h-3 bg-red-500 rounded-full"></span>
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3 text-right">{{ number_format($dwtd['tuntutb'], 2) }}
|
||||
@if($dwtd['serahb'] == $dwtd['tuntutb'] && $dwtd['serahb'] == $dwtd['twtd'])
|
||||
<span class="inline-block w-3 h-3 bg-green-500 rounded-full"></span>
|
||||
@else
|
||||
<span class="inline-block w-3 h-3 bg-red-500 rounded-full"></span>
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3 text-right">{{ number_format($dwtd['twtd'], 2) }}
|
||||
@if($dwtd['serahb'] == $dwtd['tuntutb'] && $dwtd['serahb'] == $dwtd['twtd'])
|
||||
<span class="inline-block w-3 h-3 bg-green-500 rounded-full"></span>
|
||||
@else
|
||||
<span class="inline-block w-3 h-3 bg-red-500 rounded-full"></span>
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
|
||||
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="ml-3 text-center">
|
||||
|
||||
@if($dwtd['serahb'] == $dwtd['tuntutb'] && $dwtd['serahb'] == $dwtd['twtd'])
|
||||
<span class="inline-block w-3 h-3"></span>
|
||||
@else
|
||||
<span style="color: red;">Perlu Semakan</span>
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="11"
|
||||
class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-center">
|
||||
Data not available
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
|
||||
<tr>
|
||||
<td colspan="3" class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
Jumlah Keseluruhan
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-right">
|
||||
{{ number_format($totalserahbaki, 2) }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-right">
|
||||
{{ number_format($totaltuntutbaki, 2) }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-right">
|
||||
{{ number_format($totalwtd, 2) }}
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-right"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
</div>
|
||||
@endsection
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="pt-6 px-4">
|
||||
<breadcrumb :items="[{ 'title' : 'Wang Tak Dituntut', 'icon' : 'fas fa-gavel' }]"></breadcrumb>
|
||||
|
||||
<wtdindex-component></wtd-component>
|
||||
<wtdindex-component></wtdindex-component>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="flex justify-center mt-10">
|
||||
|
||||
<div class="p-6 bg-white border border-gray-200 rounded-lg shadow-lg max-w-md w-full">
|
||||
|
||||
<h5 class="mb-6 text-2xl font-bold tracking-tight text-gray-900 text-center">Jana Simulasi</h5>
|
||||
|
||||
<form method="GET" action="{{ route('wtd.simulasi.show') }}">
|
||||
@csrf
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="branch" class="block mb-2 text-sm font-medium text-gray-900">Sila Pilih Cawangan</label>
|
||||
<select id="branch" name="kodcaw" required
|
||||
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5">
|
||||
<option disabled {{ old('kodcaw') ? '' : 'selected' }}>Pilih Cawangan</option>
|
||||
@foreach ($cawangan as $cawanganItem)
|
||||
<option value="{{ $cawanganItem['kodcaw'] }}"
|
||||
{{ old('kodcaw') == $cawanganItem['kodcaw'] ? 'selected' : '' }}>
|
||||
{{ $cawanganItem['details_caw'] }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
@error('kodcaw')
|
||||
<p class="text-sm text-red-600 mt-1">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="year" class="block mb-2 text-sm font-medium text-gray-900">Sila Pilih Tahun</label>
|
||||
<select id="year" name="tahun" required
|
||||
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5">
|
||||
<option disabled {{ old('tahun') ? '' : 'selected' }}>Pilih Tahun</option>
|
||||
@for ($year = 2020; $year <= now()->year; $year++)
|
||||
<option value="{{ $year }}" {{ old('tahun') == $year ? 'selected' : '' }}>
|
||||
{{ $year }}</option>
|
||||
@endfor
|
||||
</select>
|
||||
@error('tahun')
|
||||
<p class="text-sm text-red-600 mt-1">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<button type="submit"
|
||||
class="w-full px-4 py-2 text-white bg-yellow-600 rounded-lg hover:bg-yellow-700 focus:ring-4 focus:ring-yellow-300">
|
||||
Submit
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// let branch = document.getElementById('branch');
|
||||
// // alert(branch);
|
||||
// branch.addEventListener('change',function(){
|
||||
// alert('Hello');
|
||||
// } )
|
||||
|
||||
// Ensure the DOM is fully loaded before accessing elements
|
||||
// document.addEventListener('DOMContentLoaded', function() {
|
||||
// let branch = document.getElementById('branch');
|
||||
|
||||
// // Check if the element exists
|
||||
// if (branch) {
|
||||
// branch.addEventListener('change', function(e) {
|
||||
// alert('Hello');
|
||||
// alert(branch.value);
|
||||
// let q = document.getElementById('cawangan_selector')
|
||||
// console.log(e);
|
||||
// q.innerText = branch.value;
|
||||
// });
|
||||
// } else {
|
||||
// console.error('Element with ID "branch" not found.');
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
// function updateHeaderCawangan(selectedCawangan) {
|
||||
// alert('hello');
|
||||
// let componentElement = document.querySelector('cawangan-component');
|
||||
|
||||
// // Create a custom event
|
||||
// let event = new CustomEvent('clickEvent_', {
|
||||
// detail: 'Some data', // Pass any data you need
|
||||
// });
|
||||
|
||||
// // Dispatch the event on the component's DOM element
|
||||
// componentElement.dispatchEvent(event);
|
||||
|
||||
// axios.post('/update-cawangan', {
|
||||
// kodcaw: selectedCawangan
|
||||
// }).then(response => {
|
||||
// console.log('Cawangan updated successfully');
|
||||
// }).catch(error => {
|
||||
// console.error('Error updating cawangan:', error);
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@include('layouts.footer')
|
||||
@endsection
|
||||
@@ -0,0 +1,89 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container mx-auto mt-10">
|
||||
<h1 class="text-2xl font-bold text-center my-4">Pengesahan Simulasi WTD</h1>
|
||||
{{-- Display success or error messages --}}
|
||||
@if (session('success'))
|
||||
<div class="bg-green-500 text-white px-4 py-2 rounded mb-4">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@elseif (session('error'))
|
||||
<div class="bg-red-500 text-white px-4 py-2 rounded mb-4">
|
||||
{{ session('error') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="overflow-x-auto">
|
||||
<div>
|
||||
<h5 class="text-lg font-semibold">Maklumat Simulasi yang Dipilih</h5>
|
||||
</div>
|
||||
|
||||
<div class="py-2">
|
||||
<a href="{{ url()->previous() }}"
|
||||
class="inline-block bg-gray-500 hover:bg-gray-600 text-white px-4 py-2 rounded">
|
||||
Kembali
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@if (!empty($insertedRecords) && count($insertedRecords) > 0)
|
||||
@php
|
||||
// Calculate total baki
|
||||
$totalBakiLelong = array_reduce(
|
||||
$insertedRecords,
|
||||
function ($sum, $record) {
|
||||
return $sum + $record['baki'];
|
||||
},
|
||||
0,
|
||||
);
|
||||
@endphp
|
||||
<table class="table-auto w-full border-collapse border border-gray-300">
|
||||
<thead>
|
||||
<tr class="bg-yellow-600 text-white">
|
||||
<th class="border border-gray-200 px-4 py-2">Bulan</th>
|
||||
<th class="border border-gray-200 px-4 py-2">Jumlah No Rujukan</th>
|
||||
<th class="border border-gray-200 px-4 py-2">Pembiayaan</th>
|
||||
<th class="border border-gray-200 px-4 py-2">Baki</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($insertedRecords as $index => $record)
|
||||
<tr class="{{ $index % 2 == 0 ? 'bg-gray-100' : 'bg-white' }}">
|
||||
<td class="border border-gray-300 px-4 py-2 text-center">{{ $record['bulan'] }}</td>
|
||||
<td class="border border-gray-300 px-4 py-2 text-center">{{ $record['jumlah_sag'] }}</td>
|
||||
<td class="border border-gray-300 px-4 py-2 text-center">
|
||||
{{ number_format($record['pembiayaan'], 2) }}
|
||||
</td>
|
||||
<td class="border border-gray-300 px-4 py-2 text-center">
|
||||
{{ number_format($record['baki'], 2) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<!-- Add the total row -->
|
||||
<tr class="bg-gray-200 font-bold">
|
||||
<td class="border border-gray-300 px-4 py-2 text-center" colspan="3">Jumlah Baki Lelong</td>
|
||||
<td class="border border-gray-300 px-4 py-2 text-center">
|
||||
{{ number_format($totalBakiLelong, 2) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<p class="text-center text-gray-600 mt-4">Tiada data yang dipilih untuk pengesahan.</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="flex justify-center mt-6">
|
||||
<form action="{{ route('wtd.simulasi.proses-pengesahan') }}" method="POST">
|
||||
@csrf
|
||||
<input type="hidden" name="records" value="{{ json_encode($insertedRecords) }}">
|
||||
<input type="hidden" name="kodcaw" value="{{ json_encode($kodcaw) }}">
|
||||
<button type="submit" class="bg-blue-600 text-white px-6 py-2 rounded hover:bg-blue-700">
|
||||
Sahkan
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@include('layouts.footer')
|
||||
@endsection
|
||||
@@ -0,0 +1,54 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container mx-auto mt-10">
|
||||
<h1 class="text2xl font-bold">
|
||||
Senarai Surat Akuan Gadaian: <span class="underline hover:underline-offset-auto 2xl: uppercase font-extrabold">{{ $bulan }}</span>
|
||||
</h1>
|
||||
|
||||
<div class="flex justify-end">
|
||||
<h3 class="text-lg font-semibold">Jumlah Baki Lelong:
|
||||
<span id="total-baki" class="text-yellow-600">
|
||||
RM {{ number_format($totalBaki, 2) }}
|
||||
</span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="overflow-x-auto">
|
||||
<table class="table-auto w-full border-collapse border border-gray-300">
|
||||
<thead>
|
||||
<tr class="bg-yellow-600 text-white">
|
||||
<th class="border border-gray-200 px-4 py-2">#</th>
|
||||
<th class="border border-gray-200 px-4 py-2">No Rujukan</th>
|
||||
<th class="border border-gray-200 px-4 py-2">Tarikh Lelong</th>
|
||||
<th class="border border-gray-200 px-4 py-2">Pembiayaan</th>
|
||||
<th class="border border-gray-200 px-4 py-2">Baki Lelong</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($rekod as $index => $item)
|
||||
<tr class="{{ $index % 2 == 0 ? 'bg-gray-100' : 'bg-white' }}">
|
||||
<td class="border border-gray-300 px-4 py-2 text-center">{{ $index + 1 }}</td>
|
||||
|
||||
<td class="px-4 py-2 border">{{ $item['norujukan'] }}</td>
|
||||
<td class="px-4 py-2 border">{{ $item['t_lelong'] }}</td>
|
||||
<td class="px-4 py-2 border">{{ number_format($item['pinjaman'], 2) }}</td>
|
||||
<td class="px-4 py-2 border">{{ number_format($item['baki'], 2) }}</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="mt-6">
|
||||
<a href="{{ url()->previous() }}" class="inline-block bg-gray-500 hover:bg-gray-600 text-white px-4 py-2 rounded">
|
||||
Kembali
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@include('layouts.footer');
|
||||
@endsection
|
||||
@@ -0,0 +1,131 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container mx-auto mt-10">
|
||||
@if (session('success'))
|
||||
<div class="bg-green-100 text-green-800 px-4 py-3 rounded mb-4">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
<h2 class="text-2xl font-bold mb-6">Senarai Batch Simulasi Untuk Tahun: {{ $year }}</h2>
|
||||
|
||||
<div class="flex justify-end items-center mb-4">
|
||||
<h3 class="text-lg font-semibold">Jumlah Baki Lelong:
|
||||
<span id="total-baki" class="text-yellow-600">RM 0.00</span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<form id="proses-wtd-form" method="POST" action="{{ route('wtd.simulasi.pengesahan') }}">
|
||||
@csrf
|
||||
<div class="overflow-x-auto">
|
||||
<table class="table-auto w-full border-collapse border border-gray-300">
|
||||
<thead>
|
||||
<tr class="bg-yellow-600 text-white">
|
||||
<th class="border border-gray-200 px-4 py-2">#</th>
|
||||
<th class="border border-gray-200 px-4 py-2">Bulan</th>
|
||||
<th class="border border-gray-200 px-4 py-2">Jumlah SAG</th>
|
||||
<th class="border border-gray-200 px-4 py-2">Pembiayaan</th>
|
||||
<th class="border border-gray-200 px-4 py-2">Baki</th>
|
||||
<th class="border border-gray-200 px-4 py-2 text-center">
|
||||
<input id="select-all" type="checkbox" class="cursor-pointer">
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{-- @dd($senaraiSimulasi); --}}
|
||||
@foreach ($senaraiSimulasi as $index => $item)
|
||||
<input type="hidden" name="tahun" value="{{ $year }}"/>
|
||||
<tr class="{{ $index % 2 == 0 ? 'bg-gray-100' : 'bg-white' }}">
|
||||
<td class="border border-gray-300 px-4 py-2 text-center">{{ $index + 1 }}</td>
|
||||
|
||||
<td class="border border-gray-300 px-4 py-2">
|
||||
<a href="{{ route('wtd.simulasi.rekod', [
|
||||
'month' => $item['bulan'],
|
||||
'year' => $year,
|
||||
'kodcaw' => $item['kodcaw'],
|
||||
]) }}"
|
||||
class="text-yellow-600 hover:underline">
|
||||
{{ $item['bulan'] }}
|
||||
</a>
|
||||
<input type="hidden" name="data[{{ $index }}][kodcaw]"
|
||||
value="{{ $item['kodcaw'] }}">
|
||||
|
||||
<input type="hidden" name="data[{{ $index }}][bulan]"
|
||||
value="{{ $item['bulan'] }}">
|
||||
</td>
|
||||
<td class="border border-gray-300 px-4 py-2 text-center">
|
||||
{{ $item['jumlah_norujukan'] ?? 0 }}
|
||||
<input type="hidden" name="data[{{ $index }}][jumlah_norujukan]"
|
||||
value="{{ $item['jumlah_norujukan'] }}">
|
||||
</td>
|
||||
<td class="border border-gray-300 px-4 py-2">
|
||||
{{ number_format($item['pembiayaan'], 2) }}
|
||||
<input type="hidden" name="data[{{ $index }}][pembiayaan]"
|
||||
value="{{ $item['pembiayaan'] }}">
|
||||
</td>
|
||||
<td class="border border-gray-300 px-4 py-2" data-baki="{{ $item['baki'] }}">
|
||||
{{ number_format($item['baki'], 2) }}
|
||||
<input type="hidden" name="data[{{ $index }}][baki]"
|
||||
value="{{ $item['baki'] }}">
|
||||
</td>
|
||||
<td class="border border-gray-300 px-4 py-2 text-center">
|
||||
<input type="checkbox" class="row-checkbox" data-baki="{{ $item['baki'] }}"
|
||||
name="data[{{ $index }}][selected]">
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end mt-4">
|
||||
<button type="submit" id="proses-wtd-btn"
|
||||
class="bg-yellow-600 text-white px-6 py-2 rounded cursor-pointer hover:bg-yellow-700">
|
||||
Jana Simulasi
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@include('layouts.footer')
|
||||
@endsection
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const selectAllCheckbox = document.getElementById('select-all');
|
||||
const rowCheckboxes = document.querySelectorAll('.row-checkbox');
|
||||
const totalBakiElement = document.getElementById('total-baki');
|
||||
|
||||
function formatCurrency(amount) {
|
||||
return `RM ${amount.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,')}`;
|
||||
}
|
||||
|
||||
function calculateTotalBaki() {
|
||||
let total = 0;
|
||||
rowCheckboxes.forEach(checkbox => {
|
||||
if (checkbox.checked) {
|
||||
total += parseFloat(checkbox.dataset.baki);
|
||||
}
|
||||
});
|
||||
totalBakiElement.textContent = formatCurrency(total);
|
||||
}
|
||||
|
||||
selectAllCheckbox.addEventListener('change', function() {
|
||||
rowCheckboxes.forEach(checkbox => {
|
||||
checkbox.checked = this.checked;
|
||||
});
|
||||
calculateTotalBaki();
|
||||
});
|
||||
|
||||
rowCheckboxes.forEach(checkbox => {
|
||||
checkbox.addEventListener('change', function() {
|
||||
if (!this.checked) {
|
||||
selectAllCheckbox.checked = false;
|
||||
}
|
||||
if (Array.from(rowCheckboxes).every(cb => cb.checked)) {
|
||||
selectAllCheckbox.checked = true;
|
||||
}
|
||||
calculateTotalBaki();
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user