kemaskini mutu marhun
This commit is contained in:
@@ -19,6 +19,10 @@ use App\Models\LelongBidMarhun;
|
||||
use App\Models\LelKarat;
|
||||
use App\Models\LelKarat_temp;
|
||||
|
||||
use App\Models\Pengesahan;
|
||||
use App\Models\GadaiMarhun;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class MarhunController extends Controller
|
||||
{
|
||||
/**
|
||||
@@ -51,40 +55,52 @@ class MarhunController extends Controller
|
||||
|
||||
public function kemaskini(Request $request)
|
||||
{
|
||||
// dd($request->all());
|
||||
$user = Auth::user();
|
||||
|
||||
|
||||
$currentdate = Carbon::now();
|
||||
$currentdate = $currentdate->toDateTimeString();
|
||||
|
||||
// dd($request->all());
|
||||
$marhun = LelongBidMarhun::where('id','=',$request->idmarhun)->first();
|
||||
$lelongbid = LelongBid::where('id','=',$marhun->lelongbid_id)->first();
|
||||
// dd($lelongbid);
|
||||
$caw = CawanganLelong::where('id','=',$lelongbid->caw_id)->first();
|
||||
$lelong = Lelong::where('id','=',$lelongbid->lelong_id)->first();
|
||||
|
||||
$simkarat = LelKarat::where('lelong_id','=',$lelong->id)->get();
|
||||
// $simkarat = LelKarat::where('lelong_id','=',$lelong->id)->get();
|
||||
|
||||
foreach($simkarat as $karat)
|
||||
{
|
||||
if($karat->karat == $request->karat)
|
||||
{
|
||||
// foreach($simkarat as $karat)
|
||||
// {
|
||||
// if($karat->karat == $request->karat)
|
||||
// {
|
||||
if($request->karat != $marhun->karat)
|
||||
{
|
||||
$karat = new Pengesahan;
|
||||
$karat->lelong_id = $lelong->id;
|
||||
$karat->lelongbid_id = $lelongbid->id;
|
||||
$karat->norujukan = $lelongbid->norujukan;
|
||||
$karat->diminta_oleh = $user->id;
|
||||
$karat->diminta_pada = $currentdate;
|
||||
$karat->save();
|
||||
}
|
||||
$bezaberat = $marhun->berat - $request->berat_emas;
|
||||
// $bezahargaasas = $marhun->hargaasas - $request->hargaasas;
|
||||
$val = round($request->berat_emas * $karat->harga);
|
||||
|
||||
// $val = round($request->berat_emas * $karat->harga);
|
||||
|
||||
$marhun->marhun = $request->marhun;
|
||||
$marhun->karat = $request->karat;
|
||||
$marhun->berat = $request->berat_emas;
|
||||
$marhun->harga = $request->harga;
|
||||
$marhun->n_marhun = $request->berat_emas * $karat->harga;
|
||||
$marhun->hargaasas = floatval(number_format($val,2));
|
||||
$marhun->n_marhun = $request->nilai_marhun;
|
||||
$marhun->hargaasas = $request->harga_asas;
|
||||
$marhun->save();
|
||||
|
||||
$lelongbid->berat = $lelongbid->berat - ($bezaberat);
|
||||
// $lelongbid->hargaasas = $lelongbid->hargaasas - ($bezahargaasas);
|
||||
$lelongbid->save();
|
||||
|
||||
}
|
||||
}
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
return redirect()->route('marhun.show',$lelongbid->id)
|
||||
@@ -95,14 +111,13 @@ class MarhunController extends Controller
|
||||
{
|
||||
$lelongbid = LelongBid::where('id','=',$id)->first();
|
||||
$marhun = LelongBidMarhun::where('lelongbid_id','=',$id)->get();
|
||||
|
||||
$lelkarat = LelKarat::where('lelong_id','=',$lelongbid->lelong_id)->get();
|
||||
$karatall = JenisKarat::all();
|
||||
$emasall = JenisEmas::all();
|
||||
|
||||
return view('marhun.marhun',compact('marhun','lelongbid','karatall','emasall'));
|
||||
// dd($lelkarat);
|
||||
return view('marhun.marhun',compact('marhun','lelongbid','karatall','emasall','lelkarat'));
|
||||
}
|
||||
|
||||
|
||||
public function exportmarhundetails(Request $request)
|
||||
{
|
||||
$lelongbid = LelongBid::where('id','=',$request->lelongbid)->first();
|
||||
@@ -140,6 +155,81 @@ class MarhunController extends Controller
|
||||
|
||||
return view('marhun.senarailelongmarhun',compact('senarai'));
|
||||
}
|
||||
|
||||
public function sahubahmutu(Request $request)
|
||||
{
|
||||
// dd($request->all());
|
||||
$mutumarhun = Pengesahan::join('lelong', 'pengesahan.lelong_id', '=', 'lelong.id')
|
||||
->select(
|
||||
'pengesahan.id as pengesahan_id',
|
||||
'pengesahan.norujukan',
|
||||
'lelong.tarikh_lelong'
|
||||
)
|
||||
->get();
|
||||
|
||||
return view('pengesahan.perubahanmutumarhun', compact('mutumarhun'));
|
||||
}
|
||||
|
||||
public function mutumarhun($pengesahan_id)
|
||||
{
|
||||
$pengesahan = Pengesahan::where('id', $pengesahan_id)
|
||||
->first();
|
||||
|
||||
$marhuns = LelongBidMarhun::where('lelongbid_id', $pengesahan->lelongbid_id)
|
||||
->get()->toArray();
|
||||
|
||||
$lelongbid = LelongBid::where('id', $pengesahan->lelongbid_id)->first();
|
||||
$karat = Lelkarat::where('lelong_id', $pengesahan->lelong_id)->get();
|
||||
|
||||
foreach($marhuns as $index1=>$marhun)
|
||||
{
|
||||
$gadaimarhun = GadaiMarhun::where('marhun', $marhun['marhun'])
|
||||
->where('norujukan', $lelongbid->norujukan)
|
||||
->first();
|
||||
|
||||
$karat = $karat->where('karat', $gadaimarhun->karat)->first();
|
||||
|
||||
$total = $karat->harga * $gadaimarhun->berat;
|
||||
$hargaasas = round($total);
|
||||
// if($gadaimarhun->karat == $marhun['karat'])
|
||||
// {
|
||||
// $status = 0;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// $status = 1;
|
||||
// }
|
||||
$marhuns[$index1]['old_marhun'] = $gadaimarhun->marhun;
|
||||
$marhuns[$index1]['old_karat'] = $gadaimarhun->karat;
|
||||
// $marhun[$index1]['status_perubahan'] = $status;
|
||||
$marhuns[$index1]['old_berat'] = $gadaimarhun->berat;
|
||||
$marhuns[$index1]['old_harga'] = $karat->harga;
|
||||
$marhuns[$index1]['old_nilaimarhun'] = $total;
|
||||
$marhuns[$index1]['old_hargaasas'] = $hargaasas;
|
||||
// $marhun
|
||||
}
|
||||
return view('pengesahan.mutumarhun', compact('marhuns', 'lelongbid', 'pengesahan_id'));
|
||||
}
|
||||
|
||||
public function terimaperubahan(Request $request)
|
||||
{
|
||||
//update mutu marhun - gadaimarhun
|
||||
$user = Auth::user();
|
||||
|
||||
$currentdate = Carbon::now();
|
||||
$currentdate = $currentdate->toDateTimeString();
|
||||
|
||||
$pengesahan = Pengesahan::where('id', $request->pengesahan_id)
|
||||
->first();
|
||||
dd($pengesahan);
|
||||
$pengesahan->disahkan_oleh = $user->id;
|
||||
$pengesahan->disahkan_pada = $currentdate;
|
||||
$pengesahan->update();
|
||||
|
||||
// $updategadaimarhun = GadaiMarhun::where('')
|
||||
|
||||
//update status lelongbidmarhun = tangguh
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Pengesahan extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'pengesahan';
|
||||
|
||||
protected $fillable = [
|
||||
'lelong_id',
|
||||
'lelongbid_id',
|
||||
'norujukan',
|
||||
'disahkan_oleh',
|
||||
'disahkan_pada',
|
||||
'diminta_oleh',
|
||||
'diminta_pada',
|
||||
'status'
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePengesahanTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pengesahan', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('lelong_id')->unsigned();
|
||||
$table->unsignedBigInteger('lelongbid_id')->unsigned();
|
||||
$table->string('norujukan');
|
||||
$table->integer('disahkan_oleh')->nullable();
|
||||
$table->datetime('disahkan_pada')->nullable();
|
||||
$table->integer('diminta_oleh');
|
||||
$table->datetime('diminta_pada');
|
||||
$table->integer('status')->default(0); //1 = terima
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('lelong_id')
|
||||
->references('id')->on('lelong')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreign('lelongbid_id')
|
||||
->references('id')->on('lelongbid')
|
||||
->onDelete('cascade');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pengesahan');
|
||||
}
|
||||
}
|
||||
@@ -107,6 +107,10 @@ class RolesSeeder extends Seeder
|
||||
'name' => 'pengesahanpembida',
|
||||
'description' => 'Pengesahan Pembida Baru'
|
||||
]);
|
||||
Permission::create([
|
||||
'name' => 'pengesahan',
|
||||
'description' => 'Pengesahan Perubahan Mutu Marhun'
|
||||
]);
|
||||
|
||||
//account
|
||||
Permission::create([
|
||||
@@ -158,6 +162,7 @@ class RolesSeeder extends Seeder
|
||||
$role6->givePermissionTo('tangguhan');
|
||||
$role6->givePermissionTo('analisa');
|
||||
$role6->givePermissionTo('pengesahanpembida');
|
||||
$role6->givePermissionTo('pengesahan');
|
||||
|
||||
$role7 = Role::create(['name' => 'account']);
|
||||
$role7->givePermissionTo('pengesahanbayaran');
|
||||
|
||||
@@ -112,6 +112,14 @@
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="{{ (request()->is('Pengesahan/*')) ? 'active' : '' }}">
|
||||
<a href="#pengesahanSubmenu" data-toggle="collapse" aria-expanded="false" style="">Pengesahan</a>
|
||||
<ul class="list-unstyled collapse {{ (request()->is('pengesahan/*')) ? 'show' : '' }}" id="pengesahanSubmenu" >
|
||||
<li class="{{ (request()->is('pengesahan/perubahanmutumarhun/*') || request()->is('pengesahan/perubahanmutumarhun') ) ? 'active' : '' }}">
|
||||
<a href="{{url('pengesahan/perubahanmutumarhun')}}">Perubahan Mutu Marhun</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="{{ (request()->is('Pembida/*')) ? 'active' : '' }}">
|
||||
<a href="#pembidaSubmenu" data-toggle="collapse" aria-expanded="false" style="">Pembida</a>
|
||||
<ul class="list-unstyled collapse {{ (request()->is('pembida/*')) ? 'show' : '' }}" id="pembidaSubmenu" >
|
||||
|
||||
@@ -85,51 +85,50 @@
|
||||
}
|
||||
});
|
||||
|
||||
var tablelelong = $('#tablelelong').DataTable( {
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 6,
|
||||
"orderable": false
|
||||
var tablelelong = $('#tablelelong').DataTable( {
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 6,
|
||||
"orderable": false
|
||||
}
|
||||
],
|
||||
order: [[1, 'asc']],
|
||||
// "ordering": false,
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 15,
|
||||
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' );
|
||||
}
|
||||
],
|
||||
order: [[1, 'asc']],
|
||||
// "ordering": false,
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 15,
|
||||
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();
|
||||
}
|
||||
},
|
||||
{
|
||||
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');
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
$('.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(){
|
||||
|
||||
@@ -69,52 +69,52 @@
|
||||
}
|
||||
});
|
||||
|
||||
var tablemarhun = $('#marhun').DataTable( {
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 9,
|
||||
"orderable": false
|
||||
}
|
||||
],
|
||||
order: [[1, 'asc']],
|
||||
// "ordering": false,
|
||||
"searching": false,
|
||||
"paging": false,
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 15,
|
||||
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 Marhun',
|
||||
// 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();
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
});
|
||||
var tablemarhun = $('#marhun').DataTable( {
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 9,
|
||||
"orderable": false
|
||||
}
|
||||
],
|
||||
order: [[1, 'asc']],
|
||||
// "ordering": false,
|
||||
"searching": false,
|
||||
"paging": false,
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 15,
|
||||
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 Marhun',
|
||||
// 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');
|
||||
$('.addsim').tooltip();
|
||||
$('.export').tooltip();
|
||||
// $( '.dt-buttons').addClass('btn-group');
|
||||
$( '.addsim').removeClass('dt-button');
|
||||
$( '.export').removeClass('dt-button');
|
||||
|
||||
|
||||
function selectall(cb) {
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
</div>
|
||||
<div class="col-md-4">Karat</div>
|
||||
<div class="col-md-8">
|
||||
<select class="form-control" name="karat" id="selectkarat">
|
||||
<select class="form-control" name="karat" id="selectkarat" data-karatall="{{$lelkarat}}" onchange="calc(this,'karat')">
|
||||
<option disabled selected value> -- Pilih Karat -- </option>
|
||||
@foreach ($karatall as $karat)
|
||||
<option value="{{$karat->karat}}"> {{ $karat->keterangan}}</option>
|
||||
@@ -95,7 +95,7 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4">Berat</div>
|
||||
<div class="col-md-8"><input class="form-control" type="text" name="berat_emas" id="berat_emas"></div>
|
||||
<div class="col-md-8"><input class="form-control" type="text" name="berat_emas" id="berat_emas" oninput="calc(this,'berat')"></div>
|
||||
<div class="col-md-4">Harga</div>
|
||||
<div class="col-md-8"><input class="form-control .harga" type="text" name="harga" id="harga" readonly></div>
|
||||
<div class="col-md-4">Nilai Marhun</div>
|
||||
@@ -218,6 +218,35 @@
|
||||
$('#nota').val(nota);
|
||||
}
|
||||
|
||||
function calc(e,type)
|
||||
{
|
||||
if(type =='karat')
|
||||
{
|
||||
var karatall = $(e).data('karatall');
|
||||
karatall.forEach((item) =>{
|
||||
if(item.karat == $(e).val())
|
||||
{
|
||||
var total = item.harga * $('#berat_emas').val();
|
||||
var hargaasas = Math.round(total);
|
||||
$('#harga').val(parseFloat(item.harga).toFixed(2));
|
||||
$('#nilai_marhun').val(parseFloat(total).toFixed(2));
|
||||
$('#harga_asas').val(parseFloat(hargaasas).toFixed(2));
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
var total = $('#harga').val() * $('#berat_emas').val();
|
||||
var hargaasas = Math.round(total);
|
||||
$('#nilai_marhun').val(parseFloat(total).toFixed(2));
|
||||
$('#harga_asas').val(parseFloat(hargaasas).toFixed(2));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function updateform()
|
||||
{
|
||||
$("#formkemaskini").submit();
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
@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="type" name="pengesahan_id" value="{{ $pengesahan_id }}" />
|
||||
|
||||
@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>
|
||||
<a href="{{ route('pengesahan.perubahanmutumarhun') }}" class="btn btn-success" onclick="terima()">Sahkan</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
//Enable tooltips everywhere
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
})
|
||||
|
||||
function terima(){
|
||||
$('#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
|
||||
@@ -0,0 +1,96 @@
|
||||
@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
|
||||
<table class="table table-striped table-xl text-center" id="tablelelong" style="width:100%">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Tarikh Lelong</th>
|
||||
<th>No Rujukan</th>
|
||||
<th class="text-center">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($mutumarhun as $marhun)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $marhun['tarikh_lelong'] }}</td>
|
||||
<td>{{ $marhun['norujukan'] }}</td>
|
||||
<td>
|
||||
<a href=" {{ route('pengesahan.mutumarhun', ['pengesahan_id'=>$marhun['pengesahan_id']] ) }} " data-toggle="tooltip" data-placement="top" title="Butiran Mutu Marhun"><i class="far fa-edit"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
//Enable tooltips everywhere
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
})
|
||||
|
||||
var tablelelong = $('#tablelelong').DataTable( {
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 3,
|
||||
"orderable": false
|
||||
}
|
||||
],
|
||||
order: [[1, 'asc']],
|
||||
// "ordering": false,
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 15,
|
||||
// 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
|
||||
@@ -142,6 +142,12 @@ Route::group(['middleware' => ['permission:pengesahanpembida'],'prefix'=>'pembid
|
||||
Route::get('/kemaskini/{id}',['as'=>'pembida.kemaskini','uses'=>'PembidaController@kemaskini']);
|
||||
Route::post('/update',['as'=>'pembida.update','uses'=>'PembidaController@update']);
|
||||
});
|
||||
|
||||
Route::group(['middleware' => ['permission:pengesahan'],'prefix'=>'pengesahan'], function () {
|
||||
Route::get('/perubahanmutumarhun',['as'=>'pengesahan.perubahanmutumarhun','uses'=>'MarhunController@sahubahmutu']);
|
||||
Route::get('/mutumarhun/{pengesahan_id}',['as'=>'pengesahan.mutumarhun','uses'=>'MarhunController@mutumarhun']);
|
||||
Route::post('/terimaperubahan',['as'=>'pengesahan.terimaperubahan','uses'=>'MarhunController@terimaperubahan']);
|
||||
});
|
||||
//Operasi
|
||||
|
||||
Route::group(['middleware' => ['permission:serahan'],'prefix'=>'serahan'], function () {
|
||||
|
||||
Reference in New Issue
Block a user