Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
konaspi2024
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Siti Aisah
konaspi2024
Commits
b31d21f7
Commit
b31d21f7
authored
Sep 12, 2024
by
Triyah Fatmawati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add fitur data pembayaran konaspi
parent
43c47728
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
251 additions
and
0 deletions
+251
-0
app/Http/Controllers/Admin/AdminController.php
+39
-0
config/database.php
+15
-0
resources/views/admin/pembayaran/excel.blade.php
+127
-0
resources/views/admin/pembayaran/index.blade.php
+64
-0
resources/views/layouts/sidebar.blade.php
+3
-0
routes/web.php
+3
-0
No files found.
app/Http/Controllers/Admin/AdminController.php
View file @
b31d21f7
...
...
@@ -11,6 +11,7 @@
use
App\Models\Registrasi
;
use
App\Models\User
;
use
App\Models\VRegistrasi
;
use
Carbon\Carbon
;
use
Exception
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Facades\DB
;
...
...
@@ -332,4 +333,42 @@ public function download_peserta()
return
view
(
'admin.peserta.excel'
,
$data
);
}
public
function
index_pembayaran
(){
$pembayaranVa
=
DB
::
connection
(
'va'
)
->
table
(
'neosidata.v_pembayaran_konaspi'
)
->
orderBy
(
'va'
)
->
get
();
foreach
(
$pembayaranVa
as
$key
=>
$value
)
{
$nomorVa
[]
=
$value
->
va
;
$konaspi
=
Registrasi
::
where
(
'nomor_va'
,
$value
->
va
)
->
first
();
$date
=
Carbon
::
createFromFormat
(
'dmy'
,
$value
->
tgl
)
->
format
(
'Y-m-d'
);
$data
[
$key
]
=
[
'konaspi'
=>
$konaspi
,
'va'
=>
$value
,
'tglbayar'
=>
$date
];
}
return
view
(
'admin.pembayaran.index'
,
compact
(
'data'
));
}
public
function
download_data_pembayaran
()
{
date_default_timezone_set
(
"Asia/Jakarta"
);
$pembayaranVa
=
DB
::
connection
(
'va'
)
->
table
(
'neosidata.v_pembayaran_konaspi'
)
->
orderBy
(
'va'
)
->
get
();
foreach
(
$pembayaranVa
as
$key
=>
$value
)
{
$nomorVa
[]
=
$value
->
va
;
$konaspi
=
Registrasi
::
where
(
'nomor_va'
,
$value
->
va
)
->
first
();
$date
=
Carbon
::
createFromFormat
(
'dmy'
,
$value
->
tgl
)
->
format
(
'Y-m-d'
);
$data
[
$key
]
=
[
'konaspi'
=>
$konaspi
,
'va'
=>
$value
,
'tglbayar'
=>
$date
];
}
return
view
(
'admin.pembayaran.excel'
,
compact
(
'data'
));
}
}
config/database.php
View file @
b31d21f7
...
...
@@ -78,6 +78,21 @@
'sslmode'
=>
'prefer'
,
],
'va'
=>
[
'driver'
=>
'pgsql'
,
'url'
=>
env
(
'DATABASE_URL'
),
'host'
=>
env
(
'DB_HOST_VA'
,
'127.0.0.1'
),
'port'
=>
env
(
'DB_PORT_VA'
,
'5432'
),
'database'
=>
env
(
'DB_DATABASE_VA'
,
'forge'
),
'username'
=>
env
(
'DB_USERNAME_VA'
,
'forge'
),
'password'
=>
env
(
'DB_PASSWORD_VA'
,
''
),
'charset'
=>
'utf8'
,
'prefix'
=>
''
,
'prefix_indexes'
=>
true
,
'search_path'
=>
'public'
,
'sslmode'
=>
'prefer'
,
],
'sqlsrv'
=>
[
'driver'
=>
'sqlsrv'
,
'url'
=>
env
(
'DATABASE_URL'
),
...
...
resources/views/admin/pembayaran/excel.blade.php
0 → 100644
View file @
b31d21f7
<?php
$nama_file
=
'Data Pembayaran Konaspi'
;
header
(
"Content-type: application/vnd-ms-excel"
);
header
(
"Content-Disposition: attachment; filename=
$nama_file
.xls"
);
?>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<title>
Data Pembayaran KONASPI 2024
</title>
<style
type=
"text/css"
>
body
{
background-color
:
#FFF
;
}
.num
{
mso-number-format
:
"\@"
;
}
.title-sm
{
/*font-family: 'myriadproregular'; */
font-size
:
15pt
;
font-weight
:
bold
;
}
.title-lg
{
/*font-family: 'myriadproregular'; */
font-size
:
24pt
;
font-weight
:
bold
;
}
body
{
font-size
:
11pt
;
/*font-family: 'myriadproregular'; */
}
.title-jurusan
{
/*font-family: 'myriadproregular'; */
font-size
:
20pt
;
font-weight
:
bold
;
}
#head-title
{
/*font-family: MyriadPro-Regular; */
src
:
url("{{ asset('assets/font/MyriadPro-Regular.otf')
}
}"
);
font-family
:MyriadPro-Regular
;
font-weight
:bold
;
}
#head-big
{
/*font-family:MyriadPro-Cond; */
font-weight
:
bold
;
font-size
:
22pt
;
}
#container
td
{
/*font-family:MyriadPro-Regular;*/
}
.page-break
{
page-break-after
:
always
;
}
div
.ui-menu
li
{
list-style
:
none
;
background-image
:
none
;
background-repeat
:
none
;
background-position
:
0
;
}
ul
{
list-style-type
:
none
;
padding
:
0px
;
margin
:
0px
;
}
li
{
background-image
:
url(sqpurple.gif)
;
background-repeat
:
no-repeat
;
background-position
:
0px
5px
;
padding-left
:
14px
;
}
.responsive
{
width
:
100%
;
height
:
auto
;
}
.kotak
{
border
:
1px
solid
#000
;
width
:
15px
;
height
:
15px
;
font-weight
:
bold
;
font-size
:
9pt
}
</style>
<style>
.str
{
mso-number-format
:
\@
;
}
</style>
<center>
DATA PEMBAYARAN KONASPI 2024
</center>
<table>
<thead>
<tr
style=
"text-align: center;"
>
<th
style=
"text-align: center;"
>
No.
</th>
<th
style=
"text-align: center;"
>
Kode Registrasi
</th>
<th
style=
"text-align: center;"
>
Nama
</th>
<th
style=
"text-align: center;"
>
Instansi
</th>
<th
style=
"text-align: center;"
>
No. VA
</th>
<th
style=
"text-align: center;"
>
Tagihan
</th>
<th
style=
"text-align: center;"
>
Jumlah Pembayaran
</th>
<th
style=
"text-align: center;"
>
Tanggal Pembayaran
</th>
</tr>
</thead>
<tbody>
@php
$no = 1;
$total_tagihan = 0;
$total_pembayaran = 0;
@endphp
@foreach ($data as $val)
<tr
style=
"text-align: center"
>
<td>
{{$no}}
</td>
<td>
{{$val['konaspi']->kode_registrasi}}
</td>
<td
style=
"text-align: left"
>
{{$val['konaspi']->nama}}
</td>
<td
style=
"text-align: left"
>
{{$val['konaspi']->instansi}}
</td>
<td>
{{"'".$val['va']->va}}
</td>
<td
style=
"text-align: right"
>
{{ number_format($val['va']->tagihan, 2, ',', '.') }}
</td>
<td
style=
"text-align: right"
>
{{ number_format($val['va']->terbayar, 2, ',', '.') }}
</td>
<td>
{{$val['tglbayar']}}
</td>
</tr>
@php
$no++;
$total_tagihan += $val['va']->tagihan;
$total_pembayaran += $val['va']->terbayar;
@endphp
@endforeach
<tr>
<td
colspan=
"5"
style=
"text-align: center"
><b>
Total
</b></td>
<td>
{{ number_format($total_tagihan, 2, ',', '.') }}
</td>
<td>
{{ number_format($total_pembayaran, 2, ',', '.') }}
</td>
</tr>
</tbody>
</table>
resources/views/admin/pembayaran/index.blade.php
0 → 100644
View file @
b31d21f7
@
extends
(
'layouts.app'
)
@
section
(
'title'
,
'Participant Data'
)
@
section
(
'content'
)
<
section
class
="
section
">
<div class="
section
-
header
">
<h1>Participant Data</h1>
<div class="
section
-
header
-
breadcrumb
">
<div class="
breadcrumb
-
item
">
<a href="">Home</a>
</div>
<div class="
breadcrumb
-
item
active
">Data Peserta</div>
</div>
</div>
<div class="
section
-
body
">
<div class="
row
mt
-
4
active
" id="
tab
-
semuapeserta
" data-tab-group="
mygroup
-
tab
">
<div class="
col
-
12
">
<div class="
card
">
<div class="
card
-
body
">
<a href="
{{
route
(
'admin.download_pembayaran'
)}}
" class="
btn
btn
-
primary
">Download Data</a>
<div class="
clearfix
mb
-
3
"></div>
<div class="
table
-
responsive
">
<table class="
display
" id="
table
-
1
">
<thead>
<tr>
<th style="
text
-
align
:
center
;
">No.</th>
<th style="
text
-
align
:
center
;
">Kode Registrasi</th>
<th style="
text
-
align
:
center
;
">Nama</th>
<th style="
text
-
align
:
center
;
">Instansi</th>
<th style="
text
-
align
:
center
;
">No. VA</th>
<th style="
text
-
align
:
center
;
">Tagihan</th>
<th style="
text
-
align
:
center
;
">Jumlah Pembayaran</th>
<th style="
text
-
align
:
center
;
">Tanggal Pembayaran</th>
</tr>
</thead>
<tbody>
@php
$no
= 1;
@endphp
@foreach (
$data
as
$val
)
<tr style="
text
-
align
:
center
">
<td>
{
{$no}
}
</td>
<td>
{
{$val['konaspi']->kode_registrasi}
}
</td>
<td style="
text
-
align
:
left
">
{
{$val['konaspi']->nama}
}
</td>
<td style="
text
-
align
:
left
">
{
{$val['konaspi']->instansi}
}
</td>
<td>
{
{$val['va']->va}
}
</td>
<td style="
text
-
align
:
right
">{{ number_format(
$val['va']
->tagihan, 2, ',', '.') }}</td>
<td style="
text
-
align
:
right
">{{ number_format(
$val['va']
->terbayar, 2, ',', '.') }}</td>
<td>
{
{$val['tglbayar']}
}
</td>
</tr>
@php
$no
++;
@endphp
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</section>
@endsection
resources/views/layouts/sidebar.blade.php
View file @
b31d21f7
...
...
@@ -16,6 +16,9 @@
<a class="
nav
-
link
" href="
{{
route
(
'admin.index_peserta'
)}}
"><i class="
fa
fa
-
users
"></i><span>Data Peserta</span></a>
</li>
<li class="
nav
-
item
">
<a class="
nav
-
link
" href="
{{
route
(
'admin.index_pembayaran'
)}}
"><i class="
fa
fa
-
money
"></i><span>Data Pembayaran</span></a>
</li>
<li class="
nav
-
item
">
<a class="
nav
-
link
" href="
{{
route
(
'admin.index_kegiatan'
)}}
"><i class="
fa
fa
-
suitcase
"></i><span>Master Kegiatan</span></a>
</li>
<li class="
nav
-
item
">
...
...
routes/web.php
View file @
b31d21f7
...
...
@@ -38,6 +38,9 @@
Route
::
put
(
'/updateuser/{id}'
,
[
AdminController
::
class
,
'update_user'
])
->
name
(
'admin.update_user'
);
Route
::
get
(
'/deleteuser/{id}'
,
[
AdminController
::
class
,
'delete_user'
])
->
name
(
'admin.delete_user'
);
Route
::
get
(
'/pembayaran'
,
[
AdminController
::
class
,
'index_pembayaran'
])
->
name
(
'admin.index_pembayaran'
);
Route
::
get
(
'/download_pembayaran'
,
[
AdminController
::
class
,
'download_data_pembayaran'
])
->
name
(
'admin.download_pembayaran'
);
Route
::
get
(
'/kegiatan'
,
[
AdminController
::
class
,
'index_kegiatan'
])
->
name
(
'admin.index_kegiatan'
);
Route
::
post
(
'/createkegiatan'
,
[
AdminController
::
class
,
'store_kegiatan'
])
->
name
(
'admin.create_kegiatan'
);
Route
::
put
(
'/updatekegiatan/{id}'
,
[
AdminController
::
class
,
'update_kegiatan'
])
->
name
(
'admin.update_kegiatan'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment