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
e5736e04
Commit
e5736e04
authored
Mar 19, 2024
by
Triyah Fatmawati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ubah dari request jadi get data DB
parent
c72cba66
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
11 deletions
+21
-11
app/Http/Controllers/RegistrasiController.php
+17
-7
resources/views/invoice.blade.php
+4
-4
No files found.
app/Http/Controllers/RegistrasiController.php
View file @
e5736e04
...
@@ -155,7 +155,9 @@ public function store(Request $request) {
...
@@ -155,7 +155,9 @@ public function store(Request $request) {
$jumlahKeg
=
count
(
$kegiatanpeserta
);
$jumlahKeg
=
count
(
$kegiatanpeserta
);
//inisial harga
//inisial harga
$totalHarga
=
(
int
)
$konaspi
[
'harga'
];
$konvensi
=
Kegiatan
::
find
(
$konaspi
[
'id'
]);
$konv
=
$konvensi
->
toArray
();
$totalHarga
=
(
int
)
$konvensi
->
harga
;
foreach
(
$kegiatanpeserta
as
$keg
){
foreach
(
$kegiatanpeserta
as
$keg
){
$kegpeserta
=
[
$kegpeserta
=
[
...
@@ -167,7 +169,18 @@ public function store(Request $request) {
...
@@ -167,7 +169,18 @@ public function store(Request $request) {
if
(
$keg
[
'id_kegiatan'
]
!=
'498633a9-082c-4a4a-9dbd-e20b678ec15e'
){
if
(
$keg
[
'id_kegiatan'
]
!=
'498633a9-082c-4a4a-9dbd-e20b678ec15e'
){
$konferensi
=
Konferensi
::
query
()
->
where
(
'id'
,
$keg
[
'id_konferensi'
])
->
first
();
$konferensi
=
Konferensi
::
query
()
->
where
(
'id'
,
$keg
[
'id_konferensi'
])
->
first
();
$kegkonaspi
=
Kegiatan
::
find
(
$keg
[
'id_kegiatan'
]);
$totalHarga
+=
(
int
)
$konferensi
->
harga
;
$totalHarga
+=
(
int
)
$konferensi
->
harga
;
$kegPeserta
[]
=
[
'idkon'
=>
$konferensi
->
id
,
'namakon'
=>
$konferensi
->
nama
,
'hargakon'
=>
$konferensi
->
harga
,
'namakeg'
=>
$kegkonaspi
->
nama
];
}
else
{
$kegPeserta
=
null
;
}
}
}
}
...
@@ -197,15 +210,12 @@ public function store(Request $request) {
...
@@ -197,15 +210,12 @@ public function store(Request $request) {
DB
::
commit
();
DB
::
commit
();
// return redirect()->route('user.create')->with('success', 'Data saved successfully');
$data
=
[
$data
=
[
'registrasi'
=>
$registrasi
,
'registrasi'
=>
$registrasi
,
'kegiatanpeserta'
=>
$kegiatanpeserta
,
'tglRegistrasi'
=>
$tglRegistrasi
,
'tglRegistrasi'
=>
$tglRegistrasi
,
'konaspi'
=>
$kon
aspi
,
'konaspi'
=>
$kon
v
,
'hargaKonferensi'
=>
$
hargaKonferensi
,
'hargaKonferensi'
=>
$
kegPeserta
,
'totalHarga'
=>
$totalHarga
'totalHarga'
=>
$totalHarga
,
];
];
SendMail
::
dispatch
(
$data
,
'email.invoice'
,
$data
[
'registrasi'
]
->
email
,
'registrasi'
,
'email_regis_sent_at'
);
SendMail
::
dispatch
(
$data
,
'email.invoice'
,
$data
[
'registrasi'
]
->
email
,
'registrasi'
,
'email_regis_sent_at'
);
...
...
resources/views/invoice.blade.php
View file @
e5736e04
...
@@ -139,15 +139,15 @@
...
@@ -139,15 +139,15 @@
<button class="
btn
btn
-
danger
btn
-
icon
icon
-
left
"><i class="
fas
fa
-
times
"></i> Cancel</button>
<button class="
btn
btn
-
danger
btn
-
icon
icon
-
left
"><i class="
fas
fa
-
times
"></i> Cancel</button>
</div> --}}
</div> --}}
{{-- <button class="
btn
btn
-
warning
btn
-
icon
icon
-
left
"><i class="
fas
fa
-
print
"></i> Cetak</button> --}}
{{-- <button class="
btn
btn
-
warning
btn
-
icon
icon
-
left
"><i class="
fas
fa
-
print
"></i> Cetak</button> --}}
<input type="
hidden
" id="
registrasi
" name="
registrasi
" value="
{{
json_encode
(
$registrasi
)
}}
">
{{--
<input type="
hidden
" id="
registrasi
" name="
registrasi
" value="
{{
json_encode
(
$registrasi
)
}}
">
<input type="
hidden
" id="
kegiatanpeserta
" name="
kegiatanpeserta
" value="
{{
json_encode
(
$kegiatanpeserta
)
}}
">
<input type="
hidden
" id="
kegiatanpeserta
" name="
kegiatanpeserta
" value="
{{
json_encode
(
$kegiatanpeserta
)
}}
">
<input type="
hidden
" id="
tglRegistrasi
" name="
tglRegistrasi
" value="
{{
json_encode
(
$tglRegistrasi
)
}}
">
<input type="
hidden
" id="
tglRegistrasi
" name="
tglRegistrasi
" value="
{{
json_encode
(
$tglRegistrasi
)
}}
">
<input type="
hidden
" id="
konaspi
" name="
konaspi
" value="
{{
json_encode
(
$konaspi
)
}}
">
<input type="
hidden
" id="
konaspi
" name="
konaspi
" value="
{{
json_encode
(
$konaspi
)
}}
">
<input type="
hidden
" id="
hargaKonferensi
" name="
hargaKonferensi
" value="
{{
json_encode
(
$hargaKonferensi
)
}}
">
<input type="
hidden
" id="
hargaKonferensi
" name="
hargaKonferensi
" value="
{{
json_encode
(
$hargaKonferensi
)
}}
">
<input type="
hidden
" id="
totalHarga
" name="
totalHarga
" value="
{{
json_encode
(
$totalHarga
)
}}
">
<input type="
hidden
" id="
totalHarga
" name="
totalHarga
" value="
{{
json_encode
(
$totalHarga
)
}}
">
--}}
{{-- <button type="
submit
" class="
btn
btn
-
primary
btn
-
icon
icon
-
left
"><i class="
fas
fa
-
credit
-
card
"></i> Bayar</button> --}}
{{-- <button type="
submit
" class="
btn
btn
-
primary
btn
-
icon
icon
-
left
"><i class="
fas
fa
-
credit
-
card
"></i> Bayar</button> --}}
<a href="
{{
route
(
'user.create'
)}}
" class="
btn
btn
-
primary
btn
-
icon
icon
-
left
"><i class="
fas
fa
-
credit
-
card
"></i> Bayar</a>
{{-- <a href="
{{
route
(
'user.create'
)}}
" class="
btn
btn
-
primary
btn
-
icon
icon
-
left
"><i class="
fas
fa
-
credit
-
card
"></i> Bayar</a> --}}
<button class="
btn
btn
-
danger
btn
-
icon
icon
-
left
"><i class="
fas
fa
-
times
"></i> C
ancel
</button>
<button class="
btn
btn
-
danger
btn
-
icon
icon
-
left
"><i class="
fas
fa
-
times
"></i> C
lose
</button>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
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