jana notis, notis pdf, excel
This commit is contained in:
@@ -18,6 +18,9 @@ use App\Models\Gadai;
|
||||
use Carbon\Carbon;
|
||||
use PDF;
|
||||
use DateTime;
|
||||
use Maatwebsite\Excel\Concerns\FromCollection;
|
||||
use Excel;
|
||||
|
||||
|
||||
|
||||
class NotisController extends Controller
|
||||
@@ -100,7 +103,6 @@ class NotisController extends Controller
|
||||
$lelong = Lelong::where('id', $lelongid)->get();
|
||||
|
||||
|
||||
// return view ('pdf.jananotis',compact('payment','lelong_id','lelongid','caw','tarikh_cetak'));
|
||||
|
||||
$pdf = PDF::loadView('pdf.jananotis',compact('payment','lelong_id','lelongid','caw','tarikh_cetak'))
|
||||
->setPaper('a4', 'potrait');
|
||||
@@ -110,7 +112,40 @@ class NotisController extends Controller
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function listnotis(Request $request){
|
||||
|
||||
|
||||
$user = Auth::user();
|
||||
$caw = Cawangan::where('caw_code','=',$user->kodcaw)
|
||||
->first();
|
||||
|
||||
$lelong_id = $request->lelong_id;
|
||||
|
||||
$payment = LelongBid::join('gadai','lelongbid.norujukan','=','gadai.norujukan')
|
||||
->where('lelongbid.lelong_id', $lelong_id)
|
||||
->get()->toArray();
|
||||
|
||||
if($request->type == 'excel')
|
||||
{
|
||||
return view('excel.listnotis_excel',compact('payment','caw','lelong_id'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$pdf = PDF::loadView('pdf.listnotis',compact('payment','caw','lelong_id'))
|
||||
->setPaper('a4', 'landscape');
|
||||
|
||||
return $pdf->download('Senarai Notis.pdf');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -56,9 +56,9 @@ class SerahanController extends Controller
|
||||
return view('serahan.laporanserahan',compact('lelongbid','lelongid'));
|
||||
}
|
||||
|
||||
public function pembayaran($id){
|
||||
public function pembayaran($lelong_id){
|
||||
|
||||
$lelong_id = $id;
|
||||
$lelong_id = $lelong_id;
|
||||
|
||||
$payment = LelongBidder::join('lelongbid', 'lelongbidder.lelongbid_id', '=', 'lelongbid.id')
|
||||
->where('lelongbidder.status_bidder', 1)
|
||||
@@ -129,7 +129,8 @@ class SerahanController extends Controller
|
||||
|
||||
public function resitpembayaran($user_id, $lelong_id)
|
||||
{
|
||||
|
||||
|
||||
|
||||
$user = Auth::user();
|
||||
|
||||
$caw = Cawangan::where('caw_code','=',$user->kodcaw)->first()->toArray();
|
||||
@@ -141,8 +142,10 @@ class SerahanController extends Controller
|
||||
->first();
|
||||
|
||||
$invois = Payment::join('resit','payment.resit_id','=','resit.id')
|
||||
->where('payment.id',$lelong_id)
|
||||
->first();
|
||||
->where('resit.id',$lelong_id)
|
||||
->first();
|
||||
// dd($invois);
|
||||
|
||||
|
||||
$SAGWin = LelongBidder::join('lelongbid', 'lelongbidder.lelongbid_id', '=', 'lelongbid.id')
|
||||
->where('user_id',$user_id)
|
||||
|
||||
Generated
+9337
-26
File diff suppressed because it is too large
Load Diff
Vendored
+2759
File diff suppressed because one or more lines are too long
@@ -0,0 +1,102 @@
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<script src="{{ asset('js/table2excel.js') }}"></script>
|
||||
<style>
|
||||
|
||||
.letter{
|
||||
font-family:'Times New Roman', Times, serif;
|
||||
|
||||
}
|
||||
|
||||
.row::after {
|
||||
content: "";
|
||||
clear: both;
|
||||
display: table;
|
||||
|
||||
}
|
||||
|
||||
.first-prgph{
|
||||
|
||||
float: left;
|
||||
width: 10%;
|
||||
padding: 2px;
|
||||
}
|
||||
.first-prgph1{
|
||||
|
||||
float: left;
|
||||
width: 30%;
|
||||
padding-left: 50px;
|
||||
}
|
||||
.page-break {
|
||||
page-break-before: always;
|
||||
}
|
||||
.name{
|
||||
padding-top: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
<div class = "letter">
|
||||
|
||||
<div class="row">
|
||||
<div class="first-prgph">
|
||||
<img src="http://lelongrpt.test/img/icon_pkb.png" alt="PKB LOGO" width="100" height="100">
|
||||
</div>
|
||||
|
||||
<div class="first-prgph1">
|
||||
<p> {{$caw['caw_name']}}<br>
|
||||
{{$caw['alamat1']}}<br>
|
||||
{{$caw['alamat2']}}<br>
|
||||
No Tel: {{$caw['notel']}}<br>
|
||||
No Faks: {{$caw['nofaks']}}
|
||||
</p><br>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
|
||||
<table width="100%" height="168" id="customers">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>JBG</th>
|
||||
<th>No KP</th>
|
||||
<th>Pembiayaan</th>
|
||||
<th>Keuntungan 6 Bulan</th>
|
||||
<th>Bayaran Telah Dibuat</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach($payment as $pay)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }} </td>
|
||||
<td>{{ $pay['norujukan']}}</td>
|
||||
<td>{{ $pay['jbg']}}</td>
|
||||
<td>{{ $pay['nokp']}}</td>
|
||||
<td>{{ $pay['pinjaman']}}</td>
|
||||
<td>{{ $pay['bakiupah']}}</td>
|
||||
<td></td>
|
||||
{{-- join online_arrahn table (transaksi_keuntungan) --}}
|
||||
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
// window.print();
|
||||
// window.onfocus=function(){ window.close();}
|
||||
var table2excel = new Table2Excel();
|
||||
table2excel.export(document.querySelectorAll("#customers"),'senarai_notis');
|
||||
setTimeout(function(){ window.close() }, 1000);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@@ -1,12 +1,24 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row ">
|
||||
<div class="col-md-11 mx-auto card p-4">
|
||||
<table class="table table-striped table-xl text-center" style="width:100%">
|
||||
<thead class="bg-primary text-white">
|
||||
|
||||
@if ($message = Session::get('success'))
|
||||
<div class="alert alert-success">
|
||||
<p>{{ $message }}</p>
|
||||
</div>
|
||||
@endif
|
||||
<form id="exportpdf" action="{{route('jananotis.listnotis')}}" method="POST">
|
||||
{{-- <form id="exportexcel" action="{{route('jananotis.listnotis_excel')}}" method="POST"> --}}
|
||||
|
||||
@csrf
|
||||
<input type="hidden" name="type" id="typedonwload" value="">
|
||||
<input type="hidden" name="lelong_id" value="{{ $lelong_id}}">
|
||||
|
||||
<table class="table table-striped table-xl" id="notis" style="width:100%">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>No Rujukan</th>
|
||||
@@ -29,86 +41,62 @@
|
||||
<td></td>
|
||||
{{-- join online_arrahn table (transaksi_keuntungan) --}}
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('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');
|
||||
<script>
|
||||
|
||||
var tablelelongbid= $('#notis').DataTable( {
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 5,
|
||||
"orderable": false
|
||||
}
|
||||
],
|
||||
// order: [[1, 'asc']],
|
||||
// // "ordering": false,
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 15,
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
|
||||
{
|
||||
className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export',
|
||||
titleAttr: 'Export to Excel',
|
||||
text: '<i class="fas fa-download"></i>',
|
||||
action: function ( e, dt, node, config ) {
|
||||
$('#typedonwload').val('excel');
|
||||
$("#exportpdf").submit();
|
||||
}
|
||||
},
|
||||
{
|
||||
className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export',
|
||||
titleAttr: 'Export to PDF',
|
||||
text: '<i class="fas fa-download"></i>',
|
||||
action: function ( e, dt, node, config ) {
|
||||
$('#typedonwload').val('pdf');
|
||||
$("#exportpdf").submit();
|
||||
}
|
||||
}
|
||||
},
|
||||
Batal: {
|
||||
btnClass: 'btn-default',
|
||||
action: function () {}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var tablesimulasi = $('#simulasi').DataTable( {
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 5,
|
||||
"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) {
|
||||
tablesimulasi.rows().nodes().to$().find('input[type="checkbox"]').each(function(){
|
||||
$(this).prop('checked', cb.checked);
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
]
|
||||
|
||||
});
|
||||
|
||||
$('.export').tooltip();
|
||||
$( '.export').removeClass('dt-button');
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<style>
|
||||
|
||||
.letter{
|
||||
font-family:'Times New Roman', Times, serif;
|
||||
|
||||
}
|
||||
|
||||
.row::after {
|
||||
content: "";
|
||||
clear: both;
|
||||
display: table;
|
||||
|
||||
}
|
||||
|
||||
.first-prgph{
|
||||
|
||||
float: left;
|
||||
width: 10%;
|
||||
padding: 2px;
|
||||
}
|
||||
.first-prgph1{
|
||||
|
||||
float: left;
|
||||
width: 30%;
|
||||
padding-left: 50px;
|
||||
}
|
||||
.page-break {
|
||||
page-break-before: always;
|
||||
}
|
||||
.name{
|
||||
padding-top: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
<div class = "letter">
|
||||
|
||||
<div class="row">
|
||||
<div class="first-prgph">
|
||||
<img src="http://lelongrpt.test/img/icon_pkb.png" alt="PKB LOGO" width="100" height="100">
|
||||
</div>
|
||||
|
||||
<div class="first-prgph1">
|
||||
<p> {{$caw['caw_name']}}<br>
|
||||
{{$caw['alamat1']}}<br>
|
||||
{{$caw['alamat2']}}<br>
|
||||
No Tel: {{$caw['notel']}}<br>
|
||||
No Faks: {{$caw['nofaks']}}
|
||||
</p><br>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
|
||||
<table width="100%" height="168" id="customers">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>JBG</th>
|
||||
<th>No KP</th>
|
||||
<th>Pembiayaan</th>
|
||||
<th>Keuntungan 6 Bulan</th>
|
||||
<th>Bayaran Telah Dibuat</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach($payment as $pay)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }} </td>
|
||||
<td>{{ $pay['norujukan']}}</td>
|
||||
<td>{{ $pay['jbg']}}</td>
|
||||
<td>{{ $pay['nokp']}}</td>
|
||||
<td>{{ $pay['pinjaman']}}</td>
|
||||
<td>{{ $pay['bakiupah']}}</td>
|
||||
<td></td>
|
||||
{{-- join online_arrahn table (transaksi_keuntungan) --}}
|
||||
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{$caw['alamat1']}}</td>
|
||||
<td align="right">No.Slip: {{$invois->reference_no}}</td>
|
||||
<td align="right">No.Slip: {{$invois['reference_no']}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{$caw['alamat2']}}</td>
|
||||
|
||||
@@ -43,6 +43,12 @@
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="first-prgph">
|
||||
<img src="http://lelong.test/img/icon_pkb.png" alt="PKB LOGO" width="100" height="100">
|
||||
</div>
|
||||
|
||||
<h5><u>SENARAI BARANG LELONGAN DIBIDA OLEH PEMBIDA</u></h5>
|
||||
<table width="100%" border="0" id="marhun">
|
||||
|
||||
@@ -160,6 +160,9 @@ Route::group(['middleware' => ['permission:jananotis'],'prefix'=>'jananotis'], f
|
||||
Route::get('/notislelong',['as'=>'jananotis.notislelong','uses'=>'NotisController@notislelong']);
|
||||
Route::get('/senarainotis/{lelong_id}',['as'=>'jananotis.senarainotis','uses'=>'NotisController@senarainotis']);
|
||||
Route::get('/jananotis/{lelong_id}',['as'=>'jananotis.jananotis','uses'=>'NotisController@jananotis']);
|
||||
Route::post('/listnotis',['as'=>'jananotis.listnotis','uses'=>'NotisController@listnotis']);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user