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
7f9aef4d
Commit
7f9aef4d
authored
Feb 04, 2024
by
Triyah Fatmawati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add invoice
parent
7bc4b361
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
183 additions
and
19 deletions
+183
-19
app/Http/Controllers/RegistrasiController.php
+9
-3
resources/views/form_registrasi.blade.php
+47
-16
resources/views/invoice.blade.php
+127
-0
No files found.
app/Http/Controllers/RegistrasiController.php
View file @
7f9aef4d
...
@@ -65,12 +65,18 @@ public function store(Request $request) {
...
@@ -65,12 +65,18 @@ public function store(Request $request) {
'id_kegiatan'
=>
$request
->
kegiatan
,
'id_kegiatan'
=>
$request
->
kegiatan
,
'kode_registrasi'
=>
strip_tags
(
$request
->
kode_registrasi
)
'kode_registrasi'
=>
strip_tags
(
$request
->
kode_registrasi
)
];
];
// dd($registrasi);
$tglRegistrasi
=
Carbon
::
now
()
->
format
(
'Y-m-d h:i:s'
);
$kegiatan
=
Kegiatan
::
find
(
$request
->
kegiatan
);
$konferensi
=
Konferensi
::
find
(
$request
->
konferensi
);
Registrasi
::
query
()
->
create
(
$registrasi
);
Registrasi
::
query
()
->
create
(
$registrasi
);
DB
::
commit
();
DB
::
commit
();
return
redirect
()
->
back
()
// return redirect()->back()
->
with
(
'success'
,
'Data saved successfully'
);
// ->with('success', 'Data saved successfully');
return
view
(
'invoice'
,
compact
(
'registrasi'
,
'tglRegistrasi'
,
'kegiatan'
,
'konferensi'
))
->
with
(
'success'
,
'Data saved successfully'
);
}
}
catch
(
Exception
$e
){
catch
(
Exception
$e
){
...
...
resources/views/form_registrasi.blade.php
View file @
7f9aef4d
@
extends
(
'layouts.app'
)
@
extends
(
'layouts.app'
)
@
section
(
'title'
,
'Registra
tion
'
)
@
section
(
'title'
,
'Registra
si
'
)
@
section
(
'content'
)
@
section
(
'content'
)
<
section
class
="
section
">
<
section
class
="
section
">
<div class="
section
-
header
">
<div class="
section
-
header
">
<h1>Registra
tion
</h1>
<h1>Registra
si
</h1>
<div class="
section
-
header
-
breadcrumb
">
<div class="
section
-
header
-
breadcrumb
">
</div>
</div>
</div>
</div>
...
@@ -110,21 +110,16 @@
...
@@ -110,21 +110,16 @@
<div class="
col
-
12
col
-
md
-
4
col
-
lg
-
4
">
<div class="
col
-
12
col
-
md
-
4
col
-
lg
-
4
">
<div class="
card
">
<div class="
card
">
<div class="
card
-
body
">
<div class="
card
-
body
">
<div class="
form
-
group
" @if (
$errors->has
('profil')) has-error @endif>
<div class="
form
-
group
" id = "
list
-
kegiatan
" @if (
$errors->has
('thematic_workshop')) has-error @endif>
<label>Konferensi</label>
<select class="
form
-
control
" id="
konferensi
" name="
konferensi
" required="
true
" placeholder="">
<option value="" selected>- Pilih -</option>
@foreach (
$konferensi
as
$kon
)
<option value="
{{
$kon
->
id
}}
">{{
$kon->nama
}}</option>
@endforeach
</select>
@if (
$errors->has
('konferensi'))
<label id="
login
-
error
" class="
error
" for="
konferensi
" style="
color
:
red
">
{
{$errors->first('konferensi')}
}
</label>
@endif
</div>
<div class="
form
-
group
" @if (
$errors->has
('thematic_workshop')) has-error @endif>
<label>Kegiatan</label>
<label>Kegiatan</label>
<select class="
form
-
control
" id="
kegiatan
" name="
kegiatan
" required="
true
" placeholder="
kegiatan
">
@foreach (
$kegiatan
as
$keg
)
<div class="
form
-
check
">
<input class="
form
-
check
-
input
" type="
radio
" id="
kegiatan
" name="
kegiatan
" value="
{{
$keg
->
id
}}
">
<label class="
form
-
check
-
label
" for="
{{
$keg
->
nama
}}
">{{
$keg->nama
}}</label>
</div>
@endforeach
{{-- <select class="
form
-
control
" id="
kegiatan
" name="
kegiatan
" required="
true
" placeholder="
kegiatan
">
<option value="" selected>- pilih -</option>
<option value="" selected>- pilih -</option>
@foreach (
$kegiatan
as
$keg
)
@foreach (
$kegiatan
as
$keg
)
<option value="
{{
$keg
->
id
}}
">{{
$keg->nama
}}</option>
<option value="
{{
$keg
->
id
}}
">{{
$keg->nama
}}</option>
...
@@ -132,6 +127,18 @@
...
@@ -132,6 +127,18 @@
</select>
</select>
@if (
$errors->has
('kegiatan'))
@if (
$errors->has
('kegiatan'))
<label id="
login
-
error
" class="
error
" for="
kegiatan
" style="
color
:
red
">
{
{$errors->first('kegiatan')}
}
</label>
<label id="
login
-
error
" class="
error
" for="
kegiatan
" style="
color
:
red
">
{
{$errors->first('kegiatan')}
}
</label>
@endif --}}
</div>
<div class="
form
-
group
" id="
grup
-
konferensi
" @if (
$errors->has
('profil')) has-error @endif>
<label>Konferensi</label>
<select class="
form
-
control
" id="
konferensi
" name="
konferensi
" required="
true
" placeholder="">
<option value="" selected>- Pilih -</option>
@foreach (
$konferensi
as
$kon
)
<option onchange="
cek
(
this
.
value
)
" value="
{{
$kon
->
id
}}
">{{
$kon->nama
}}</option>
@endforeach
</select>
@if (
$errors->has
('konferensi'))
<label id="
login
-
error
" class="
error
" for="
konferensi
" style="
color
:
red
">
{
{$errors->first('konferensi')}
}
</label>
@endif
@endif
</div>
</div>
</div>
</div>
...
@@ -164,3 +171,27 @@
...
@@ -164,3 +171,27 @@
</form>
</form>
</section>
</section>
@endsection
@endsection
@push('js')
<script>
function cekKegiatan(){
console.log('masuk');
if(document.getElementById('kegiatan').value == '498633a9-082c-4a4a-9dbd-e20b678ec15e'){
document.getElementById('grup-konferensi').style.display = 'none';
}
else{
document.getElementById('grup-konferensi').style.display = 'block';
}
}
function cek(var){
console.log('masuk', var);
if(document.getElementById('kegiatan').value == '498633a9-082c-4a4a-9dbd-e20b678ec15e'){
document.getElementById('grup-konferensi').style.display = 'none';
}
else{
document.getElementById('grup-konferensi').style.display = 'block';
}
}
</script>
@endpush
resources/views/invoice.blade.php
0 → 100644
View file @
7f9aef4d
@
extends
(
'layouts.app'
)
@
section
(
'title'
,
'Tabel Data'
)
@
section
(
'content'
)
<
section
class
="
section
">
<div class="
section
-
header
">
<h1>Invoice</h1>
<div class="
section
-
header
-
breadcrumb
">
<div class="
breadcrumb
-
item
"><a href="
/
">Dashboard</a></div>
<div class="
breadcrumb
-
item
"><a href="">Data Registrasi</a></div>
<div class="
breadcrumb
-
item
active
">Invoice</div>
</div>
</div>
<div class="
section
-
body
">
{{-- @foreach (
$pengajuan
as
$tr
) --}}
<div class="
invoice
">
<div class="
invoice
-
print
">
<div class="
row
">
<div class="
col
-
lg
-
12
">
<div class="
invoice
-
title
">
<h2>Invoice</h2>
<div class="
invoice
-
number
">No. Transaksi #
{
{$registrasi['kode_registrasi']}
}
</div>
</div>
<hr>
<div class="
row
">
<div class="
col
-
md
-
6
">
<address>
<strong>Identitas:</strong><br>
{
{$registrasi['nama']}
}
<br>
{
{$registrasi['alamat']}
}
<br>
{
{$registrasi['telepon']}
}
<br>
</address>
</div>
<div class="
col
-
md
-
6
text
-
md
-
right
">
<address>
<strong>Instansi:</strong><br>
{
{$registrasi['instansi']}
}
<br>
</address>
</div>
</div>
<div class="
row
">
<div class="
col
-
md
-
6
">
<address>
<strong>Metode Pembayaran:</strong><br>
Visa ending **** 4242<br>
{
{$registrasi['email']}
}
</address>
</div>
<div class="
col
-
md
-
6
text
-
md
-
right
">
<address>
<strong>Tanggal Registrasi:</strong><br>
{
{$tglRegistrasi}
}
<br><br>
</address>
</div>
</div>
</div>
</div>
<div class="
row
mt
-
4
">
<div class="
col
-
md
-
12
">
<div class="
section
-
title
">Rincian</div>
<p class="
section
-
lead
">Rincian registrasi sudah tidak bisa diubah</p>
<div class="
table
-
responsive
">
<table class="
table
table
-
striped
table
-
hover
table
-
md
">
<tr>
<th data-width="
40
">#</th>
<th>Kegiatan</th>
<th class="
text
-
center
">Harga</th>
<th class="
text
-
center
">Jumlah</th>
<th class="
text
-
right
">Total Harga</th>
</tr>
@php
$no
= 1;
$subtotal
= 0;
@endphp
{{-- @foreach (
$biaya
as
$tarif
) --}}
<tr>
<td>1</td>
<td>
{
{$kegiatan->nama}
}
<br> Konferensi : <b>
{
{$konferensi->nama}
}
</b>
</td>
<td class="
text
-
center
">Rp
{
{$kegiatan->harga}
}
</td>
<td class="
text
-
center
">1</td>
<td class="
text
-
right
">Rp
{
{$kegiatan->harga}
}
</td>
</tr>
</table>
</div>
<div class="
row
mt
-
4
">
<div class="
col
-
lg
-
8
">
<div class="
section
-
title
">Payment Method</div>
<p class="
section
-
lead
">The payment method that we provide is to make it easier for you to pay invoices.</p>
<div class="
d
-
flex
">
<div class="
mr
-
2
bg
-
visa
" data-width="
61
" data-height="
38
"></div>
<div class="
mr
-
2
bg
-
jcb
" data-width="
61
" data-height="
38
"></div>
<div class="
mr
-
2
bg
-
mastercard
" data-width="
61
" data-height="
38
"></div>
<div class="
bg
-
paypal
" data-width="
61
" data-height="
38
"></div>
</div>
</div>
<div class="
col
-
lg
-
4
text
-
right
">
<div class="
invoice
-
detail
-
item
">
<div class="
invoice
-
detail
-
name
">Subtotal</div>
<div class="
invoice
-
detail
-
value
">Rp
{
{$kegiatan->harga}
}
</div>
</div>
<hr class="
mt
-
2
mb
-
2
">
<div class="
invoice
-
detail
-
item
">
<div class="
invoice
-
detail
-
name
">Total</div>
<div class="
invoice
-
detail
-
value
invoice
-
detail
-
value
-
lg
">Rp
{
{$kegiatan->harga}
}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<hr>
<div class="
text
-
md
-
right
">
<div class="
float
-
lg
-
left
mb
-
lg
-
0
mb
-
3
">
<button class="
btn
btn
-
primary
btn
-
icon
icon
-
left
"><i class="
fas
fa
-
credit
-
card
"></i> Process Payment</button>
<button class="
btn
btn
-
danger
btn
-
icon
icon
-
left
"><i class="
fas
fa
-
times
"></i> Cancel</button>
</div>
<button class="
btn
btn
-
warning
btn
-
icon
icon
-
left
"><i class="
fas
fa
-
print
"></i> Print</button>
</div>
</div>
{{-- @endforeach --}}
</div>
</section>
@endsection
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