Merge branch 'main' into faiqahzaman

This commit is contained in:
faiqahzaman
2022-06-07 08:37:25 +08:00
17 changed files with 1195 additions and 269 deletions
+10 -3
View File
@@ -18,6 +18,7 @@
<th>No</th>
<th>Lelong ID</th>
<th>Tarikh Lelong</th>
<th>Fasa</th>
<th>Cawangan</th>
<th>Masa Tamat Lelong</th>
<th>Harga Emas Asas</th>
@@ -32,8 +33,13 @@
<tr>
<td>{{$loop->iteration}}</td>
<td>{{ $lel['info']['lelong_id'] }}</td>
<td>{{ $lel['info']['tarikh_lelong']}}</td>
<td>
<td>@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $lel['info']['tarikh_lelong'] );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp</td>
<td>{{$lel['info']['fasa']}}</td>
<td align = 'left'>
@foreach($lel['detailsinfo'] as $details)
<span class="m-2">{{$details['caw_name']}}</span><br>
@endforeach
@@ -62,7 +68,8 @@
@hasrole('operasi')
@if($lel['info']['sts_lelong'] == 0)
<a href="{{ route('lelong.show',$lel['info']['lelong_id']) }}" data-toggle="tooltip" data-placement="top" title="Butiran" style="margin-right:40px" ><i class="far fa-edit"></i></a>
<a href="{{ route('lelong.show',$lel['info']['lelong_id']) }}" data-toggle="tooltip" data-placement="top" title="Lihat Senarai Lelong" style="margin-right:40px" ><i class="far fa-edit"></i></a>
<a href="{{ route('lelong.showsimulasi',$lel['info']['lelong_id']) }}" data-toggle="tooltip" data-placement="top" title="Lihat Simulasi" style="margin-right:40px" ><i class="far fa-edit"></i></a>
<a class="confirmdel" href="{{ route('lelong.delete',$lel['info']['lelong_id']) }}" data-toggle="tooltip" data-placement="top" title="Padam" ><i class="far fa-trash-alt"></i></a>
@else
<button class="btn btn-success btn-sm" disabled>LELONG SELESAI</button>
@@ -35,11 +35,11 @@
<tr>
<th>No.</th>
<th>Norujukan</th>
<th>Pinjaman (RM)</th>
<th>Tempoh</th>
<th>Berat (gm)</th>
<th>Nilai Marhun (RM)</th>
<th>Harga Asas (RM)</th>
<th>Pembiayaan (RM)</th>
<th>Keuntungan (RM)</th>
<th>Caj Lelong (%)</th>
<th>Rugi Lelong (RM)</th>
@@ -52,12 +52,12 @@
<tr>
<td>{{$loop->iteration}}</td>
<td>{{ $marhun['norujukan']}}</td>
<td>{{ $marhun['pinjaman'] }}</td>
<td>{{ $marhun['jbg']}}</td>
<td>{{ $marhun['berat'] }}</td>
<td>{{ $marhun['nilaimarhun'] }}</td>
<td>{{ $marhun['hargaasas'] }}</td>
<td>{{ number_format($marhun['keuntungan'], 2, '.', ',') }}</td>
<td>{{ $marhun['pinjaman'] }}</td>
<td>{{ number_format($marhun['bakiupah'], 2, '.', ',') }}</td>
{{-- <td>{{ $marhun['keuntungan'] }}</td> --}}
<td>{{ $marhun['cajlelong'] }}</td>
@@ -0,0 +1,183 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row ">
<div class="col-md-11 mx-auto card p-4">
<span class="pt-3" style="margin-left:1%; font-size:20px"><b>Senarai Simulasi Lelong</b></span>
@foreach ($arrayinfo as $laporan)
<span class="pt-3" style="margin-left:1%;"><b>Lelong ID : {{ $laporan['laporan']['lelong_id']}}</b></span>
<span class="pt-3" style="margin-left:1%;"><b>Tarikh Lelong : @php
$myDateTime = DateTime::createFromFormat('Y-m-d', $laporan['laporan']['tarikh_lelong'] );
$datez = $myDateTime->format('d-m-Y');
echo($datez);
@endphp</b></span>
@foreach($laporan['details'] as $details)
<span class="pt-3" style="margin-left:1%;"><b>Nama Cawangan : {{ $details['caw_name']}}</b></span>
<span class="pt-3" style="margin-left:1%;"><b>Kod Cawangan : {{ $details['caw_code']}}</b></span>
@endforeach
@endforeach
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
<form id="deletesag" action="{{route('lelong.deletemarhun')}}" method="POST">
@csrf
<input type="hidden" name="lelongid" value="{{$lelongid}}">
<input type="hidden" name="cawid" value="{{$cawid}}">
<table class="table table-striped table-xl" id="marhun" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th>No.</th>
<th>Norujukan</th>
<th>Tempoh</th>
<th>Berat (gm)</th>
<th>Nilai Marhun (RM)</th>
<th>Harga Asas (RM)</th>
<th>Pembiayaan (RM)</th>
<th>Keuntungan (RM)</th>
<th>Caj Lelong (%)</th>
<th>Rugi Lelong (RM)</th>
<th>Baki Lelong (RM)</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@foreach ($marhuns as $index=> $marhun)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{ $marhun['norujukan']}}</td>
<td>{{ $marhun['jbg']}}</td>
<td>{{ $marhun['berat'] }}</td>
<td>{{ number_format($marhun['nilaimarhun'], 2, '.', ',') }}</td>
<td>{{ number_format($marhun['hargaasas'], 2, '.', ',') }}</td>
<td>{{ number_format($marhun['pinjaman'] , 2, '.', ',') }}</td>
<td>{{ number_format($marhun['bakiupah'], 2, '.', ',') }}</td>
{{-- <td>{{ $marhun['keuntungan'] }}</td> --}}
<td>{{ number_format($marhun['cajlelong'], 2, '.', ',') }}</td>
<?php
$rugi = 0;
$baki = 0;
if(strpos($marhun['baki'], '-') !== false)
{
$rugi = $marhun['baki'];
}
else {
$baki = $marhun['baki'];
}
?>
<td>{{number_format($rugi, 2, '.', ',')}}</td>
<td>{{number_format($baki, 2, '.', ',')}}</td>
<td class="text-center">
<input type="checkbox" aria-label="Checkbox for following text input" onclick="btnDelete(this)" name="checkboxdata[]" value="{{ $marhun['norujukan'] }}">
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="text-right pt-4">
<a href="{{ route('lelong.show',$lelongid) }}" class="btn btn-primary">Kembali</a>
<button type="button" class="btn btn-danger" id="btndelete" onclick="confirm()">Delete</button>
</div>
{{-- <a href="{{url('lelong/senarailelong')}}" class="btn btn-primary">Kembali</a> --}}
</form>
</div>
</div>
</div>
<script>
$("#btndelete").prop("disabled", true);
function btnDelete(e) {
var count = 0;
tablemarhun.rows().nodes().to$().find('input[type="checkbox"]').each(function(){
if($(this).prop('checked') === true)
{
count = count + 1;
}
// $(this).prop('checked', e.checked);
})
if(count != 0)
{
$("#btndelete").prop("disabled", false);
}
else
{
$("#btndelete").prop("disabled", true);
}
// let checkbox = $('#checkboxdata').val();
// console.log(checkbox)
// $("#btndelete").prop("disabled", checkboxdata.length === 0);
}
function confirm() {
$.confirm({
title: 'Confirmation',
content: 'Anda pasti?',
type: 'red',
typeAnimated: true,
buttons: {
Delete: {
btnClass: 'btn-danger',
action: function () {
$("#deletesag").submit();
}
},
Batal: {
btnClass: 'btn-default',
action: function () {}
}
}
});
}
var tablemarhun = $('#marhun').DataTable( {
"columnDefs": [
{
"targets": 13,
"orderable": false
},
// {
// "targets": 4,
// "orderable": false
// }
],
// order: [[1, 'asc']],
// "ordering": false,
"info": false,
"lengthChange": false,
"pageLength": 999999,
dom: 'Bfrtip',
// buttons: [
// // 'copy', 'excel', 'pdf'
// // { text: 'copy', className: 'btn btn-primary' },
// {
// className: 'btn btn-outline-success pl-4 pr-4 btn-sm adduser',
// text: '<i class="fas fa-plus" id="test"></i>',
// titleAttr: 'Tambah Pengguna',
// 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();
// }
// }
// ]
});
</script>
@endsection
+4 -4
View File
@@ -27,13 +27,13 @@
<td>Bilangan Lelong : {{$total_marhun}}</td>
</tr>
<tr>
<td>Nilai Marhun Keseluruhan : RM{{ number_format($total_nmarhun, 2, '.', ',') }}</td>
<td>Nilai Marhun Keseluruhan : RM{{ number_format($total_nilaimarhun, 2, '.', ',') }}</td>
</tr>
<tr>
<td>Pembiayaan Keseluruhan : RM{{ number_format($total_pinjaman, 2, '.', ',') }}</td>
</tr>
<tr>
<td>Keuntungan Keseluruhan : RM{{ number_format($total_upahkeuntungan2, 2, '.', ',') }}</td>
<td>Keuntungan Keseluruhan : RM{{ number_format($totalkeuntungan2, 2, '.', ',') }}</td>
</tr>
<tr>
@foreach($data as $data1)
@@ -97,7 +97,7 @@
<td>{{ number_format($caw['berat'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['n_marhun'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['pinjaman'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['upahsimpan'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['bakiupah'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['hargaasas'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['cajlelong'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['bakilelong'], 2, '.', ',') }}</td>
@@ -112,7 +112,7 @@
<td>{{ number_format($total_berat, 2, '.', ',') }}</td>
<td>{{ number_format($total_nilaimarhun, 2, '.', ',') }}</td>
<td>{{ number_format($total_pinjaman, 2, '.', ',') }}</td>
<td>{{ number_format($total_upahkeuntungan2, 2, '.', ',') }}</td>
<td>{{ number_format($totalkeuntungan2, 2, '.', ',') }}</td>
<td>{{ number_format($total_hargaasas, 2, '.', ',') }}</td>
<td>{{ number_format($total_cazlelong, 2, '.', ',') }}</td>
<td>{{ number_format($total_bakilelong, 2, '.', ',') }}</td>
@@ -0,0 +1,415 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row ">
<div class="col-md-11 mx-auto card p-4">
<nav>
<div class="nav nav-tabs" id="nav-tab" role="tablist">
<a class="nav-link active" id="nav-simulasi-tab" data-toggle="tab" href="#nav-simulasi" role="tab" aria-controls="nav-simulasi" aria-selected="true">Lelong</a>
<!-- <a class="nav-link" id="nav-hargaasas-tab" data-toggle="tab" href="#nav-hargaasas" role="tab" aria-controls="nav-hargaasas" aria-selected="false">Harga Emas Asas</a> -->
</div>
</nav>
<div class="tab-content" id="nav-tabContent">
<div class="tab-pane fade show active" id="nav-simulasi" role="tabpanel" aria-labelledby="nav-simulasi-tab">
<br>
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
<form id="exportform" action="" method="POST">
<input type="hidden" name="type" value="User">
<div class="row">
<div class="col-md-5">
<table class="table table-striped table-xl" id="conclusion" style="width:100%">
<tr>
<td>Bilangan Lelong : {{$total_marhun}}</td>
</tr>
<tr>
<td>Nilai Marhun Keseluruhan : RM{{ number_format($total_nilaimarhun, 2, '.', ',') }}</td>
</tr>
<tr>
<td>Pembiayaan Keseluruhan : RM{{ number_format($total_pinjaman, 2, '.', ',') }}</td>
</tr>
<tr>
<td>Keuntungan Keseluruhan : RM{{ number_format($totalkeuntungan2, 2, '.', ',') }}</td>
</tr>
<tr>
@foreach($data as $data1)
<td>Tarikh Lelong :
@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $data1['tarikh_lelong'] );
$datez = $myDateTime->format('d-m-Y');
echo($datez);
@endphp
</td>
@endforeach
</tr>
</table>
</div>
<div class="col-md-2"></div>
<div class="col-md-5">
<table class="table table-striped table-xl" id="conclusion2" style="width:100%">
<tr>
<td>Rugi Lelong Keseluruhan : -RM{{ number_format($total_rugilelong, 2, '.', ',') }}</td>
</tr>
<tr>
<td>Baki Lelong Keseluruhan : RM{{ number_format($total_bakilelong, 2, '.', ',') }}</td>
</tr>
<tr>
<td>Caj Lelong Keseluruhan : RM{{ number_format($total_cazlelong, 2, '.', ',') }}</td>
</tr>
<tr>
@foreach($data as $data)
<td>Tempoh : {{$data['jbg'] }}</td>
@endforeach
</tr>
</table>
</div>
</div>
<table class="table table-striped table-xl" id="simulasi" style="width:100%">
<thead class="bg-primary text-white">
<tr class="text-center">
<th>No</th>
<th>Cawangan</th>
<th>Bil Marhun (Paket)</th>
<th>Berat (gm)</th>
<th>Nilai Marhun (RM)</th>
<th>Pembiayaan (RM)</th>
<th>Keuntungan (RM)</th>
<th>Harga Asas (RM)</th>
<th>Caj Lelong (RM)</th>
<th>Baki Lelong (RM)</th>
<th>Rugi Lelong (RM)</th>
</tr>
</thead>
<tbody>
@foreach ($arraycaw as $index=>$caw)
<tr>
<td>{{$index+1}}</td>
<td><a href=" {{ route('lelong.senaraimarhunsimulasi',['lelongid'=>$lelong_id,'cawid'=>$caw['id_cawangan']]) }} " target="blank" style="color:#3490dc">{{ $caw['cawangan'] }}</a></td>
<td>{{ $caw['bil_marhun'] }}</td>
<td>{{ number_format($caw['berat'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['n_marhun'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['pinjaman'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['bakiupah'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['hargaasas'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['cajlelong'], 2, '.', ',') }}</td>
<td>{{ number_format($caw['bakilelong'], 2, '.', ',') }}</td>
<td>({{ number_format($caw['rugilelong'], 2, '.', ',') }})</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<td colspan="2"><b>JUMLAH KESELURUHAN</b></td>
<td>{{ $total_marhun }}</td>
<td>{{ number_format($total_berat, 2, '.', ',') }}</td>
<td>{{ number_format($total_nilaimarhun, 2, '.', ',') }}</td>
<td>{{ number_format($total_pinjaman, 2, '.', ',') }}</td>
<td>{{ number_format($totalkeuntungan2, 2, '.', ',') }}</td>
<td>{{ number_format($total_hargaasas, 2, '.', ',') }}</td>
<td>{{ number_format($total_cazlelong, 2, '.', ',') }}</td>
<td>{{ number_format($total_bakilelong, 2, '.', ',') }}</td>
<td>({{ number_format($total_rugilelong, 2, '.', ',') }})</td>
</tr>
</tfoot>
</table>
{{-- {{dd($lelkarat)}}; --}}
<table class="table table-striped table-xl" id="jumlahberat" style="width:80%">
<thead class="bg-primary text-white">
<tr class="text-center">
<th colspan="12">JUMLAH BERAT MENGIKUT MUTU (KESELURUHAN)</th>
</tr>
</thead>
<tbody>
<tr>
<td>MUTU</td>
@foreach ($lelkarat as $index=>$karat)
<td>{{$karat->karat}}</td>
@endforeach
</tr>
<tr>
<td>BERAT (gm)</td>
<td>{{$total24Kgb}}</td>
<td>{{$total24K}}</td>
<td>{{$total23k}}</td>
<td>{{$total22K}}</td>
<td>{{$total21K}}</td>
<td>{{$total20K}}</td>
<td>{{$total18Kp}}</td>
<td>{{$total18K}}</td>
<td>{{$total14Kp}}</td>
<td>{{$total14K}}</td>
<td>{{$total9K}}</td>
</tr>
</tbody>
</table>
</form>
<div class="row">
<div class="text-center">
{{-- <a class="btn btn-primary" href="{{ route('lelong.create',$lelong_id) }}">Create Lelong</a> --}}
</div>
</div>
</div>
<div class="tab-pane fade" id="nav-hargaasas" role="tabpanel" aria-labelledby="nav-hargaasas-tab">
<br>
<div class="row ">
<div class="col-md-10 mx-auto ">
<button class="btn btn-primary float-right " onclick="kemaskini()" id="btnkemaskini" >Kemaskini</button>
<div id="hideform">
<label for="hargaasas" class="d-inline float-left pr-2 pl-2 pt-2" id="lblhargaasas">Harga Emas Asas</label>
<input type="text" class="form-control col-md-4 d-inline float-left" id="txthargaasas" name="hargaasas" placeholder="RM" data-jeniskarat="{{$jeniskarat}}" oninput="calculate(this)">
<button class="btn btn-success float-right" onclick="save()" id="btnsimpan">Simpan</button>
<button class="btn btn-danger float-right" onclick="kemaskini()" id="btncancel">Cancel</button>
</div>
</div>
</div>
<div class="row ">
<div class="col-md-10 mx-auto">
<form action="{{ route('lelong.kemaskinihargaasas') }}" method="POST" id="formhargaasas">
@csrf
<input type="hidden" name="idlelong" value="{{$lelong_id}}">
<table class="table table-striped table-xl" id="kemaskinikarat" style="width:100%" >
<thead class="bg-primary text-white">
<tr class="text-center">
<th>Karat</th>
<th>Keterangan</th>
<th>Harga</th>
{{-- <th>Harga</th> --}}
</tr>
</thead>
<tbody class="text-center">
@foreach ($lelkarat as $index=>$karat)
<tr>
<td>{{$karat->karat}}</td>
<td>{{$karat->keterangan}}</td>
<td class="input">{{$karat->harga2}}</td>
{{-- <td class="input">{{$karat->harga}}</td> --}}
</tr>
@endforeach
</tbody>
</table>
</form>
</div>
</div>
{{-- <a class="btn btn-primary" href="{{ route('lelong.kemaskinihargaasas',$lelong_id) }}">Kemaskini</a> --}}
</div>
</div>
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
{{-- {{$cawangan[0] }} --}}
</div>
<div class="modal fade" tabindex="-1" id="modalfilter">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Filter By</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form action="{{ route('analisa.filter') }}" method="POST" id="formfilter">
@csrf
<div class="row justify-content-center">
<div class="col-md-8">
<div class="form-group row">
<input type="hidden" name="idmarhun" id="idmarhun" >
</div>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
<button type="button" class="btn btn-primary" onclick="">Jana Semula Simulasi</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$("#hideform").hide();
$('#btnsimpan').prop('disabled', true)
function kemaskini() {
var inputdata = $("td.input").find("input");
if(inputdata.length ==0)
{
$("td.input").each(function(index) {
// console.log(index)
var la = $(this).html();
// if(index%2 ==0 ) //even-0-2-4
// {
$(this).html("<input type='text' name='harga2[]' id=harga2"+index+" value="+la+" />");
// }
// else //odd-1-3-5-7
// {
// $(this).html("<input type='text' name='harga[]' id=harga"+index+" value="+la+" />");
// }
})
$("#hideform").show();
$("#btnkemaskini").hide();
}
else
{
$("td.input").each(function() {
var la = $(this).html();
$(this).html($(la).val());
})
$("#hideform").hide();
$("#btnkemaskini").show();
}
}
function calculate(e)
{
let hargaasasbaru = $('#txthargaasas').val();
let jeniskarat = $(e).data('jeniskarat');
// let maxcolumn = 2;
let count = 0;
let indexarray = 0;
$("td.input").each(function(index) {
if(hargaasasbaru)
{
$('#btnsimpan').prop('disabled', false)
// if(index%2 == 0)
// {
let harga1 = parseFloat(hargaasasbaru);
let harga2 = parseFloat(jeniskarat[indexarray]['dariharga916']);
let newhargaasas = harga1 + (harga2);
count++;
$('#harga2'+index).val(newhargaasas.toFixed(2));
// }
// else
// {
// let harga1 = parseFloat(hargaasasbaru);
// let harga2 = parseFloat(jeniskarat[indexarray]['dariharga916']);
// let newhargaasas = (harga1 + (harga2))/2.72;;
// count++;
// $('#harga'+index).val(newhargaasas.toFixed(2));
// }
// if(count == maxcolumn)
// {
// count = 0;
indexarray++;
// }
}
else
{
$('#btnsimpan').prop('disabled', true)
let dummy =0;
if(index%2 == 0)
{
$('#harga2'+index).val(dummy.toFixed(2));
}
// else
// {
// $('#harga'+index).val(dummy.toFixed(2));
// }
}
})
}
function save(){
$('#formhargaasas').submit();
}
$('a.confirmdel').confirm({
title: 'Confirmation',
content: 'Anda pasti?',
type: 'orange',
typeAnimated: true,
buttons: {
Delete: {
btnClass: 'btn-warning',
action: function () {
location.href = this.$target.attr('href');
}
},
Batal: {
btnClass: 'btn-default',
action: function () {}
}
}
});
var tablesimulasi = $('#simulasi').DataTable( {
"columnDefs": [
{
"targets": 0,
"orderable": false
}
],
order: [[0, 'asc']],
// "ordering": false,
"searching":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-filter"></i>',
// titleAttr: 'Filter By',
// action: function ( e, dt, node, config ) {
// $('#modalfilter').modal("show");
// }
// },
{
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) {
tablesimulasi.rows().nodes().to$().find('input[type="checkbox"]').each(function(){
$(this).prop('checked', cb.checked);
})
}
</script>
@endsection
+8 -8
View File
@@ -68,16 +68,16 @@
</td>
<td>
@if($item->n_marhun != null)
{{ $item->n_marhun }}
{{ number_format($item->n_marhun, 2, '.', ',') }}
@else
{{ $item->old_nmarhun }}
{{ number_format($item->old_nmarhun, 2, '.', ',') }}
@endif
</td>
<td>
@if($item->hargaasas != null)
{{ $item->hargaasas }}
{{ number_format($item->hargaasas, 2, '.', ',') }}
@else
{{ $item->old_hargaasas }}
{{ number_format($item->old_hargaasas, 2, '.', ',') }}
@endif
</td>
<td>{{ $item->nota }}</td>
@@ -336,9 +336,9 @@
{
console.log(item);
var beratemas = $('#berat_emastambahan').val();
var total_tambahan = item.harga * parseFloat(beratemas);
var total_tambahan = item.harga2 * parseFloat(beratemas);
var harga_asastambahan = Math.round(total_tambahan);
$('#hargatambahan').val(parseFloat(item.harga).toFixed(2));
$('#hargatambahan').val(parseFloat(item.harga2).toFixed(2));
$('#nilai_marhuntambahan').val(parseFloat(total_tambahan).toFixed(2));
$('#harga_asastambahan').val(parseFloat(harga_asastambahan).toFixed(2));
}
@@ -388,9 +388,9 @@
karatall.forEach((item) =>{
if(item.karat == $(e).val())
{
var total = item.harga * $('#berat_emas').val();
var total = item.harga2 * $('#berat_emas').val();
var hargaasas = Math.round(total);
$('#harga').val(parseFloat(item.harga).toFixed(2));
$('#harga').val(parseFloat(item.harga2).toFixed(2));
$('#nilai_marhun').val(parseFloat(total).toFixed(2));
$('#harga_asas').val(parseFloat(hargaasas).toFixed(2));
}
@@ -22,10 +22,10 @@
<div class="col-md-12 mx-auto card p-4" style="margin-top:2%; margin-bottom:2%;">
<p> <b>Norujukan : </b> {{ $lelongbid->norujukan }}</p>
<p> <b>Tempoh / JBG : </b> {{ $lelongbid->jbg }}</p>
<p> <b>Pembiayaan : </b> {{ $marhuns[0]['pembiayaan'] }}</p>
<p> <b>Keuntungan : </b></p>
<p> <b>Baki Lelong : </b>{{ $marhuns[0]['baki_lelong'] }}</p>
<p> <b>Rugi Lelong : </b>{{ $marhuns[0]['rugi_lelong'] }}</p>
<p> <b>Pembiayaan(RM) : </b> {{ number_format($marhuns[0]['pembiayaan'], 2, '.', ',') }}</p>
<p> <b>Keuntungan(RM) : </b> {{ number_format($marhuns[0]['bakiupah'], 2, '.', ',') }}</p>
<p> <b>Baki Lelong(RM) : </b>{{ number_format($marhuns[0]['baki_lelong'], 2, '.', ',') }}</p>
<p> <b>Rugi Lelong(RM) : </b>{{ number_format($marhuns[0]['rugi_lelong'], 2, '.', ',') }}</p>
</div>
</div>
</div>
@@ -29,12 +29,17 @@
@foreach($arrayinfo as $lel)
<tr>
<td>{{$loop->iteration}}</td>
<td>
<td align = 'left'>
@foreach($lel['detailsinfo'] as $details)
<span class="m-2">{{$details['caw_name']}}</span><br>
@endforeach
</td>
<td>{{ $lel['info']['tarikh_lelong']}}</td>
<td> @php
$myDateTime = DateTime::createFromFormat('Y-m-d', $lel['info']['tarikh_lelong']);
$datez = $myDateTime->format('d-m-Y');
echo($datez);
@endphp</td>
<td>{{ $lel['info']['harga_emas_asas'] }}</td>
<td>{{ $lel['info']['jbg'] }}</td>
<td>{{ $lel['info']['cajlelong'] }}</td>
@@ -24,11 +24,12 @@
<th>Kod Cawangan</th>
<th>Nama Cawangan</th> -->
<th>Norujukan</th>
<th>Pembiayaan (RM)</th>
<th>Tempoh</th>
<th>Berat (gm)</th>
<th>Nilai Marhun (RM)</th>
<th>Harga Asas (RM)</th>
<th>Pembiayaan (RM)</th>
<th>Keuntungan (RM)</th>
<th>Caj Lelong (%)</th>
<th>Rugi Lelong (RM)</th>
@@ -44,12 +45,12 @@
<td class="text-center">{{ $marhun['kodcaw'] }}</td>
<td>{{ $marhun['caw_name'] }}</td> -->
<td>{{ $marhun['norujukan']}}</td>
<td>{{ number_format($marhun['pinjaman'], 2, '.', ',') }}</td>
<td>{{ number_format($marhun['tempoh'], 2, '.', ',') }}</td>
<td>{{ number_format($marhun['berat'], 2, '.', ',') }}</td>
<td>{{ number_format($marhun['nilaimarhun'], 2, '.', ',') }}</td>
<td>{{ number_format($marhun['hargaasas'], 2, '.', ',') }}</td>
<td>{{ number_format($marhun['keuntungan'], 2, '.', ',') }}</td>
<td>{{ number_format($marhun['pinjaman'], 2, '.', ',') }}</td>
<td>{{ number_format($marhun['bakiupah'], 2, '.', ',') }}</td>
<td>{{ number_format($marhun['cajlelong'], 2, '.', ',') }}</td>
<?php
$rugi = 0;
@@ -19,7 +19,8 @@
<th>Lelong ID</th>
<th>Tarikh Lelong</th>
<th>Fasa</th>
<th>Cawangan</th>
<th>Cawangan</th>
<th>Harga Asas (RM)</th>
<th class="text-center">Action</th>
</tr>
</thead>
@@ -40,6 +41,7 @@
{{$info2['caw_name']}}<br>
@endforeach
</td>
<td>{{ $info['info']['harga_emas_asas'] }}</td>
<td class="text-center">
<a href="{{ route('analisa.show',$info['info']['simulasi_id']) }}" data-toggle="tooltip" data-placement="top" title="Butiran Simulasi" style="margin-right:30px"><i class="far fa-edit"></i></a>
<a class="confirmdel" href="{{ route('analisa.delete',$info['info']['simulasi_id']) }}" data-toggle="tooltip" data-placement="top" title="Padam"><i class="far fa-trash-alt"></i></a>
@@ -24,13 +24,13 @@
<td>Bilangan Lelong : {{$total_marhun}}</td>
</tr>
<tr>
<td>Nilai Marhun Keseluruhan : RM{{ number_format($total_nmarhun, 2, '.', ',') }}</td>
<td>Nilai Marhun Keseluruhan : RM{{ number_format($total_nilaimarhun, 2, '.', ',') }}</td>
</tr>
<tr>
<td>Pembiayaan Keseluruhan : RM{{ number_format($total_pinjaman, 2, '.', ',') }}</td>
</tr>
<tr>
<td>Keuntungan Keseluruhan : RM{{ number_format($total_upahkeuntungan, 2, '.', ',') }}</td>
<td>Keuntungan Keseluruhan : RM{{ number_format($total_upahkeuntungan2, 2, '.', ',') }}</td>
</tr>
<tr>
@foreach($data as $data1)