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
889187cf
Commit
889187cf
authored
a year ago
by
Triyah Fatmawati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add hitung total harga
parent
c42f52f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
+9
-1
app/Http/Controllers/RegistrasiController.php
+9
-1
No files found.
app/Http/Controllers/RegistrasiController.php
View file @
889187cf
...
...
@@ -148,12 +148,15 @@ public function store(Request $request) {
$konaspi
=
json_decode
(
$request
->
konaspi
,
true
);
$hargaKonferensi
=
json_decode
(
$request
->
hargaKonferensi
,
true
);
$tglRegistrasi
=
$request
->
tglRegistrasi
;
$totalHarga
=
$request
->
totalHarga
;
// $totalHargas
= $request->totalHarga;
$registrasi
=
Registrasi
::
query
()
->
create
(
$registrasi
);
$id_registrasi
=
$registrasi
->
id
;
$jumlahKeg
=
count
(
$kegiatanpeserta
);
//inisial harga
$totalHarga
=
(
int
)
$konaspi
[
'harga'
];
foreach
(
$kegiatanpeserta
as
$keg
){
$kegpeserta
=
[
'id_registrasi'
=>
$id_registrasi
,
...
...
@@ -161,6 +164,11 @@ public function store(Request $request) {
'id_konferensi'
=>
$keg
[
'id_konferensi'
],
];
KegiatanPeserta
::
query
()
->
create
(
$kegpeserta
);
if
(
$keg
[
'id_kegiatan'
]
!=
'498633a9-082c-4a4a-9dbd-e20b678ec15e'
){
$konferensi
=
Konferensi
::
query
()
->
where
(
'id'
,
$keg
[
'id_konferensi'
])
->
first
();
$totalHarga
+=
(
int
)
$konferensi
->
harga
;
}
}
$multipartData
=
[
...
...
This diff is collapsed.
Click to expand it.
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