laporan senarai pembida, pdf senarai lelongan

This commit is contained in:
Amirah22
2022-04-10 10:43:09 +08:00
parent 79a8dcf50b
commit af7ac037d9
16 changed files with 616 additions and 154 deletions
+51 -10
View File
@@ -240,6 +240,7 @@ class LelongController extends Controller
$lelong->cajlelong = $simulasi->cajlelong;
$lelong->save();
foreach($simkarat as $simulasikarat)
{
$lelkarat = new LelKarat;
@@ -409,7 +410,7 @@ class LelongController extends Controller
{
$karat->karat = $karat->karat;
$karat->keterangan = $karat->keterangan;
$karat->harga = $request->harga[$index];
// $karat->harga = $request->harga[$index];
$karat->harga2 = $request->harga2[$index];
$karat->save();
}
@@ -731,6 +732,7 @@ class LelongController extends Controller
$keuntungan = $upah['bakipjm'] - ($upah['bakihargajualan'] - ($upah['upah12'] - $upah['ansakhir'])-(($upah['tempoh']-$upah['tempohbayar'])*$upah['kadarupah']/100*$upah['bakipjm']) );
$brglelong[$index1]['keuntungan'] = $keuntungan;
}
@@ -744,6 +746,9 @@ class LelongController extends Controller
$lelong_id = $request->lelongid;
$lelongid = CawanganLelong::join('lelong','cawangan_lelong.lelong_id','=','lelong.id')
->where('lelong.id', $lelong_id)
->get();
$brglelong = LelongBid::join('gadai','lelongbid.norujukan','=','gadai.norujukan')
->where('lelongbid.lelong_id', $lelong_id)
@@ -755,12 +760,14 @@ class LelongController extends Controller
$totnilai_marhun=0;
$tot_pinjaman=0;
foreach($brglelong as $index1=>$upah)
{
$keuntungan = $upah['bakipjm'] - ($upah['bakihargajualan'] - ($upah['upah12'] - $upah['ansakhir']) - (($upah['tempoh']-$upah['tempohbayar'])*$upah['kadarupah']/100*$upah['bakipjm']) );
$brglelong[$index1]['keuntungan'] = $keuntungan;
}
$totharga_asas = $totharga_asas + ($upah->sum('hargaasas'));
@@ -768,20 +775,54 @@ class LelongController extends Controller
$totnilai_marhun = $totnilai_marhun + ($upah->sum('nilaimarhun'));
$tot_pinjaman = $tot_pinjaman + ($upah->sum('pinjaman'));
$pdf = PDF::loadView('pdf.listlelong',compact('brglelong','totharga_asas','totkeuntungan','totnilai_marhun','tot_pinjaman'))
->setPaper('a4', 'potrait');
$pdf = PDF::loadView('pdf.listlelong',compact('brglelong','totharga_asas','totkeuntungan','totnilai_marhun','tot_pinjaman','lelong_id','lelongid'))
->setPaper('a4', 'potrait');
return $pdf->download('Senarai Lelong.pdf');
return $pdf->download('Senarai Lelong.pdf');
}
public function lapbidaan (Request $request){
$lelongid = CawanganLelong::join('lelong','cawangan_lelong.lelong_id','=','lelong.id')
->join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
->get();
return view('lelong.laporanbidaanindex',compact('lelongid'));
}
public function senarailapbidaan ($lelong_id){
$arraydetails = [];
$laporanpembida= LelongBid::join('lelongbidder','lelongbid.id','=','lelongbidder.lelongbid_id')
->select('lelongbid_id','norujukan','hargaasas')
->where('lelongbid.lelong_id','=',$lelong_id)
->groupBy('lelongbid_id')
->get()
->toArray();
foreach($laporanpembida as $laporan)
{
$details = LelongBidder::where('lelongbid_id',$laporan['lelongbid_id'])
->orderBy('hargabida','desc')
->orderBy('masa_bidaan','asc')
->get()
->toArray();
array_push($arraydetails,['laporan' => $laporan,'details' => $details]);
}
return view('lelong.senarailapbidaan', compact('arraydetails'));
}
}
+2 -2
View File
@@ -92,7 +92,7 @@ class SimulasiController extends Controller
$simkarat->simulasi_id = $simulasi->id;
$simkarat->karat = $item->karat;
$simkarat->keterangan = $item->keterangan;
$simkarat->harga = ($hargaasas + ($item->dariharga916))/2.72; //gram
$simkarat->harga = ($hargaasas + ($item->dariharga916)); //gram
$simkarat->harga2 = $hargaasas + ($item->dariharga916); //rial
$simkarat->save();
}
@@ -487,7 +487,7 @@ class SimulasiController extends Controller
{
$karat->karat = $karat->karat;
$karat->keterangan = $karat->keterangan;
$karat->harga = $request->harga[$index];
// $karat->harga = $request->harga[$index];
$karat->harga2 = $request->harga2[$index];
$karat->save();
}
+1
View File
@@ -19,6 +19,7 @@
"spatie/laravel-permission": "^5.3"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.6",
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^1.0.1",
Generated
+220 -1
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "2e5f0f0a7cad0c224615bb48a86d6a1b",
"content-hash": "1f26af21cdf299942137e16bdee7fbea",
"packages": [
{
"name": "asm89/stack-cors",
@@ -7225,6 +7225,91 @@
}
],
"packages-dev": [
{
"name": "barryvdh/laravel-debugbar",
"version": "v3.6.7",
"source": {
"type": "git",
"url": "https://github.com/barryvdh/laravel-debugbar.git",
"reference": "b96f9820aaf1ff9afe945207883149e1c7afb298"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/b96f9820aaf1ff9afe945207883149e1c7afb298",
"reference": "b96f9820aaf1ff9afe945207883149e1c7afb298",
"shasum": ""
},
"require": {
"illuminate/routing": "^6|^7|^8|^9",
"illuminate/session": "^6|^7|^8|^9",
"illuminate/support": "^6|^7|^8|^9",
"maximebf/debugbar": "^1.17.2",
"php": ">=7.2",
"symfony/debug": "^4.3|^5|^6",
"symfony/finder": "^4.3|^5|^6"
},
"require-dev": {
"mockery/mockery": "^1.3.3",
"orchestra/testbench-dusk": "^4|^5|^6|^7",
"phpunit/phpunit": "^8.5|^9.0",
"squizlabs/php_codesniffer": "^3.5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.6-dev"
},
"laravel": {
"providers": [
"Barryvdh\\Debugbar\\ServiceProvider"
],
"aliases": {
"Debugbar": "Barryvdh\\Debugbar\\Facades\\Debugbar"
}
}
},
"autoload": {
"files": [
"src/helpers.php"
],
"psr-4": {
"Barryvdh\\Debugbar\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Barry vd. Heuvel",
"email": "barryvdh@gmail.com"
}
],
"description": "PHP Debugbar integration for Laravel",
"keywords": [
"debug",
"debugbar",
"laravel",
"profiler",
"webprofiler"
],
"support": {
"issues": "https://github.com/barryvdh/laravel-debugbar/issues",
"source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.6.7"
},
"funding": [
{
"url": "https://fruitcake.nl",
"type": "custom"
},
{
"url": "https://github.com/barryvdh",
"type": "github"
}
],
"time": "2022-02-09T07:52:32+00:00"
},
{
"name": "doctrine/instantiator",
"version": "1.4.0",
@@ -7794,6 +7879,72 @@
},
"time": "2021-11-05T08:25:44+00:00"
},
{
"name": "maximebf/debugbar",
"version": "v1.18.0",
"source": {
"type": "git",
"url": "https://github.com/maximebf/php-debugbar.git",
"reference": "0d44b75f3b5d6d41ae83b79c7a4bceae7fbc78b6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/0d44b75f3b5d6d41ae83b79c7a4bceae7fbc78b6",
"reference": "0d44b75f3b5d6d41ae83b79c7a4bceae7fbc78b6",
"shasum": ""
},
"require": {
"php": "^7.1|^8",
"psr/log": "^1|^2|^3",
"symfony/var-dumper": "^2.6|^3|^4|^5|^6"
},
"require-dev": {
"phpunit/phpunit": "^7.5.20 || ^9.4.2",
"twig/twig": "^1.38|^2.7|^3.0"
},
"suggest": {
"kriswallsmith/assetic": "The best way to manage assets",
"monolog/monolog": "Log using Monolog",
"predis/predis": "Redis storage"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.17-dev"
}
},
"autoload": {
"psr-4": {
"DebugBar\\": "src/DebugBar/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Maxime Bouroumeau-Fuseau",
"email": "maxime.bouroumeau@gmail.com",
"homepage": "http://maximebf.com"
},
{
"name": "Barry vd. Heuvel",
"email": "barryvdh@gmail.com"
}
],
"description": "Debug bar in the browser for php application",
"homepage": "https://github.com/maximebf/php-debugbar",
"keywords": [
"debug",
"debugbar"
],
"support": {
"issues": "https://github.com/maximebf/php-debugbar/issues",
"source": "https://github.com/maximebf/php-debugbar/tree/v1.18.0"
},
"time": "2021-12-27T18:49:48+00:00"
},
{
"name": "mockery/mockery",
"version": "1.4.4",
@@ -9734,6 +9885,74 @@
],
"time": "2020-09-28T06:39:44+00:00"
},
{
"name": "symfony/debug",
"version": "v4.4.37",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
"reference": "5de6c6e7f52b364840e53851c126be4d71e60470"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/5de6c6e7f52b364840e53851c126be4d71e60470",
"reference": "5de6c6e7f52b364840e53851c126be4d71e60470",
"shasum": ""
},
"require": {
"php": ">=7.1.3",
"psr/log": "^1|^2|^3"
},
"conflict": {
"symfony/http-kernel": "<3.4"
},
"require-dev": {
"symfony/http-kernel": "^3.4|^4.0|^5.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\Debug\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Provides tools to ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/debug/tree/v4.4.37"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2022-01-02T09:41:36+00:00"
},
{
"name": "theseer/tokenizer",
"version": "1.2.1",
+15 -8
View File
@@ -86,10 +86,7 @@
<li class="{{ (request()->is('lelong/senarailelong/*') || request()->is('lelong/senarailelong') ) ? 'active' : '' }}">
<a href="{{url('lelong/senarailelong')}}">Senarai Lelong</a>
</li>
<li class="{{ (request()->is('lelong/laporansenarailelong/*') || request()->is('lelong/laporansenarailelong') ) ? 'active' : '' }}">
<a href="{{url('lelong/laporansenarailelong')}}">Laporan Senarai Lelong</a>
</li>
</ul>
</ul>
</li>
@endhasrole
@hasrole('operasi')
@@ -113,10 +110,7 @@
<li class="{{ (request()->is('lelong/senarailelongtaklaku/*') || request()->is('lelong/senarailelongtaklaku') ) ? 'active' : '' }}">
<a href="{{url('lelong/senarailelongtaklaku')}}">Senarai Lelong Tak Laku</a>
</li>
<li class="{{ (request()->is('lelong/laporansenarailelong/*') || request()->is('lelong/laporansenarailelong') ) ? 'active' : '' }}">
<a href="{{url('lelong/laporansenarailelong')}}">Laporan Senarai Lelong</a>
</li>
</ul>
</ul>
</li>
<li class="{{ (request()->is('Pengesahan/*')) ? 'active' : '' }}">
<a href="#pengesahanSubmenu" data-toggle="collapse" aria-expanded="false" style="">Pengesahan</a>
@@ -142,6 +136,19 @@
</li>
</ul>
</li>
<li class="{{ (request()->is('Laporan/*')) ? 'active' : '' }}">
<a href="#laporanSubmenu" data-toggle="collapse" aria-expanded="false" style="">Laporan</a>
<ul class="list-unstyled collapse {{ (request()->is('lelong/*')) ? 'show' : '' }}" id="laporanSubmenu" >
<li class="{{ (request()->is('lelong/laporansenarailelong/*') || request()->is('lelong/laporansenarailelong') ) ? 'active' : '' }}">
<a href="{{url('lelong/laporansenarailelong')}}">Laporan Senarai Lelong</a>
</li>
</ul>
<ul class="list-unstyled collapse {{ (request()->is('lelong/*')) ? 'show' : '' }}" id="laporanSubmenu" >
<li class="{{ (request()->is('lelong/lapbidaan/*') || request()->is('lelong/lapbidaan') ) ? 'active' : '' }}">
<a href="{{url('lelong/lapbidaan')}}">Laporan Senarai Nama Bidaan Pembida</a>
</li>
</ul>
</li>
@endhasrole
@hasrole('account')
{{-- <li class="{{ (request()->is('home')) ? 'active' : '' }}">
@@ -0,0 +1,73 @@
@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="" method="POST">
<input type="hidden" name="type" value="User">
<table class="table table-striped table-xl" id="tablenotislelong" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th><input type="checkbox" aria-label="Checkbox for following text input" onclick="selectall(this)"></th>
<th>Lelong ID</th>
<th>Cawangan</th>
<th>Tarikh Lelong</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
@foreach ($lelongid as $bid)
<tr>
<td><input type="checkbox" aria-label="Checkbox for following text input" name="checkboxdata[]" value="{{ $bid->id }}"></td>
<td>{{ $bid->lelong_id}}</td>
<td>{{ $bid->caw_name}}</td>
<td>{{ $bid->tarikh_lelong }}</td>
<td class="text-center">
<a href="{{ route('lelong.senarailapbidaan',$bid->lelong_id) }}" data-toggle="tooltip" data-placement="top" title="Senarai Barang Lelong" ><i class="far fa-edit"></i></a>
</td>
</tr>
@endforeach
</tbody>
</table>
</form>
</div>
</div>
</div>
<script>
//Enable tooltips everywhere
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
var tablenotislelong = $('#tablenotislelong').DataTable({
"columnDefs": [
{
"targets": 0,
"orderable": false
},
{
"targets": 3,
"orderable": false
}
],
order: [[1, 'asc']],
"info": false,
"lengthChange": false,
"pageLength": 15,
dom: 'Bfrtip',
});
</script>
@endsection
@@ -31,7 +31,6 @@
<td>{{ $bid->caw_name}}</td>
<td>{{ $bid->tarikh_lelong }}</td>
<td class="text-center">
{{-- <a href="{{ route('jananotis.jananotis',$bid->lelong_id) }}" data-toggle="tooltip" data-placement="top" title="Muat Turun Senarai Barang Lelong " style="margin-right:40px" ><i class="fas fa-download"></i></a> --}}
<a href="{{ route('lelong.senaraibrglelong',$bid->lelong_id) }}" data-toggle="tooltip" data-placement="top" title="Senarai Barang Lelong" ><i class="far fa-edit"></i></a>
</td>
</tr>
+14 -30
View File
@@ -10,7 +10,7 @@
<p>{{ $message }}</p>
</div>
@endif
<form id="exportform" action="" method="POST">
<form id="exportform" action="{{route('lelong.pdfsenarailelong')}}" method="POST">
<input type="hidden" name="type" value="User">
<table class="table table-striped table-xl text-center" id="lelongtaklaku" style="width:100%">
<thead class="bg-primary text-white">
@@ -110,36 +110,20 @@
"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();
// }
// }
// ]
buttons: [
{
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');
$('.export').tooltip();
$( '.export').removeClass('dt-button');
</script>
@endsection
@@ -32,14 +32,14 @@
<tbody>
@foreach($brglelong as $brg)
<tr>
<td> {{ $loop->iteration }} </td>
<td>{{ $brg['norujukan']}}</td>
<td>{{$brg['hargaasas']}}</td>
<td>{{ $brg['keuntungan'] }}</td>
<td>{{ $brg['jbg']}}</td>
<td>{{ $brg['nilaimarhun']}}</td>
<td>{{ $brg['pinjaman']}}</td>
<td>{{ $brg['marhun']}}</td>
<td width="5%" align="center">{{ $loop->iteration }} </td>
<td width="14%" align="center">{{ $brg['norujukan']}}</td>
<td width="12%" align="center">{{$brg['hargaasas']}}</td>
<td width="12%" align="center">{{ $brg['keuntungan'] }}</td>
<td width="9%" align="center">{{ $brg['jbg']}}</td>
<td width="13%" align="center">{{ $brg['nilaimarhun']}}</td>
<td width="13%" align="center">{{ $brg['pinjaman']}}</td>
<td width="17%" align="center">{{ $brg['marhun']}}</td>
@endforeach
</tbody>
@@ -78,7 +78,7 @@
buttons: [
{
{
className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export',
titleAttr: 'Download to PDF',
text: '<i class="fas fa-download"></i>',
@@ -0,0 +1,113 @@
@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('lelong.pdfsenarailelong')}}" method="POST"> --}}
@csrf
<input type="hidden" name="type" value="User">
{{-- <input type="hidden" name="lelongid" value="{{ $lelong_id }}"> --}}
<table class="table table-striped table-xl text-center" id="notis" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th>No</th>
<th>No Rujukan</th>
<th>Harga Asas</th>
<th>Nama Pembida</th>
<th>Harga Bida</th>
<th>Masa Bida</th>
</tr>
</thead>
<tbody>
@foreach ($arraydetails as $laporan)
<tr>
<td>{{ $loop->iteration }}</td>
<td>{{ $laporan['laporan']['norujukan']}}</td>
<td>{{ $laporan['laporan']['hargaasas']}}</td>
<td>
@foreach($laporan['details'] as $details)
<span class="m-2">{{ $details['nama_bidder']}}</span><br>
@endforeach
</td>
<td>
@foreach($laporan['details'] as $details)
<span class="m-2">{{ $details['hargabida']}}</span><br>
@endforeach
</td>
<td>
@foreach($laporan['details'] as $details)
<span class="m-2">{{ $details['masa_bidaan']}}</span><br>
@endforeach
</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
{{-- <td colspan="2"><b>JUMLAH KESELURUHAN</b></td>
<td>{{ number_format($tot_hargaasas, 2, '.', ',') }}</td> --}}
</tr>
</tfoot>
</table>
<div class="modal-footer" style="margin-top:2%;">
<a href="{{ route('lelong.laporansenarailelong') }}" class="btn btn-primary">Kembali</a>
</div>
</div>
</div>
</div>
<script>
var tablelelongbid= $('#notis').DataTable( {
"columnDefs": [
{
"targets": 0,
"orderable": false
},
{
"targets": 5,
"orderable": false
}
],
"info": false,
"lengthChange": false,
"pageLength": 15,
dom: 'Bfrtip',
buttons: [
{
className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export',
titleAttr: 'Download to PDF',
text: '<i class="fas fa-download"></i>',
action: function ( e, dt, node, config ) {
$("#exportform").submit();
}
}
]
});
$('.export').tooltip();
$( '.export').removeClass('dt-button');
</script>
@endsection
+31 -31
View File
@@ -172,7 +172,7 @@
<th>Karat</th>
<th>Keterangan</th>
<th>Harga</th>
<th>Harga</th>
{{-- <th>Harga</th> --}}
</tr>
</thead>
<tbody class="text-center">
@@ -181,7 +181,7 @@
<td>{{$karat->karat}}</td>
<td>{{$karat->keterangan}}</td>
<td class="input">{{$karat->harga2}}</td>
<td class="input">{{$karat->harga}}</td>
{{-- <td class="input">{{$karat->harga}}</td> --}}
</tr>
@endforeach
</tbody>
@@ -243,14 +243,14 @@
$("td.input").each(function(index) {
// console.log(index)
var la = $(this).html();
if(index%2 ==0 ) //even-0-2-4
{
// 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+" />");
}
// }
// else //odd-1-3-5-7
// {
// $(this).html("<input type='text' name='harga[]' id=harga"+index+" value="+la+" />");
// }
})
$("#hideform").show();
@@ -274,35 +274,35 @@
let jeniskarat = $(e).data('jeniskarat');
let maxcolumn = 2;
// 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 = parseInt(hargaasasbaru);
let harga2 = parseInt(jeniskarat[indexarray]['dariharga916']);
// 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 = parseInt(hargaasasbaru);
let harga2 = parseInt(jeniskarat[indexarray]['dariharga916']);
let newhargaasas = (harga1 + (harga2))/2.72;;
count++;
$('#harga'+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;
// if(count == maxcolumn)
// {
// count = 0;
indexarray++;
}
// }
}
else
{
@@ -312,11 +312,11 @@
{
$('#harga2'+index).val(dummy.toFixed(2));
}
else
{
// else
// {
$('#harga'+index).val(dummy.toFixed(2));
}
// $('#harga'+index).val(dummy.toFixed(2));
// }
}
})
+13 -1
View File
@@ -80,7 +80,19 @@ tr:nth-child(even) {
</tr>
</table>
<br><br>
<table cellspacing="" cellpadding="5" text-align="left" border="0" height="25" align="left" id="sim">
<thead>
<br>
<tr>
<td>Lelong ID: {{$lelong_id}}</td>
@foreach ($lelongid as $tarikh)
<td>Tarikh Lelong: {{ $tarikh->tarikh_lelong }}</td>
</tr>
@endforeach
</thead>
</table>
<br>
<table cellspacing="0" cellpadding="5" style="float:right;" border="0" width="100%" height="80" align="left" id="sim">
+20 -8
View File
@@ -85,14 +85,14 @@ tr:nth-child(even) {
<thead>
<tr>
<th width="2%" align="left">No</th>
<th width="12%" align="left">No Rujukan </th>
<th width="15%" align="left">No Rujukan </th>
<th width="10%" align="left">Jenis Marhun</th>
<th width="10%" align="left">Karat</th>
<th width="10%" align="left">Berat(gm)</th>
<th width="12%" align="left">Harga(RM)</th>
<th width="14%" align="left">Nilai Marhun(RM)</th>
<th width="12%" align="left">Nilai Marhun(RM)</th>
<th width="14%" align="left">Harga Asas(RM)</th>
<th width="16%" align="left">Nota</th>
<th width="13%" align="left">Nota</th>
</tr>
</thead>
@@ -128,14 +128,12 @@ tr:nth-child(even) {
</tr>
<tr>
<td colspan="4" align="left"><strong>Jumlah</strong></td>
<td colspan="4" align="left"></td>
<td>{{ number_format($marhun['berat'], 2, '.', ',') }}</td>
<td></td>
<td>{{ number_format($marhun['nilaimarhun'], 2, '.', ',') }}</td>
<td>{{ number_format($marhun['hargaasas'], 2, '.', ',') }}</td>
<td></td>
{{-- <td>{{ number_format($total_hargaasas, 2, '.', ',') }}</td> --}}
</tr>
@endforeach
@foreach ($arraycaw as $index=>$caw)
@@ -147,8 +145,6 @@ tr:nth-child(even) {
<td><strong>{{ number_format($total_nmarhun, 2, '.', ',') }}</strong></td>
<td><strong>{{ number_format($total_hargaasas, 2, '.', ',') }}</strong></td>
<td></td>
{{-- <td>{{ number_format($total_hargaasas, 2, '.', ',') }}</td> --}}
</tr>
@endforeach
</table>
@@ -159,3 +155,19 @@ tr:nth-child(even) {
</tbody>
@foreach ($laporanpembida as $laporan)
<tr>
<td>{{ $loop->iteration }} </td>
<td>{{ $laporan['norujukan'] }}</td>
<td>@foreach ($laporan['details'] as $item)
{{ $item['nilaimarhun'] }}<br>
@endforeach</td>
<td>@foreach ($laporan['details'] as $item)
{{ $item['nama_bidder'] }}<br>
@endforeach</td>
<td>@foreach ($laporan['details'] as $item)
{{ $item['hargabida'] }}<br>
@endforeach</td>
<td>@foreach ($laporan['details'] as $item)
{{ $item['masa_bidaan'] }}<br>
@endforeach</td>
+33 -34
View File
@@ -168,7 +168,6 @@
<th>Karat</th>
<th>Keterangan</th>
<th>Harga</th>
<th>Harga</th>
</tr>
</thead>
<tbody class="text-center">
@@ -177,7 +176,7 @@
<td>{{$karat->karat}}</td>
<td>{{$karat->keterangan}}</td>
<td class="input">{{$karat->harga2}}</td>
<td class="input">{{$karat->harga}}</td>
{{-- <td class="input"></td> --}}
</tr>
@endforeach
</tbody>
@@ -234,14 +233,14 @@
$("td.input").each(function(index) {
// console.log(index)
var la = $(this).html();
if(index%2 ==0 ) //even-0-2-4
{
// 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+" />");
}
// }
// else //odd-1-3-5-7
// {
// $(this).html("<input type='text' name='harga2[]' id=harga2"+index+" value="+la+" />");
// }
})
$("#hideform").show();
@@ -264,49 +263,49 @@
let jeniskarat = $(e).data('jeniskarat');
let maxcolumn = 2;
// 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 = parseInt(hargaasasbaru);
let harga2 = parseInt(jeniskarat[indexarray]['dariharga916']);
// 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 = parseInt(hargaasasbaru);
let harga2 = parseInt(jeniskarat[indexarray]['dariharga916']);
let newhargaasas = (harga1 + (harga2))/2.72;;
count++;
$('#harga'+index).val(newhargaasas.toFixed(2));
}
// }
// else
// {
// let harga1 = parseFloat(hargaasasbaru);
// let harga2 = parseFloat(jeniskarat[indexarray]['dariharga916']);
// let newhargaasas = (harga1 + (harga2));;
// count++;
// $('#harga2'+index).val(newhargaasas.toFixed(2));
// }
if(count == maxcolumn)
{
count = 0;
// if(count == maxcolumn)
// {
// count = 0;
indexarray++;
}
// }
}
else
{
$('#btnsimpan').prop('disabled', true)
let dummy =0;
if(index%2 == 0)
{
// if(index%2 == 0)
// {
$('#harga2'+index).val(dummy.toFixed(2));
}
else
{
// }
// else
// {
$('#harga'+index).val(dummy.toFixed(2));
}
// $('#harga'+index).val(dummy.toFixed(2));
// }
}
})
+19 -19
View File
@@ -78,27 +78,25 @@ Route::group(['middleware' => ['permission:sistem'],'prefix'=>'sistem'], functio
Route::group(['prefix'=>'lelong'], function () {
Route::group(['middleware' => ['permission:pendaftaranbatch']], function () {
Route::get('/create/{id}',['as'=>'lelong.create','uses'=>'LelongController@create']);
Route::get('/senarailelong',['as'=>'lelong.senarailelong','uses'=>'LelongController@index']);
Route::get('/senaraipemenang/{lelong_id}',['as'=>'lelong.senaraipemenang','uses'=>'LelongController@senaraipemenang']);
Route::get('/senaraisagpemenang/{user_id}/{lelong_id}',['as'=>'lelong.senaraisagpemenang','uses'=>'LelongController@senaraisagpemenang']);
Route::get('/senarailelongtaklaku',['as'=>'lelong.senarailelongtaklaku','uses'=>'LelongController@senarailelongtaklaku']);
Route::get('/lelongtaklaku/{lelong_id}',['as'=>'lelong.lelongtaklaku','uses'=>'LelongController@lelongtaklaku']);
Route::get('/showlelong/{id}',['as'=>'lelong.show','uses'=>'LelongController@show']);
Route::get('/deletelelong/{id}',['as'=>'lelong.delete','uses'=>'LelongController@delete']);
Route::get('/export/{id}',['as'=>'lelong.exportnotis','uses'=>'LelongController@exportnotis']);
Route::get('/janapemenang/{id}', ['as'=>'lelong.janapemenang','uses'=>'LelongController@janapemenang']);
Route::get('/laporansenarailelong',['as'=>'lelong.laporansenarailelong','uses'=>'LelongController@laporansenarailelong']);
Route::get('/senaraibrglelong/{lelong_id}',['as'=>'lelong.senaraibrglelong','uses'=>'LelongController@senaraibrglelong']);
Route::post('/pdfsenarailelong',['as'=>'lelong.pdfsenarailelong','uses'=>'LelongController@pdfsenarailelong']);
Route::get('/create/{id}',['as'=>'lelong.create','uses'=>'LelongController@create']);
Route::get('/senarailelong',['as'=>'lelong.senarailelong','uses'=>'LelongController@index']);
Route::get('/senaraipemenang/{lelong_id}',['as'=>'lelong.senaraipemenang','uses'=>'LelongController@senaraipemenang']);
Route::get('/senaraisagpemenang/{user_id}/{lelong_id}',['as'=>'lelong.senaraisagpemenang','uses'=>'LelongController@senaraisagpemenang']);
Route::get('/senarailelongtaklaku',['as'=>'lelong.senarailelongtaklaku','uses'=>'LelongController@senarailelongtaklaku']);
Route::get('/lelongtaklaku/{lelong_id}',['as'=>'lelong.lelongtaklaku','uses'=>'LelongController@lelongtaklaku']);
Route::get('/showlelong/{id}',['as'=>'lelong.show','uses'=>'LelongController@show']);
Route::get('/deletelelong/{id}',['as'=>'lelong.delete','uses'=>'LelongController@delete']);
Route::get('/export/{id}',['as'=>'lelong.exportnotis','uses'=>'LelongController@exportnotis']);
Route::get('/janapemenang/{id}', ['as'=>'lelong.janapemenang','uses'=>'LelongController@janapemenang']);
Route::get('/laporansenarailelong',['as'=>'lelong.laporansenarailelong','uses'=>'LelongController@laporansenarailelong']);
Route::get('/senaraibrglelong/{lelong_id}',['as'=>'lelong.senaraibrglelong','uses'=>'LelongController@senaraibrglelong']);
Route::post('/pdfsenarailelong',['as'=>'lelong.pdfsenarailelong','uses'=>'LelongController@pdfsenarailelong']);
Route::get('/senaraimarhun/{lelongid}/{cawid}', ['as'=>'lelong.senaraimarhun','uses'=>'LelongController@senaraimarhun']);
Route::post('/deletemarhun', ['as'=>'lelong.deletemarhun','uses'=>'LelongController@deletemarhun']);
Route::get('/lapbidaan', ['as'=>'lelong.lapbidaan','uses'=>'LelongController@lapbidaan']);
Route::get('/senarailapbidaan/{lelong_id}',['as' =>'lelong.senarailapbidaan','uses'=>'LelongController@senarailapbidaan']);
Route::get('/senaraimarhun/{lelongid}/{cawid}', ['as'=>'lelong.senaraimarhun','uses'=>'LelongController@senaraimarhun']);
Route::post('/deletemarhun', ['as'=>'lelong.deletemarhun','uses'=>'LelongController@deletemarhun']);
});
Route::group(['middleware' => ['permission:pengesahanpembayaranpc']], function () {
@@ -205,3 +203,5 @@ Route::group(['middleware' => ['permission:jananotis'],'prefix'=>'jananotis'], f
});
+2
View File
@@ -0,0 +1,2 @@
*
!.gitignore