142 lines
6.0 KiB
PHP
142 lines
6.0 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
<div class="container-fluid">
|
|
<div class="row ">
|
|
<div class="col-md-11 mx-auto card p-4">
|
|
<form action="{{ route('pengesahan.terimaperubahan') }}" method="POST" id="formmutumarhun">
|
|
@csrf
|
|
<input type="hidden" name="pengesahan_id" value="{{ $pengesahan_id }}" />
|
|
<input type="hidden" name="norujukan" value="{{ $norujukan }}" />
|
|
|
|
@if ($message = Session::get('success'))
|
|
<div class="alert alert-success">
|
|
<p>{{ $message }}</p>
|
|
</div>
|
|
@endif
|
|
<table class="table table-striped table-xl text-center" id="tablemutumarhun" style="width:100%">
|
|
<thead class="bg-primary text-white">
|
|
<tr>
|
|
<th>Bil</th>
|
|
<th>No Rujukan</th>
|
|
<th>Marhun</th>
|
|
<th>Karat</th>
|
|
<th>Berat</th>
|
|
<th>Harga (RM)</th>
|
|
<th>Nilai Marhun</th>
|
|
<th>Harga Asas</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($marhuns as $marhun)
|
|
<tr>
|
|
<td>{{ $loop->iteration }}</td>
|
|
<td>{{ $lelongbid->norujukan }}</td>
|
|
<td>
|
|
@if($marhun['old_marhun'] != $marhun['marhun'])
|
|
{{ $marhun['old_marhun'] }} <i class="btn fa fa-arrow-right" aria-hidden="true"></i>
|
|
@endif
|
|
{{ $marhun['marhun'] }}
|
|
</td>
|
|
<td>
|
|
@if($marhun['old_karat'] != $marhun['karat'])
|
|
{{ $marhun['old_karat'] }} <i class="btn fa fa-arrow-right" aria-hidden="true"></i>
|
|
@endif
|
|
{{ $marhun['karat'] }}
|
|
</td>
|
|
<td>
|
|
@if($marhun['old_berat'] != $marhun['berat'])
|
|
{{ number_format($marhun['old_berat'], 2, '.', '') }} <i class="btn fa fa-arrow-right" aria-hidden="true"></i>
|
|
@endif
|
|
{{ $marhun['berat'] }}
|
|
</td>
|
|
<td>
|
|
@if($marhun['old_harga'] != $marhun['harga'])
|
|
{{ number_format($marhun['old_harga'], 2, '.', '') }} <i class="btn fa fa-arrow-right" aria-hidden="true"></i>
|
|
@endif
|
|
{{ $marhun['harga'] }}
|
|
</td>
|
|
<td>
|
|
@if($marhun['old_nilaimarhun'] != $marhun['n_marhun'])
|
|
{{ number_format($marhun['old_nilaimarhun'], 2, '.', '') }} <i class="btn fa fa-arrow-right" aria-hidden="true"></i>
|
|
@endif
|
|
{{ $marhun['n_marhun'] }}
|
|
</td>
|
|
<td>
|
|
@if($marhun['old_hargaasas'] != $marhun['hargaasas'])
|
|
{{ number_format($marhun['old_hargaasas'], 2, '.', '') }} <i class="btn fa fa-arrow-right" aria-hidden="true"></i>
|
|
@endif
|
|
{{ $marhun['hargaasas'] }}
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
<div class="modal-footer" style="margin-top:2%;">
|
|
<a href="{{ route('pengesahan.perubahanmutumarhun') }}" class="btn btn-primary">Kembali</a>
|
|
<button type="button" class="btn btn-success" onclick="functerima()" >Sahkan</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
//Enable tooltips everywhere
|
|
$(function () {
|
|
$('[data-toggle="tooltip"]').tooltip()
|
|
})
|
|
function functerima(){
|
|
$("#formmutumarhun").submit();
|
|
}
|
|
|
|
var tablelelong = $('#tablelelong').DataTable( {
|
|
"columnDefs": [
|
|
{
|
|
"targets": 0,
|
|
"orderable": false
|
|
}
|
|
],
|
|
order: [[1, 'asc']],
|
|
// "ordering": false,
|
|
"info": false,
|
|
"lengthChange": false,
|
|
// "pageLength": 15,
|
|
"paginate" : false,
|
|
// dom: 'Bfrtip',
|
|
// buttons: [
|
|
// // 'copy', 'excel', 'pdf'
|
|
// // { text: 'copy', className: 'btn btn-primary' },
|
|
// {
|
|
// className: 'btn btn-outline-success pl-4 pr-4 btn-sm addsim',
|
|
// text: '<i class="fas fa-plus" id="test"></i>',
|
|
// titleAttr: 'Tambah Simulasi',
|
|
// action: function ( e, dt, node, config ) {
|
|
// alert( 'Button activated' );
|
|
// }
|
|
// },
|
|
// {
|
|
// 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();
|
|
// }
|
|
// }
|
|
// ]
|
|
});
|
|
|
|
// $('.addsim').tooltip();
|
|
// $('.export').tooltip();
|
|
// // $( '.dt-buttons').addClass('btn-group');
|
|
// $( '.addsim').removeClass('dt-button');
|
|
// $( '.export').removeClass('dt-button');
|
|
|
|
// function selectall(cb) {
|
|
// tablelelong.rows().nodes().to$().find('input[type="checkbox"]').each(function(){
|
|
// $(this).prop('checked', cb.checked);
|
|
// })
|
|
// }
|
|
</script>
|
|
|
|
@endsection
|