Fix status pembayaran by cawangan operasi and akaun

This commit is contained in:
Amir
2023-02-19 09:55:40 +08:00
parent 168f147ffd
commit a8bb735263
11 changed files with 294 additions and 17 deletions
+1 -1
View File
@@ -808,7 +808,7 @@
</div>
</a>
</li>
<li {{ (request()->is('account/statuspembayaran/*') || request()->is('account/statuspembayaran') ) ? 'active' : '' }}">
<li class="{{ (request()->is('account/statuspembayaran')) ? 'active' : '' }}">
<a href="{{url('account/statuspembayaran')}}">
<div class="sidebar-menu-main-title">
<span class="material-symbols-rounded sidebar-menu-item-main">
@@ -37,8 +37,8 @@
<th>Jumlah Bidaan(RM)</th>
<th>Amaun Telah Dibayar(RM)</th>
<th>Status Bayaran</th>
<th>Penyata Bayaran</th>
<th>Slip Serahan</th>
<th>Penyata Pemenang</th>
<th>Slip Serahan Marhun</th>
{{-- <th>Resit Pembayaran</th> --}}
<th class="text-center">Tindakan</th>
</tr>
@@ -8,7 +8,7 @@
<div class="card">
<div class="card-header header-style">
<div class="header-style-title">
Senarai Status Pembayaran
Status Pembayaran (Mengikut Cawangan)
</div>
</div>
<div class="card-body">
@@ -0,0 +1,197 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row ">
<div class="col">
<div class="card">
<div class="card-header header-style">
<div class="header-style-title">
Status Pembayaran (Mengikut Cawangan)
</div>
</div>
<div class="card-body">
@hasrole('operasi')
<a href="{{ route('pembida.statuspembayaranbypembida') }}" class="btn btn-success mb-2">Status Pembayaran Mengikut Nama Pembida</a>
@endhasrole
@hasrole('account')
<a href="{{ route('account.statuspembayaranbypembida') }}" class="btn btn-success mb-2">Status Pembayaran Mengikut Nama Pembida</a>
@endhasrole
<ul class="nav mb-2 nav-tabs" id="myTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="sedang-lelong-tab" data-toggle="tab" href="#sedang-lelong" role="tab" aria-controls="sedang-lelong" aria-selected="false">
Lelongan Semasa
</a>
</li>
<li class="nav-item">
<a class="nav-link" id="selesai-lelong-tab" data-toggle="tab" href="#selesai-lelong" role="tab" aria-controls="selesai-lelong" aria-selected="false">
Lelongan Selesai
</a>
</li>
</ul>
<div class="tab-content" style="overflow-x: auto;" id="myTabContent">
<div class="tab-pane fade show active" id="sedang-lelong" role="tabpanel" aria-labelledby="sedang-lelong-tab">
@if($lelong_array_semasa != null)
<table class="table table-bordered" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th class="text-center">No</th>
<th class="text-center">Batch Lelong</th>
<th class="text-center">Tarikh Lelong</th>
<th>Cawangan</th>
</tr>
</thead>
<tbody>
@foreach($lelong_array_semasa as $lelong)
<tr>
<td class="text-center">{{ $loop->iteration }}</td>
<td class="text-center">{{ $lelong['lelong_id'] }}</td>
<td class="text-center text-nowrap">
@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $lelong['tarikh_lelong'] );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp
</td>
<td>
@foreach($lelong['cawangan'] as $cawangan)
<div class="mb-1">@hasrole('operasi')<a class="btn btn-primary btn-sm mr-1" href="{{ route('pembida.pembayaranbidaan', ['lelong_id'=>$lelong['lelong_id'], 'kodcaw'=>$cawangan['caw_code']]) }}" data-toggle="tooltip" data-placement="top" title="Butiran"><i class="far fa-edit"></i></a>@endhasrole{{ $cawangan['caw_name'] }}</div>
<table class="table table-bordered mb-5" width="10">
<thead class="bg-primary text-white">
<tr>
<th class="text-centere">No</th>
<th style="min-width: 200px;">Pembida</th>
<th class="text-right" style="min-width: 125px;">Jumlah Bidaan</th>
<th class="text-center">Status Bayaran</th>
<th class="text-center">Jenis Bayaran</th>
</tr>
</thead>
<tbody>
@foreach($cawangan['pembida'] as $pembida)
<tr>
<td class="text-center">{{ $loop->iteration }}</td>
<td class="text-uppercase">{{ $pembida['name_bidder'] }}</td>
<td class="text-right">{{ number_format($pembida['jumlah_bidaan'], 2, '.', ',')}}</td>
<td class="text-center">
@if($pembida['status_bayaran'] == 1)
<button class="btn btn-sm btn-success" disabled>Selesai Bayar</button>
@elseif($pembida['status_bayaran'] == 2)
<button class="btn btn-sm btn-warning" disabled>Tungguh Pengesahan</button>
@else
<button class="btn btn-sm btn-danger" disabled>Belum Bayar</button>
@endif
</td>
<td class="text-center">
@if($pembida['jenis_bayaran'] == 1)
<span class="badge badge-pill badge-dark">TUNAI</span>
@elseif($pembida['jenis_bayaran'] == 2)
<span class="badge badge-pill badge-primary">FPX</span>
@else
<span class="badge badge-pill badge-secondary">CDM</span>
@endif
</td>
</tr>
@endforeach
<tr>
<td class="text-center" colspan="2">JUMLAH KESELURUHAN</td>
<td class="text-right">{{ number_format($cawangan['jumlah_bidaan_cawangan'], 2, '.', ',')}}</td>
</tr>
</tbody>
</table>
@endforeach
</td>
</tr>
@endforeach
</tbody>
</table>
@endif
</div>
<div class="tab-pane fade" id="selesai-lelong" role="tabpanel" aria-labelledby="selesai-lelong-tab">
@if($lelong_array_selesai != null)
<table class="table table-bordered" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th class="text-center">No</th>
<th class="text-center">Batch Lelong</th>
<th class="text-center">Tarikh Lelong</th>
<th>Cawangan</th>
</tr>
</thead>
<tbody>
@foreach($lelong_array_selesai as $lelong)
<tr>
<td class="text-center">{{ $loop->iteration }}</td>
<td class="text-center">{{ $lelong['lelong_id'] }}</td>
<td class="text-center text-nowrap">
@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $lelong['tarikh_lelong'] );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp
</td>
<td>
@foreach($lelong['cawangan'] as $cawangan)
<div class="mb-1">@hasrole('operasi')<a class="btn btn-primary btn-sm mr-1" href="{{ route('pembida.pembayaranbidaan', ['lelong_id'=>$lelong['lelong_id'], 'kodcaw'=>$cawangan['caw_code']]) }}" data-toggle="tooltip" data-placement="top" title="Butiran"><i class="far fa-edit"></i></a>@endhasrole{{ $cawangan['caw_name'] }}</div>
<table class="table table-bordered mb-5" width="10">
<thead class="bg-primary text-white">
<tr>
<th class="text-centere">No</th>
<th style="min-width: 200px;">Pembida</th>
<th class="text-right" style="min-width: 125px;">Jumlah Bidaan</th>
<th class="text-center">Status Bayaran</th>
<th class="text-center">Jenis Bayaran</th>
</tr>
</thead>
<tbody>
@foreach($cawangan['pembida'] as $pembida)
<tr>
<td class="text-center">{{ $loop->iteration }}</td>
<td class="text-uppercase">{{ $pembida['name_bidder'] }}</td>
<td class="text-right">{{ number_format($pembida['jumlah_bidaan'], 2, '.', ',')}}</td>
<td class="text-center">
@if($pembida['status_bayaran'] == 1)
<button class="btn btn-sm btn-success" disabled>Selesai Bayar</button>
@elseif($pembida['status_bayaran'] == 2)
<button class="btn btn-sm btn-warning" disabled>Tungguh Pengesahan</button>
@else
<button class="btn btn-sm btn-danger" disabled>Belum Bayar</button>
@endif
</td>
<td class="text-center">
@if($pembida['jenis_bayaran'] == 1)
<span class="badge badge-pill badge-dark">TUNAI</span>
@elseif($pembida['jenis_bayaran'] == 2)
<span class="badge badge-pill badge-primary">FPX</span>
@else
<span class="badge badge-pill badge-secondary">CDM</span>
@endif
</td>
</tr>
@endforeach
<tr>
<td class="text-center" colspan="2">JUMLAH KESELURUHAN</td>
<td class="text-right">{{ number_format($cawangan['jumlah_bidaan_cawangan'], 2, '.', ',')}}</td>
</tr>
</tbody>
</table>
@endforeach
</td>
</tr>
@endforeach
</tbody>
</table>
@endif
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(function() {
$('[data-toggle="tooltip"]').tooltip()
});
</script>
@endsection
@@ -7,8 +7,18 @@
<div class="col">
<div class="card">
<div class="card-header header-style">
@hasrole('operasi')
<a href="{{ route('pembida.statuspembayaran') }}" class="header-style-icon">
<i class="fas fa-arrow-left"></i>
</a>
@endhasrole
@hasrole('account')
<a href="{{ route('account.statuspembayaran') }}" class="header-style-icon">
<i class="fas fa-arrow-left"></i>
</a>
@endhasrole
<div class="header-style-title">
Senarai Status Pembayaran
Status Pembayaran (Mengikut Nama)
</div>
</div>
<div class="card-body">
@@ -18,14 +28,6 @@
</div>
@endif
<div class="mb-3">
{{-- <a href=" {{ route('report.lelongreport',[$lelongid,$cawid]) }}" class="btn btn-outline-success">Muat Turun PDF</a> --}}
@hasrole('operasi')
<a href="{{ route('pembida.statuspembayaran') }}" class="btn btn-success">Status Pembayaran Mengikut Cawangan</a>
@endhasrole
@hasrole('account')
<a href="{{ route('account.statuspembayaran') }}" class="btn btn-success">Status Pembayaran Mengikut Cawangan</a>
@endhasrole
</div>
<table class="table table-bordered table-xl text-center" id="senarailelongonline" style="width:100%">
<thead class="bg-primary text-white">
@@ -40,7 +40,7 @@
style="width:600px;border-collapse:collapse;border:1px solid #cccccc;border-spacing:0;text-align:left;">
<tr style="border-collapse:collapse;border:1px solid #cccccc;border-spacing:0;">
<td align="left" style="padding:10px 25px;background:#fff; display: flex; align-items: center;">
<span style="font-weight: bold; padding-top: 10px;"> Sistem Lelong Online </span>
<span style="font-weight: bold; padding-top: 10px;"> ArrahnBid</span>
</td>
</tr>
<tr>
@@ -68,7 +68,7 @@
<p style="margin:100px 0 12px 0;font-size:14px;font-family:Arial,sans-serif;">
Terima Kasih, </p>
<p style="margin:0 0 12px 0;font-size:14px;font-family:Arial,sans-serif;">
Sistem Lelong Online </p>
ArrahnBid</p>
</td>
</tr>
</table>