tebus dan hargaemas
This commit is contained in:
@@ -1,61 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Dashboard') }}</div>
|
||||
|
||||
<div class="card-body text-center">
|
||||
|
||||
<h2>Harga Emas Sandaran</h2>
|
||||
|
||||
<div class="mt-5">
|
||||
|
||||
<table class='table mt-4' id='table-emas' style="width:100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Mutu Emas</th>
|
||||
<th>Karat</th>
|
||||
<th>Harga/Gram</th>
|
||||
<th>Tarikh Ubah</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($harga_emas as $index=>$he)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $he['keterangan'] }}</td>
|
||||
<td>{{ $he['karat'] }}</td>
|
||||
<td>{{ $he['harga'] }}</td>
|
||||
<td>{{ $he['tarikhupdate'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<div class="row mt-5 col-12 d-flex justify-content-end">
|
||||
|
||||
<a href="#" class="btn btn-info btn-lg col-3 btn-block">Kemaskini Harga Baru</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
var tableemas = $('#table-emas').DataTable({
|
||||
"scrollX": true
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
@@ -39,12 +39,12 @@
|
||||
<div class="mt-3 col-12">
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<button class="btn btn-info btn-lg btn-block" data-toggle="modal" data-target="#keraianModal" data-backdrop="static" data-keyboard="false">Keraian</button>
|
||||
<button class="btn btn-info btn-lg btn-block" data-toggle="modal" data-target="#SelenggaraModal" data-backdrop="static" data-keyboard="false">Selenggara</button>
|
||||
<button class="btn btn-info btn-lg btn-block" data-toggle="modal" data-target="#BelanjaamModal" data-backdrop="static" data-keyboard="false">Belanja Am</button>
|
||||
<button class="btn btn-info btn-lg btn-block" data-toggle="modal" data-target="#PerubatanModal" data-backdrop="static" data-keyboard="false">Perubatan</button>
|
||||
<button class="btn btn-info btn-lg btn-block" data-toggle="modal" data-target="#DapurModal" data-backdrop="static" data-keyboard="false">Dapur</button>
|
||||
<button class="btn btn-info btn-lg btn-block" data-toggle="modal" data-target="#PosModal" data-backdrop="static" data-keyboard="false">Pos</button>
|
||||
<button class="btn btn-info btn-lg btn-block" data-toggle="modal" data-target="#keraianModal" data-backdrop="static" data-keyboard="false">Keraian</button>
|
||||
<button class="btn btn-info btn-lg btn-block" data-toggle="modal" data-target="#SelenggaraModal" data-backdrop="static" data-keyboard="false">Selenggara</button>
|
||||
<button class="btn btn-info btn-lg btn-block" data-toggle="modal" data-target="#BelanjaamModal" data-backdrop="static" data-keyboard="false">Belanja Am</button>
|
||||
<button class="btn btn-info btn-lg btn-block" data-toggle="modal" data-target="#PerubatanModal" data-backdrop="static" data-keyboard="false">Perubatan</button>
|
||||
<button class="btn btn-info btn-lg btn-block" data-toggle="modal" data-target="#DapurModal" data-backdrop="static" data-keyboard="false">Dapur</button>
|
||||
<button class="btn btn-info btn-lg btn-block" data-toggle="modal" data-target="#PosModal" data-backdrop="static" data-keyboard="false">Pos</button>
|
||||
</div>
|
||||
<div class="col-9">
|
||||
<table class='table mt-4' id='table-panjar' style="width:100%;">
|
||||
@@ -61,12 +61,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- <div class="row mt-4 col-12 d-flex justify-content-end">
|
||||
|
||||
<a href="#" class="btn btn-info btn-lg btn-block ml-1 col-2">Sahkan</a>
|
||||
|
||||
</div> --}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -75,9 +69,39 @@
|
||||
</div>
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
var api_url = "<?php echo $api_url ?>";
|
||||
var kodcaw = "<?php echo $cawangan_info['kodcaw'] ?>";
|
||||
|
||||
|
||||
$(".modal.fade").on("show.bs.modal", function(e) {
|
||||
|
||||
$.ajax({
|
||||
method: 'get',
|
||||
url: api_url + '/api/SenaraiPanjar/list/' + kodcaw,
|
||||
success:function(data)
|
||||
{
|
||||
let today = new Date();
|
||||
let dd = String(today.getDate()).padStart(2, '0');
|
||||
let mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!
|
||||
let yyyy = String(today.getFullYear());
|
||||
|
||||
let yy = yyyy.substring(2, 4);
|
||||
|
||||
let baucerno = 'B' + yy + mm + dd + '-' + String(data.recno).padStart(4, '0');
|
||||
|
||||
$('#' + e.currentTarget.id + ' .baucer').val(baucerno);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var tablepanjar = $('#table-panjar').DataTable({
|
||||
"scrollX": true
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user