Files
lelong/resources/views/marhun/ubahmarhun.blade.php
T
2022-09-06 11:19:26 +08:00

159 lines
6.4 KiB
PHP

@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row ">
<div class="col-md-11 mx-auto card p-4">
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
<form id="exportform" action="{{route('report.exportubahmarhun')}}" method="POST">
@csrf
<h4> Senarai Perubahan Marhun </h4>
<table class="table table-striped table-xl text-center" id="senaraiubahmarhun" style="width:100%">
<thead class="bg-primary text-white">
<!--<tr>
<th width="5%" align="left"></th>
<th width="25%" align="left"></th>
<th width="5%" align="left"></th>
<th width="25%" align="left"></th>
<th width="25%" align="left" colspan='4'>Maklumat Marhun</th>
<th width="25%" align="left">Marhun Asal</th>
<th width="25%" align="left">Marhun Ubah</th>
<th width="25%" align="left">Marhun Ubah</th>
<th width="25%" align="left"></th>
<th width="25%" align="left"></th>
</tr>-->
<tr>
<th width="5%" align="left">No</th>
<th width="25%" align="left">Cawangan</th>
<th width="5%" align="left">Lelong ID</th>
<th width="25%" align="left">No Rujukan</th>
<th width="5%" align="left">Karat Asal</th>
<th width="5%" align="left">Karat Baru</th>
<th width="5%" align="left">Berat Asal</th>
<th width="5%" align="left">Berat Baru</th>
<th width="15%" align="left">Tarikh Mohon</th>
<th width="15%" align="left">Tarikh Disahkan</th>
</tr>
</thead>
<tbody>
@foreach ($arraydetails as $info)
<tr>
<td width="5%" align="center">{{ $loop->iteration }} </td>
@foreach($info['details'] as $details)
<td width="14%" align="center">{{ $details['caw_name'] }}</td>
@endforeach
<td width="14%" align="center">{{ $info['lap']['lelong_id'] }}</td>
<td width="14%" align="center">{{ $info['lap']['norujukan'] }}</td>
<td width="17%" align="center">{{ $info['lap']['old_karat'] }}</td>
<td width="17%" align="center">{{ $info['lap']['karat'] }}</td>
<td width="17%" align="center">{{ number_format($info['lap']['old_berat'], 2, '.', ',') }}</td>
<td width="17%" align="center">{{ number_format($info['lap']['berat'], 2, '.', ',') }}</td>
<td width="17%" align="center">{{ $info['lap']['diminta_pada'] }}</td>
<td width="17%" align="center">{{ $info['lap']['disahkan_pada'] }}</td>
</tr>
@endforeach
</tbody>
</table>
</form>
</div>
</div>
</div>
<script>
//Enable tooltips everywhere
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
var tablesenarailelongonline = $('#senarailelongonline').DataTable({
"columnDefs": [
{
"targets": 0,
"orderable": false
},
{
"targets": 3,
"orderable": false
}
],
order: [[1, 'asc']],
"info": false,
"lengthChange": false,
"pageLength": 15,
dom: 'Bfrtip',
// buttons: [
// {
// className: 'btn btn-outline-success pl-4 pr-4 btn-sm addcaw',
// text: '<i class="fas fa-plus" id="test"></i>',
// titleAttr: 'Tambah Cawangan',
// action: function ( e, dt, node, config ) {
// // alert( 'Button activated' );
// // console.log('hye');
// $('#myModal').modal("show");
// $('#myModal').on('shown.bs.modal', function () {
// $('#rolename').trigger('focus')
// })
// }
// },
// {
// className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export',
// titleAttr: 'Export to CSV',
// text: '<i class="fas fa-download"></i>',
// action: function ( e, dt, node, config ) {
// $("#exportform").submit();
// }
// }
// ]
});
// $('.addcaw').tooltip();
// $('.export').tooltip();
// // $( '.dt-buttons').addClass('btn-group');
// $( '.addcaw').removeClass('dt-button');
// $( '.export').removeClass('dt-button');
var tableubah = $('#senaraiubahmarhun').DataTable( {
"columnDefs": [
{
"targets": 0,
"orderable": false
}
],
order: [[0, 'asc']],
// "ordering": false,
"searching":false,
"info": false,
"lengthChange": false,
"pageLength": 15,
dom: 'Bfrtip',
buttons: [
{
className: 'btn btn-outline-danger pl-4 pr-4 btn-sm export',
titleAttr: 'Muat Turun PDF',
text: '<h8><b>PDF</b></h8>',
action: function ( e, dt, node, config ) {
$("#exportform").submit();
}
}
]
});
$('.addsim').tooltip();
$('.export').tooltip();
// $( '.dt-buttons').addClass('btn-group');
$( '.addsim').removeClass('dt-button');
$( '.export').removeClass('dt-button');
</script>
@endsection