Merged in izzati-feat-laporan-lelong (pull request #73)
Izzati feat laporan lelong
This commit is contained in:
@@ -1757,5 +1757,97 @@ class AkaunController extends Controller
|
||||
return view('akaun.laporan_saghilang', compact('hostname','polis','cawangan_detail','mula_date','hingga_date','tarikh_cetak','api_url'));
|
||||
}
|
||||
|
||||
public function cetak_laporanlelong(Request $request)
|
||||
{
|
||||
// dd($request->all());
|
||||
$api_url = $request->hostname;
|
||||
$auth_user = Auth::user();
|
||||
$current = Carbon::now();
|
||||
$tarikh_cetak = $current->toDateString();
|
||||
$batchno = $request->batchno;
|
||||
|
||||
// Get input parameters, including batchno
|
||||
$mula_date = $request->tarikhmula ?? '2017-01-01';
|
||||
// dd($mula_date);
|
||||
$hingga_date = $request->tarikhhingga ?? $current->toDateString();
|
||||
// $batchno = $request->batchno ?? null; // Batch Number from input
|
||||
// dd($request->batchno);
|
||||
|
||||
// Fetch lelong report data with batchno filter
|
||||
$lelong = Http::get($request->hostname . '/api/laporan/lelong', [
|
||||
'kodcaw' => $request->kodcaw,
|
||||
'tarikhmula' => $mula_date,
|
||||
'tarikhhingga' => $hingga_date,
|
||||
'batchno' => $request->batchno // Include batch number in API request
|
||||
])->json();
|
||||
// dd($lelong);
|
||||
|
||||
// Initialize totals
|
||||
$bakilelong = 0;
|
||||
$rugilelong = 0;
|
||||
|
||||
// Ensure 'data' key exists before looping
|
||||
if (isset($lelong['data']) && is_array($lelong['data'])) {
|
||||
foreach ($lelong['data'] as $key => $item) {
|
||||
// Fetch customer name if nokp exists
|
||||
$lelong['data'][$key]['nama_cust'] = isset($item['nokp']) && !empty($item['nokp'])
|
||||
? Http::get($request->hostname . '/api/customers/' . $item['nokp'])->json()['nama'] ?? 'Unknown'
|
||||
: 'Unknown';
|
||||
|
||||
// Accumulate bakilelong and rugilelong
|
||||
if (isset($item['baki'])) {
|
||||
if ($item['baki'] > 0) {
|
||||
$bakilelong += $item['baki'];
|
||||
} else {
|
||||
$rugilelong += $item['baki'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// dd($lelong);
|
||||
$tlelong = $lelong['tarikh_lelong'];
|
||||
|
||||
// Fetch total values from API response
|
||||
$total_pinjaman = $lelong['totals']['total_pinjaman'] ?? 0;
|
||||
$total_nilaimarhun = $lelong['totals']['total_nilaimarhun'] ?? 0;
|
||||
$total_keuntungan = $lelong['totals']['total_keuntungan'] ?? 0;
|
||||
$total_onepercent = $lelong['totals']['total_onepercent'] ?? 0;
|
||||
$total_ujrah = $lelong['totals']['total_ujrah'] ?? 0;
|
||||
$total_cajlelong = $lelong['totals']['total_cajlelong'] ?? 0;
|
||||
$total_hargajual = $lelong['totals']['total_hargajual'] ?? 0;
|
||||
$total_baki = $lelong['totals']['total_baki'] ?? 0;
|
||||
$total_hargaasas = $lelong['totals']['total_hargaasas'] ?? 0;
|
||||
|
||||
// Fetch branch details
|
||||
$cawangan_info = Http::get($request->hostname . '/api/cawangan/'. $request->kodcaw)->json();
|
||||
$cawangan = Http::get($request->hostname . '/api/cawangan/detail/'. $request->kodcaw)->json();
|
||||
$cawangan_detail = $cawangan[0];
|
||||
|
||||
$hostname = $request->hostname;
|
||||
|
||||
// Check if the request is for PDF generation
|
||||
if (isset($request->jenis) && $request->jenis == 'pdf') {
|
||||
$pdf = PDF::loadView('akaun.laporan_lelong', compact(
|
||||
'total_pinjaman', 'total_nilaimarhun', 'total_keuntungan', 'total_onepercent',
|
||||
'total_ujrah', 'total_cajlelong', 'total_hargajual', 'total_baki',
|
||||
'total_hargaasas', 'hostname', 'lelong', 'cawangan_detail',
|
||||
'tarikh_cetak', 'mula_date', 'hingga_date', 'api_url',
|
||||
'bakilelong', 'rugilelong', 'batchno','tlelong' // Pass batchno to view
|
||||
))->setPaper('a4', 'landscape');
|
||||
|
||||
return $pdf->download('laporan_lelong_' . $request->kodcaw . '_' . $mula_date . '_' . $hingga_date . '_batch_' . $batchno . '.pdf');
|
||||
}
|
||||
|
||||
// Return the view with batchno included
|
||||
return view('akaun.laporan_lelong', compact(
|
||||
'total_pinjaman', 'total_nilaimarhun', 'total_keuntungan', 'total_onepercent',
|
||||
'total_ujrah', 'total_cajlelong', 'total_hargajual', 'total_baki',
|
||||
'total_hargaasas', 'hostname', 'lelong', 'cawangan_detail',
|
||||
'tarikh_cetak', 'mula_date', 'hingga_date', 'api_url',
|
||||
'bakilelong', 'rugilelong','batchno','tlelong'
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -180,6 +180,11 @@
|
||||
<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>
|
||||
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="flex w-full">
|
||||
<div class="xl:w-2/3 2xl:w-1/2 p-8 mx-auto">
|
||||
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-4 rounded-t-lg">
|
||||
<router-link to="/akaunhome">
|
||||
<i class="fas fa-backspace text-white"></i>
|
||||
</router-link>
|
||||
<span class="text-center mx-auto text-white font-bold">Laporan Lelong</span>
|
||||
</div>
|
||||
|
||||
<form method="get" id="formringter" :action="Urlredirect()" target="_blank">
|
||||
<div class="rounded bg-white shadow p-6">
|
||||
<div class="pb-6">
|
||||
<div class="flex justify-center mb-4">
|
||||
<input :value="jenisgenerate" type="hidden" name="jenis" />
|
||||
<input :value="this.$kodcaw" name="kodcaw" hidden />
|
||||
<input :value="this.$hostname" name="hostname" hidden />
|
||||
<input :value="selectedbatchlel" name="batchno" hidden />
|
||||
|
||||
<span class="text-gray-600 border-2 rounded-l px-4 py-2 whitespace-no-wrap">Mula</span>
|
||||
<input v-model="tarikhmula" id="tarikhmula" name="tarikhmula" 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 class="text-gray-600 border-2 rounded-l px-4 py-2 whitespace-no-wrap">Hingga</span>
|
||||
<input v-model="tarikhhingga" id="tarikhhingga" name="tarikhhingga" 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>
|
||||
|
||||
<!-- Batch Lelong Selection -->
|
||||
<select name="batchno" v-model.trim="selectedbatchlel" class="w-full p-2 rounded-md border bg-white border-gray-400 focus:outline-none focus:ring-1 ring-cyan-500 uppercase" :disabled="filteredBatchlel.length === 0">
|
||||
<option value="" selected disabled hidden>
|
||||
{{ filteredBatchlel.length === 0 ? 'Tiada Lelongan' : 'Sila Pilih Batch Lelong' }}
|
||||
</option>
|
||||
<option v-for="(slt, i) in filteredBatchlel" :key="i" :value="slt.batchno">
|
||||
Batch No: {{ slt.batchno }} / Tarikh: {{ formatDate(slt.tarikh) }}
|
||||
</option>
|
||||
</select>
|
||||
|
||||
<!-- Show message if no batch numbers available -->
|
||||
<p v-if="filteredBatchlel.length === 0" class="text-red-500 font-semibold mt-2">
|
||||
Tiada Lelongan dalam tarikh yang dipilih.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end mt-10">
|
||||
<button @click.prevent="generatepdf" class="mr-2 border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300">
|
||||
<i class="fas fa-file-pdf mr-2"></i>PDF
|
||||
</button>
|
||||
<button @click.prevent="generateview" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300">
|
||||
<i class="fas fa-eye mr-2"></i>View
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { required } from 'vuelidate/lib/validators'
|
||||
import axios from 'axios';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
kodcaw: String // Ensure kodcaw is received
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
jenisgenerate: 'none',
|
||||
kodcaw: this.$kodcaw,
|
||||
maxDate: null,
|
||||
tarikhmula: '',
|
||||
tarikhhingga: '',
|
||||
selectedbatchlel: '',
|
||||
jenisbatchlel: [],
|
||||
// hostname: window.location.origin
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.setMaxDate();
|
||||
},
|
||||
created() {
|
||||
console.log("kodcaw from props:", this.$kodcaw); // Should not be null
|
||||
this.senaraibatchlel();
|
||||
},
|
||||
methods: {
|
||||
setMaxDate() {
|
||||
const today = new Date();
|
||||
today.setDate(today.getDate() - 1);
|
||||
this.maxDate = today.toISOString().split('T')[0];
|
||||
},
|
||||
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.laporanlelong');
|
||||
},
|
||||
setJenis(value) {
|
||||
this.jenisgenerate = value;
|
||||
},
|
||||
async senaraibatchlel() {
|
||||
try {
|
||||
const kodcawValue = this.$kodcaw || ''; // Ensure kodcaw is valid
|
||||
console.log(`Fetching batch lelong data from: ${this.hostname}/api/lookupbatchlel/${kodcawValue}`);
|
||||
console.log("kodcaw before API call:", this.$kodcaw);
|
||||
|
||||
const response = await axios.get(`${this.$hostname}/api/lookupbatchlel/${kodcawValue}`);
|
||||
|
||||
if (!response.data || response.data.length === 0) {
|
||||
throw new Error("No data received.");
|
||||
}
|
||||
|
||||
this.jenisbatchlel = response.data;
|
||||
} catch (error) {
|
||||
console.error("Error fetching batch lelong:", error);
|
||||
Vue.swal({
|
||||
title: "Error!",
|
||||
text: "Failed to fetch batch lelong data. Please try again later.",
|
||||
icon: "error",
|
||||
});
|
||||
}
|
||||
},
|
||||
formatDate(date) {
|
||||
const d = new Date(date);
|
||||
return d.toLocaleDateString('ms-MY', { day: '2-digit', month: '2-digit', year: 'numeric' });
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
filteredBatchlel() {
|
||||
if (!Array.isArray(this.jenisbatchlel)) {
|
||||
console.error("jenisbatchlel is not an array:", this.jenisbatchlel);
|
||||
return [];
|
||||
}
|
||||
|
||||
// If no date is selected, show all batches
|
||||
if (!this.tarikhmula && !this.tarikhhingga) {
|
||||
return this.jenisbatchlel;
|
||||
}
|
||||
|
||||
// Convert input dates to JavaScript Date objects
|
||||
const fromDate = this.tarikhmula ? new Date(this.tarikhmula) : null;
|
||||
const toDate = this.tarikhhingga ? new Date(this.tarikhhingga) : null;
|
||||
|
||||
return this.jenisbatchlel.filter(batch => {
|
||||
const batchDate = new Date(batch.tarikh);
|
||||
|
||||
let isWithinDateRange = true;
|
||||
if (fromDate) isWithinDateRange = batchDate >= fromDate;
|
||||
if (toDate) isWithinDateRange = isWithinDateRange && batchDate <= toDate;
|
||||
|
||||
return isWithinDateRange;
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
tarikhmula() {
|
||||
this.selectedbatchlel = ''; // Reset batch selection when date changes
|
||||
},
|
||||
tarikhhingga() {
|
||||
this.selectedbatchlel = ''; // Reset batch selection when date changes
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Vendored
+2
@@ -60,6 +60,7 @@ import WtdSpecific from './WTD/SelectWTD'
|
||||
import AuditPage from './Audit/Audit'
|
||||
import KeuntunganSebenarPage from './Audit/KeuntunganSebenar'
|
||||
import UpahSimpanPage from './Audit/UpahSimpan'
|
||||
import LaporanLelong from './Akaun/LaporanLelong.vue'
|
||||
|
||||
|
||||
|
||||
@@ -103,6 +104,7 @@ export default new VueRouter({
|
||||
{ path: '/akaunhome/AuditTrail', component: AuditTrail },
|
||||
{ path: '/akaunhome/imbangdugabackup', component: ImbangDugaBackup },
|
||||
{ path: '/akaunhome/saghilang', component: SagHilang },
|
||||
{ path: '/akaunhome/laporanlelong', component: LaporanLelong },
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,360 @@
|
||||
<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>
|
||||
|
||||
|
||||
<style>
|
||||
.table-align {
|
||||
width: 100%; /* Jadikan jadual lebar penuh */
|
||||
border-collapse: collapse; /* Gabungkan sempadan */
|
||||
}
|
||||
|
||||
.table-align td, .table-align th {
|
||||
padding: 5px 10px; /* Ruang dalam jadual */
|
||||
text-align: left; /* Selarikan teks ke kiri */
|
||||
}
|
||||
|
||||
.table-align .total-section {
|
||||
border-top: 1px solid black; /* Garisan pemisah */
|
||||
font-weight: bold; /* Jadikan teks tebal */
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
|
||||
|
||||
footer {
|
||||
margin-top: auto;
|
||||
padding: 20px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
footer hr {
|
||||
margin: 20px 0;
|
||||
border: 0;
|
||||
border-top: 1px solid #ddd;
|
||||
}
|
||||
|
||||
footer p {
|
||||
font-size: 12px;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
footer .signature {
|
||||
margin-bottom: 20px;
|
||||
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<table id="header">
|
||||
<tr>
|
||||
<td style="font-size:20px;font-weight:bold;">{{ $cawangan_detail['namacaw'] }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table id="scan" style="border-collapse: collapse; width: auto; font-size: 14px;">
|
||||
<tr>
|
||||
<th colspan="2" style="text-align: left; padding: 2px 5px;"><b>LAPORAN LELONGAN</b></th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th style="text-align: left; padding: 2px 5px; white-space: nowrap;">TARIKH CETAK:</th>
|
||||
<td style="text-align: left; padding: 2px 5px;">
|
||||
@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
|
||||
echo $myDateTime ? $myDateTime->format('d-m-Y') : '-';
|
||||
@endphp
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th style="text-align: left; padding: 2px 5px; white-space: nowrap;">TARIKH LELONG:</th>
|
||||
<td style="text-align: left; padding: 2px 5px;">
|
||||
@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $tlelong);
|
||||
echo $myDateTime ? $myDateTime->format('d-m-Y') : '-';
|
||||
@endphp
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th style="text-align: left; padding: 2px 5px; white-space: nowrap;">BATCH NO:</th>
|
||||
<td style="text-align: left; padding: 2px 5px;">{{ $batchno }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table cellspacing="0" cellpadding="5" border="0" width="100%" height="80" align="left" id="scan">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th align="left">No Rujukan</th>
|
||||
<th align="left">Penggadai</th>
|
||||
<th>Nilai Marhun Asal (RM)</th>
|
||||
<th>Pembiayaan (RM)</th>
|
||||
<th>Keuntungan (RM)</th>
|
||||
<th>1% (RM)</th>
|
||||
<th>Lain-Lain Caj (RM)</th>
|
||||
<th>Caj Lelong (RM)</th>
|
||||
<th>Harga Jual (RM)</th>
|
||||
<th>Baki (RM)</th>
|
||||
<th>Harga Asas (RM)</th>
|
||||
<th align="left">Nama Pembeli</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach($lelong['data'] as $sh)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td style='white-space:nowrap;'>{{ $sh['norujukan'] }}</td>
|
||||
<td align="left">{{ $sh['nama_cust'] ?? 'Unknown' }}<br>{{ $sh['nokp'] }}</td>
|
||||
<td align="right">{{ $sh['nilaimarhun']}}</td>
|
||||
<td align="right">{{ $sh['pinjaman']}}</td>
|
||||
<td align="right">{{ $sh['bakiupah']}}</td>
|
||||
<td align="right">{{ $sh['onepercent']}}</td>
|
||||
<td align="right">{{ $sh['ujrah']}}</td>
|
||||
<td align="right">{{ $sh['cajlelong']}}</td>
|
||||
<td align="right">{{ $sh['hargajual']}}</td>
|
||||
<td align="right">@if($sh['baki'] < 0)
|
||||
({{ number_format(abs($sh['baki']), 2, '.', ',') }})
|
||||
@else
|
||||
{{ number_format($sh['baki'], 2, '.', ',') }}
|
||||
@endif</td>
|
||||
<td align="right">{{ $sh['hargaasas']}}</td>
|
||||
<td align="left">{{ $sh['nama']}}</td>
|
||||
<!-- <td align="left">{{ $sh['nama']}}<br>{{ $sh['nokppembeli'] }}</td> -->
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
|
||||
|
||||
<tr>
|
||||
<td colspan="3" align="left"><strong>Jumlah Keseluruhan</strong></td>
|
||||
<td align="right"><strong>{{ number_format($total_nilaimarhun, 2)}}</strong></td>
|
||||
<td align="right"><strong>{{ number_format($total_pinjaman, 2)}}</strong></td>
|
||||
<td align="right"><strong>{{ number_format($total_keuntungan, 2)}}</strong></td>
|
||||
<td align="right"><strong>{{ number_format($total_onepercent, 2)}}</strong></td>
|
||||
<td align="right"><strong>{{ number_format($total_ujrah, 2)}}</strong></td>
|
||||
<td align="right"><strong>{{ number_format($total_cajlelong, 2)}}</strong></td>
|
||||
<td align="right"><strong>{{ number_format($total_hargajual, 2)}}</strong></td>
|
||||
<td align="right"><strong>{{ number_format($total_baki, 2)}}</strong></td>
|
||||
<td align="right"><strong>{{ number_format($total_hargaasas, 2)}}</strong></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Table for Jumlah Baki A, Baki B -->
|
||||
<table class="table-align" cellspacing="0" cellpadding="1" border="0" width="100%" height="80" align="left" id="scan">
|
||||
|
||||
<!-- Barisan Jumlah Baki A -->
|
||||
<!-- Jumlah Baki A dan Baki B -->
|
||||
<tr>
|
||||
<td colspan="6" align="right"><b>Jumlah Baki Lelong (A):</b></td>
|
||||
<td colspan="2" align="right"><b>@if($bakilelong < 0)
|
||||
({{ number_format(abs($bakilelong), 2, '.', ',') }})
|
||||
@else
|
||||
{{ number_format($bakilelong, 2, '.', ',') }}
|
||||
@endif<b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" align="right"><b>Jumlah Kerugian Lelong (B):</b></td>
|
||||
<td colspan="2" align="right"><b>@if($rugilelong < 0)
|
||||
({{ number_format(abs($rugilelong), 2, '.', ',') }})
|
||||
@else
|
||||
{{ number_format($rugilelong, 2, '.', ',') }}
|
||||
@endif<b></td>
|
||||
</tr>
|
||||
|
||||
<!-- Baki A - Baki B -->
|
||||
<tr>
|
||||
<td colspan="6" align="right"><b>A - B:</b></td>
|
||||
<td colspan="2" align="right"><b>
|
||||
@if($total_baki < 0)
|
||||
({{ number_format(abs($total_baki), 2, '.', ',') }})
|
||||
@else
|
||||
{{ number_format($total_baki, 2, '.', ',') }}
|
||||
@endif<b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<table id="scan">
|
||||
|
||||
<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>
|
||||
|
||||
@@ -129,6 +129,7 @@ Route::get('/akaunhome/cetakAnsuranRangeDate',['as'=>'cetak.ansuranRangeDate','u
|
||||
Route::get('/akaunhome/cetakpenebusanRangeDate',['as'=>'cetak.penebusanRangeDate','uses'=>'App\Http\Controllers\AkaunController@cetakLaporanPenebusanRangeDate'])->middleware(['roleChecker:admin,akaun,operasi,kpo,callcenter']);
|
||||
Route::get('/akaunhome/imbangdugabackup',['as'=>'cetak.imbangdugabackup','uses'=>'App\Http\Controllers\AkaunController@cetak_imbangdugaharian'])->middleware(['roleChecker:admin,akaun,operasi,kpo,callcenter']);
|
||||
Route::get('/akaunhome/cetak_saghilang',['as'=>'cetak.saghilang','uses'=>'App\Http\Controllers\AkaunController@cetak_laporansaghilang'])->middleware(['roleChecker:admin,akaun,operasi,kpo,callcenter']);
|
||||
Route::get('/akaunhome/cetak_laporanlelong',['as'=>'cetak.laporanlelong','uses'=>'App\Http\Controllers\AkaunController@cetak_laporanlelong'])->middleware(['roleChecker:admin,akaun,operasi,kpo,callcenter']);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user