Files
lelong/resources/views/pembida/pembayaranbidaan.blade.php
2023-03-14 12:04:59 +08:00

181 lines
8.5 KiB
PHP

@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row ">
<div class="col mx-auto p-4">
<div class="card">
<div class="card-header header-style">
<a href="javascript:window.history.go(-1);" class="header-style-icon">
<i class="fas fa-arrow-left"></i>
</a>
<div class="header-style-title">
Senarai Pembayaran Bidaan
</div>
</div>
<div class="card-body">
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
<p><i class="fas fa-caret-right"></i> {{ $getkodcaw['caw_name'] }}</p>
{{-- <div class="row">
<div class="text-center">
@if($listwinner != NULL)
<a class="btn btn-success" href="{{ route('importdata.exportdatacawangan',[$kodcaw,$lelong_id]) }}">Export Data Lelong</a>
@endif
</div>
</div> --}}
<table class="table table-bordered table-xl text-center" id="sahsagonline" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th>Bil</th>
<th>Nama</th>
<!-- <th>No Kad Pengenalan</th> -->
<th>No Telefon</th>
<th>Bilangan Surat</th>
<!-- <th>Jumlah Pembayaran(RM)</th> -->
<th>Jumlah Bidaan (RM)</th>
<th>Status</th>
<th>Kaedah Bayaran</th>
<th class="text-center">Maklumat</th>
<th>Bayaran</th>
</tr>
</thead>
<tbody>
@php $totalsurat = 0;
$totalbid = 0;
$totalpay = 0;
@endphp
@foreach($listwinner as $winner)
<tr>
<td>{{ $loop->iteration }}</td>
<td class="text-left text-uppercase">{{ $winner['details']['name'] }}</td>
<!-- <td>{{ $winner['details']['nokp'] }}</td> -->
<td>{{ $winner['details']['notelbimbit']}}</td>
<td>{{ $winner['total_surat'] }}</td>
<!-- <td>{{ number_format($winner['totalPay'], 2, '.', ',') }}</td> -->
<td>{{ number_format($winner['totalBid'], 2, '.', ',') }}</td>
<td>
@if($winner['jenisbayaran']['status_payment'] == 1)
<button class="btn btn-sm btn-success" disabled>Selesai Bayar</button>
@else
<button class="btn btn-sm btn-secondary" disabled>Belum Bayar</button>
@endif
</td>
<td>
@if($winner['jenisbayaran']['kaedah_bayaran'] == 1)
<button class="btn btn-sm btn-dark" disabled>TUNAI</button>
@elseif($winner['jenisbayaran']['kaedah_bayaran'] == 2)
<button class="btn btn-sm btn-primary" disabled>FPX</button>
@elseif($winner['jenisbayaran']['kaedah_bayaran'] == 3)
<button class="btn btn-sm btn-secondary" disabled>CDM</button>
@endif
</td>
<td>
<a class="btn btn-sm btn-info" href="{{ route('pembida.detailsbidaan', [ $lelong_id, 'user_id'=>$winner['details']['id'], $kodcaw ]) }}" data-toggle="tooltip" data-placement="top" title="Butiran Bidaan"><i class="far fa-list-alt"></i></a>
</td>
<td>
@if($winner['jenisbayaran']['status_payment'] == 1)
<a href="{{ route('pembida.detailsbayaran', [ $lelong_id, 'user_id'=>$winner['details']['id'], $kodcaw ]) }}" class="btn btn-sm btn-warning" data-toggle="tooltip" data-placement="top" title="Butiran Bayaran"><i class="far fa-list-alt"></i></a>
@endif
</td>
</tr>
@php
$totalsurat += $winner['total_surat'];
$totalbid += $winner['totalBid'];
$totalpay += $winner['totalPay'];
@endphp
@endforeach
</tbody>
<tfoot>
<tr>
<td colspan="3"><b>JUMLAH KESELURUHAN</b></td>
<td align = 'center'><b><b>{{$totalsurat}}</b></td>
<td align = 'center'><b>{{ number_format($totalbid, 2, '.', ',') }}</b></td>
<td colspan="5"></td>
</tr>
</tfoot>
</table>
</div>
</div>
{{-- //table cdm/ppx/tunai --}}
<div class="container-fluid">
<div class="row ">
<div class="col-6 mx-auto p-6">
<div class="card">
<div class="card-header header-style">
<div class="header-style-title">
Jumlah Kaedah Bayaran
</div>
</div>
<div class="card-body">
<table class="table text-center table-bordered" id="tablekaunter" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th>No</th>
<th>Kaedah Bayaran</th>
<th>Bilangan SAG</th>
<th>Jumlah Bayaran (RM)</th>
</tr>
</thead>
<tbody>
@php $totalsurat = 0;
$totalbid = 0;
$totalpay = 0;
@endphp
<tr>
<td> 1 </td>
<td style='white-space:nowrap;' align='left'><span class="badge badge-pill badge-dark">TUNAI</span></td>
<td align='center'>{{$biltunai}}</td>
<td align='right'>{{ number_format($kaedah_tunai, 2, '.', ',') }}</td>
</tr>
<tr>
<td> 2 </td>
<td style='white-space:nowrap;' align='left'><span class="badge badge-pill badge-primary">FPX</span></td>
<td align='center'>{{$bilfpx}}</td>
<td align='right'>{{ number_format($kaedah_fpx, 2, '.', ',') }}</td>
</tr>
<tr>
<td> 3 </td>
<td style='white-space:nowrap;' align='left'><span class="badge badge-pill badge-secondary">CDM</span></td>
<td align='center'>{{$bilcdm}}</td>
<td align='right'>{{ number_format($kaedah_cdm, 2, '.', ',') }}</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="2"><b>JUMLAH KESELURUHAN</b></td>
<td align='center'><b><b>{{$biltunai+$bilfpx+$bilcdm}}</b></td>
<td align='right'><b>{{ number_format($kaedah_tunai+$kaedah_fpx+$kaedah_cdm, 2, '.', ',') }}</b></td>
{{-- <td colspan="5"></td> --}}
</tr>
</tfoot>
</table>
</div>
</div>
</div>
<script>
//Enable tooltips everywhere
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
var tablesahsagonline = $('#sahsagonline').DataTable({});
// $('.addcaw').tooltip();
// $('.export').tooltip();
// // $( '.dt-buttons').addClass('btn-group');
// $( '.addcaw').removeClass('dt-button');
// $( '.export').removeClass('dt-button');
</script>
@endsection