@@ -786,6 +786,7 @@ class ReportAllController extends Controller
|
||||
$datalelong = Http::get(config('app.api_url'). 'get/listbatchlelong/'. $kodcaw ,[
|
||||
'kodcaw' => $kodcaw,
|
||||
])->json();
|
||||
// dd($datalelong);
|
||||
$data = [
|
||||
'kodcaw'=>$kodcaw,
|
||||
'caw_name'=>$cawangan->caw_name,
|
||||
@@ -928,6 +929,49 @@ class ReportAllController extends Controller
|
||||
|
||||
}
|
||||
|
||||
Public function marhunpermatabycawdetailT($cawid){
|
||||
$senarai = [];
|
||||
$cawangan = Cawangan::where('id','=',$cawid)->first();
|
||||
$cawanganDetail = $cawangan->caw_name;
|
||||
$kodcaw = $cawangan->caw_code;
|
||||
$cawid = $cawangan->id;
|
||||
$datalelong = Http::get(config('app.api_url'). 'get/listbatchlelongT/'. $kodcaw ,[
|
||||
'kodcaw' => $kodcaw,
|
||||
])->json();
|
||||
$data = [
|
||||
'kodcaw'=>$kodcaw,
|
||||
'caw_name'=>$cawangan->caw_name,
|
||||
'lelong' => $datalelong ? $datalelong : '',
|
||||
];
|
||||
array_push($senarai,$data);
|
||||
// dd($bycaw_all);
|
||||
return view('laporan.marhunpermatabycawanganT',compact('senarai','cawanganDetail','cawid'));
|
||||
}
|
||||
|
||||
Public function marhunpermatabycawdetailbatchT($kodcaw,$batchno){
|
||||
$senarai = [];
|
||||
$cawangan = Cawangan::where('caw_code','=',$kodcaw)->first();
|
||||
$cawanganDetail = $cawangan->caw_name;
|
||||
|
||||
// $kodcaw = $cawangan->caw_code;
|
||||
$datalelong = Http::get(config('app.api_url'). 'get/listlelongbybatchT/'.$kodcaw.'/'.$batchno ,[
|
||||
'kodcaw' => $kodcaw,
|
||||
'batchno' => $batchno,
|
||||
])->json();
|
||||
// dd($datalelong);
|
||||
$data = [
|
||||
'kodcaw'=>$kodcaw,
|
||||
'batchno'=>$batchno,
|
||||
'caw_name'=>$cawangan->caw_name,
|
||||
'lelong' => $datalelong ? $datalelong : '',
|
||||
];
|
||||
array_push($senarai,$data);
|
||||
// dd($senarai);
|
||||
return view('laporan.marhunpermatabycawanganbybatchT',compact('senarai','cawanganDetail'));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1105,6 +1105,49 @@ class ReportCawanganController extends Controller
|
||||
|
||||
}
|
||||
|
||||
Public function marhunpermatabycawdetailT($cawid){
|
||||
$senarai = [];
|
||||
$cawangan = Cawangan::where('id','=',$cawid)->first();
|
||||
$cawanganDetail = $cawangan->caw_name;
|
||||
$kodcaw = $cawangan->caw_code;
|
||||
$cawid = $cawangan->id;
|
||||
$datalelong = Http::get(config('app.api_url'). 'get/listbatchlelongT/'. $kodcaw ,[
|
||||
'kodcaw' => $kodcaw,
|
||||
])->json();
|
||||
$data = [
|
||||
'kodcaw'=>$kodcaw,
|
||||
'caw_name'=>$cawangan->caw_name,
|
||||
'lelong' => $datalelong ? $datalelong : '',
|
||||
];
|
||||
array_push($senarai,$data);
|
||||
// dd($bycaw_all);
|
||||
return view('laporan.marhunpermatabycawangan',compact('senarai','cawanganDetail','cawid'));
|
||||
}
|
||||
|
||||
Public function marhunpermatabycawdetailbatchT($kodcaw,$batchno){
|
||||
$senarai = [];
|
||||
$cawangan = Cawangan::where('caw_code','=',$kodcaw)->first();
|
||||
$cawanganDetail = $cawangan->caw_name;
|
||||
|
||||
// $kodcaw = $cawangan->caw_code;
|
||||
$datalelong = Http::get(config('app.api_url'). 'get/listlelongbybatchT/'.$kodcaw.'/'.$batchno ,[
|
||||
'kodcaw' => $kodcaw,
|
||||
'batchno' => $batchno,
|
||||
])->json();
|
||||
// dd($datalelong);
|
||||
$data = [
|
||||
'kodcaw'=>$kodcaw,
|
||||
'batchno'=>$batchno,
|
||||
'caw_name'=>$cawangan->caw_name,
|
||||
'lelong' => $datalelong ? $datalelong : '',
|
||||
];
|
||||
array_push($senarai,$data);
|
||||
// dd($senarai);
|
||||
return view('laporan.marhunpermatabycawanganbybatchT',compact('senarai','cawanganDetail'));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -27,8 +27,9 @@
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Cawangan</th>
|
||||
<th>Senarai Mengikut Batch</th>
|
||||
<th>Senarai Sebelum Tawarruq Mengikut Batch</th>
|
||||
<th>Keseluruhan Sebelum Tawarruq</th>
|
||||
<th>Senarai Selepas Tawarruq Mengikut Batch</th>
|
||||
<th>Keseluruhan Selepas Tawarruq</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -43,6 +44,7 @@
|
||||
</td>
|
||||
<td><a class="btn btn-success btn-sm m-1" href="{{ route('reportbycaw.marhunpermatabycawdetail',['cawid'=>$bid->cawangan_info->id]) }}" data-toggle="tooltip" data-placement="top" title="Senarai Lelong"><i class="fas fa-list"></i></a></td>
|
||||
<td><a class="btn btn-success btn-sm m-1" href="{{ route('reportbycaw.marhunpermatabycawdetailall',['cawid'=>$bid->cawangan_info->id]) }}" data-toggle="tooltip" data-placement="top" title="Senarai Lelong"><i class="fas fa-list"></i></a></td>
|
||||
<td><a class="btn btn-success btn-sm m-1" href="{{ route('reportbycaw.marhunpermatabycawdetailT',['cawid'=>$bid->cawangan_info->id]) }}" data-toggle="tooltip" data-placement="top" title="Senarai Lelong"><i class="fas fa-list"></i></a></td>
|
||||
<td><a class="btn btn-success btn-sm m-1" href="{{ route('reportbycaw.marhunpermatabycawdetailallT',['cawid'=>$bid->cawangan_info->id]) }}" data-toggle="tooltip" data-placement="top" title="Senarai Lelong"><i class="fas fa-list"></i></a></td>
|
||||
@endhasrole
|
||||
|
||||
@@ -53,6 +55,7 @@
|
||||
</td>
|
||||
<td><a class="btn btn-success btn-sm m-1" href="{{ route('reportcaw.marhunpermatabycawdetail',['cawid'=>$bid->cawangan_info->id]) }}" data-toggle="tooltip" data-placement="top" title="Senarai Lelong"><i class="fas fa-list"></i></a></td>
|
||||
<td><a class="btn btn-success btn-sm m-1" href="{{ route('reportcaw.marhunpermatabycawdetailall',['cawid'=>$bid->cawangan_info->id]) }}" data-toggle="tooltip" data-placement="top" title="Senarai Lelong"><i class="fas fa-list"></i></a></td>
|
||||
<td><a class="btn btn-success btn-sm m-1" href="{{ route('reportcaw.marhunpermatabycawdetailT',['cawid'=>$bid->cawangan_info->id]) }}" data-toggle="tooltip" data-placement="top" title="Senarai Lelong"><i class="fas fa-list"></i></a></td>
|
||||
<td><a class="btn btn-success btn-sm m-1" href="{{ route('reportcaw.marhunpermatabycawdetailallT',['cawid'=>$bid->cawangan_info->id]) }}" data-toggle="tooltip" data-placement="top" title="Senarai Lelong"><i class="fas fa-list"></i></a></td>
|
||||
@endhasrole
|
||||
</tr>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<i class="fas fa-arrow-left"></i>
|
||||
</a>
|
||||
<div class="header-style-title">
|
||||
Marhun Permata: {{$cawanganDetail}}
|
||||
Marhun Permata Sebelum Tawarruq: {{$cawanganDetail}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
<div class="row ">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-header header-style">
|
||||
<div class="card-header header-style">
|
||||
<a href="javascript:window.history.go(-1);" class="header-style-icon">
|
||||
<i class="fas fa-arrow-left"></i>
|
||||
</a>
|
||||
<div class="header-style-title">
|
||||
Marhun Permata Selepas Tawarruq: {{$cawanganDetail}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
@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-bordered text-center" id="tablenotislelong" style="width:100%">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Tarikh Lelong</th>
|
||||
<th>Batch Lelong</th>
|
||||
<th>Bil.Surat</th>
|
||||
<th>Senarai</th>
|
||||
{{-- <th>Jenis</th> --}}
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{-- {{dd($senarai[0]['lelong'])}} --}}
|
||||
@foreach ($senarai[0]['lelong'] as $bid)
|
||||
{{-- {{dd($bid['t_lelong'])}} --}}
|
||||
{{-- {{dd($bid['lelong_info']['id'])}} --}}
|
||||
<tr>
|
||||
<td>{{$loop->iteration}}
|
||||
<td>@foreach ($bid['t_lelong'] as $index=>$tlelong)
|
||||
@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $tlelong[0]['t_lelong'] );
|
||||
$t_lelong = $myDateTime->format('d-m-Y');
|
||||
echo($t_lelong);
|
||||
@endphp
|
||||
@endforeach
|
||||
</td>
|
||||
<td>{{ $bid['batchno']}}</td>
|
||||
<td><span class="badge badge-pill badge-info text-white" style="font-size:100%">{{ $bid['total_lelong']}}</span></td>
|
||||
@hasrole('operasi')
|
||||
<td><a class="btn btn-success btn-sm m-1" href="{{ route('reportbycaw.marhunpermatabycawdetailbatchT',['kodcaw'=>$bid['kodcaw'],'batchno' =>$bid['batchno']]) }}" data-toggle="tooltip" data-placement="top" title="Senarai Lelong"><i class="fas fa-list"></i></a></td>
|
||||
@endhasrole
|
||||
@hasrole('pengurus-cawangan')
|
||||
<td><a class="btn btn-success btn-sm m-1" href="{{ route('reportcaw.marhunpermatabycawdetailbatchT',['kodcaw'=>$bid['kodcaw'],'batchno' =>$bid['batchno']]) }}" data-toggle="tooltip" data-placement="top" title="Senarai Lelong"><i class="fas fa-list"></i></a></td>
|
||||
@endhasrole
|
||||
{{-- <td></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: [[0, 'asc']],
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 99999,
|
||||
dom: 'Bfrtip',
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -11,7 +11,7 @@
|
||||
<i class="fas fa-arrow-left"></i>
|
||||
</a>
|
||||
<div class="header-style-title">
|
||||
Marhun Permata: {{$cawanganDetail}}<br>
|
||||
Marhun Permata Sebelum Tawarruq: {{$cawanganDetail}}<br>
|
||||
BatchNo: {{$senarai[0]['batchno']}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
<div class="row ">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-header header-style">
|
||||
<div class="card-header header-style">
|
||||
<a href="javascript:window.history.go(-1);" class="header-style-icon">
|
||||
<i class="fas fa-arrow-left"></i>
|
||||
</a>
|
||||
<div class="header-style-title">
|
||||
Marhun Permata Selepas Tawarruq: {{$cawanganDetail}}<br>
|
||||
BatchNo: {{$senarai[0]['batchno']}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
@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-bordered text-center" id="tablenotislelong" style="width:100%">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>No.Rujukan</th>
|
||||
<th>No.KP</th>
|
||||
<th>Kuantiti</th>
|
||||
<th>Tarikh Pembiayaan/Tarikh Gadaian</th>
|
||||
<th>Tarikh Lelong</th>
|
||||
<th>Baki Lelong(RM)</th>
|
||||
<th>Rugi Lelong(RM)</th>
|
||||
<th>Tempoh Simpanan Batu Permata Selepas Lelong</th>
|
||||
<th>Marhun</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{-- {{dd($senarai[0]['lelong'])}} --}}
|
||||
@foreach ($senarai[0]['lelong'] as $index=>$bid)
|
||||
{{-- {{ \Carbon\Carbon::createFromFormat('created_at', 'd-m-Y')->toDateTimeString() }} --}}
|
||||
@php
|
||||
$today = date('Y-m-d');
|
||||
$get_start_date = new DateTime($today); // New date object
|
||||
$get_end_date = date('Y-m-d',strtotime($bid['t_lelong']));
|
||||
$end_date = new DateTime($get_end_date); // New date object
|
||||
$months = $end_date->diff($get_start_date);
|
||||
$months1 = $months->format('%y Tahun %m Bulan %d Hari');
|
||||
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{$loop->iteration}}
|
||||
<td style='white-space:nowrap;'>{{ $bid['norujukan']}}</td>
|
||||
<td>{{ $bid['nokp']}}</td>
|
||||
<td>{{ $bid['kuantiti']}}</td>
|
||||
<td style='white-space:nowrap;'> @php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $bid['t_gadai'] );
|
||||
$t_gadai = $myDateTime->format('d-m-Y');
|
||||
echo($t_gadai);
|
||||
@endphp</td>
|
||||
<td style='white-space:nowrap;'>@php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $bid['t_lelong'] );
|
||||
$t_lelong = $myDateTime->format('d-m-Y');
|
||||
echo($t_lelong);
|
||||
@endphp</td>
|
||||
<td>@php if($bid['baki'] > 0){
|
||||
$bakilelong = $bid['baki'];
|
||||
echo($bakilelong);}
|
||||
elseif($bid['baki'] < 0){
|
||||
$bakilelong = '';
|
||||
echo($bakilelong);}
|
||||
@endphp
|
||||
</td>
|
||||
<td>@php if($bid['baki'] > 0){
|
||||
$bakilelong = '';
|
||||
echo($bakilelong);}
|
||||
elseif($bid['baki'] < 0){
|
||||
$bakilelong = $bid['baki'];
|
||||
echo($bakilelong);}
|
||||
@endphp
|
||||
</td>
|
||||
<td>{{$months1}}</td>
|
||||
<td align='left' style='white-space:nowrap;'>
|
||||
|
||||
@foreach ($bid['listmarhun'] as $index1=>$bid2)
|
||||
{{$loop->iteration.'. '.$bid2['marhun'].':'.$bid2['nota']}}<br>
|
||||
@endforeach
|
||||
|
||||
</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: [[0, 'asc']],
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 99999,
|
||||
dom: 'Bfrtip',
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -626,6 +626,8 @@ Route::get('/marhunpermatabycawdetail/{cawid}',['as'=>'reportcaw.marhunpermataby
|
||||
Route::get('/marhunpermatabycawdetailbatch/{kodcaw}/{batchno}',['as'=>'reportcaw.marhunpermatabycawdetailbatch','uses'=>'ReportCawanganController@marhunpermatabycawdetailbatch']);
|
||||
Route::get('/marhunpermatabycawdetailall/{cawid}',['as'=>'reportcaw.marhunpermatabycawdetailall','uses'=>'ReportCawanganController@marhunpermatabycawdetailall']);
|
||||
Route::post('/marhunpermatabycawdetailallpdf/{cawid}',['as'=>'reportcaw.marhunpermatabycawdetailallpdf','uses'=>'ReportCawanganController@marhunpermatabycawdetailallpdf']);
|
||||
Route::get('/marhunpermatabycawdetailT/{cawid}',['as'=>'reportcaw.marhunpermatabycawdetailT','uses'=>'ReportCawanganController@marhunpermatabycawdetailT']);
|
||||
Route::get('/marhunpermatabycawdetailbatchT/{kodcaw}/{batchno}',['as'=>'reportcaw.marhunpermatabycawdetailbatchT','uses'=>'ReportCawanganController@marhunpermatabycawdetailbatchT']);
|
||||
Route::get('/marhunpermatabycawdetailallT/{cawid}',['as'=>'reportcaw.marhunpermatabycawdetailallT','uses'=>'ReportCawanganController@marhunpermatabycawdetailallT']);
|
||||
Route::post('/marhunpermatabycawdetailallpdfT/{cawid}',['as'=>'reportcaw.marhunpermatabycawdetailallpdfT','uses'=>'ReportCawanganController@marhunpermatabycawdetailallpdfT']);
|
||||
|
||||
@@ -703,6 +705,8 @@ Route::group(['middleware' => ['permission:reportbycaw'],'prefix'=>'reportbycaw'
|
||||
Route::get('/marhunpermatabycawdetailbatch/{kodcaw}/{batchno}',['as'=>'reportbycaw.marhunpermatabycawdetailbatch','uses'=>'ReportAllController@marhunpermatabycawdetailbatch']);
|
||||
Route::get('/marhunpermatabycawdetailall/{cawid}',['as'=>'reportbycaw.marhunpermatabycawdetailall','uses'=>'ReportAllController@marhunpermatabycawdetailall']);
|
||||
Route::post('/marhunpermatabycawdetailallpdf/{cawid}',['as'=>'reportbycaw.marhunpermatabycawdetailallpdf','uses'=>'ReportAllController@marhunpermatabycawdetailallpdf']);
|
||||
Route::get('/marhunpermatabycawdetailT/{cawid}',['as'=>'reportbycaw.marhunpermatabycawdetailT','uses'=>'ReportAllController@marhunpermatabycawdetailT']);
|
||||
Route::get('/marhunpermatabycawdetailbatchT/{kodcaw}/{batchno}',['as'=>'reportbycaw.marhunpermatabycawdetailbatchT','uses'=>'ReportAllController@marhunpermatabycawdetailbatchT']);
|
||||
Route::get('/marhunpermatabycawdetailallT/{cawid}',['as'=>'reportbycaw.marhunpermatabycawdetailallT','uses'=>'ReportAllController@marhunpermatabycawdetailallT']);
|
||||
Route::post('/marhunpermatabycawdetailallpdfT/{cawid}',['as'=>'reportbycaw.marhunpermatabycawdetailallpdfT','uses'=>'ReportAllController@marhunpermatabycawdetailallpdfT']);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user