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
81cd1b37
Commit
81cd1b37
authored
Jul 06, 2024
by
Triyah Fatmawati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update kuitansi email
parent
c4676442
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
12 deletions
+35
-12
app/Http/Controllers/RegistrasiController.php
+11
-3
app/Models/Anggota.php
+4
-0
app/Models/KegiatanPeserta.php
+4
-0
app/Models/Registrasi.php
+5
-1
resources/views/email/selesai_pembayaran.blade.php
+11
-8
No files found.
app/Http/Controllers/RegistrasiController.php
View file @
81cd1b37
...
...
@@ -432,13 +432,20 @@ public function addFormAnggota(Request $request)
public
function
getDataRegis
(
$va
)
{
$registrasi
=
Registrasi
::
query
()
->
with
(
'pkKegiatan'
,
'pkRegistrasiPeserta.rKegiatanPeserta'
,
'pkRegistrasiPeserta.rKonferensiPeserta'
)
->
with
(
'pkKegiatan'
,
'pkRegistrasiPeserta.rKegiatanPeserta'
,
'pkRegistrasiPeserta.rKonferensiPeserta'
,
'pkAnggota'
)
->
where
(
'nomor_va'
,
$va
)
->
first
();
$jmlAnggota
=
count
(
$registrasi
->
pkAnggota
);
$konvensi
=
Kegiatan
::
query
()
->
find
(
'498633a9-082c-4a4a-9dbd-e20b678ec15e'
);
$konv
=
$konvensi
->
toArray
();
$totalHarga
=
$totalHarga
=
(
int
)
$konvensi
->
harga
;
if
(
$jmlAnggota
!=
0
){
$totalHarga
=
((
int
)
$konvensi
->
harga
)
*
$jmlAnggota
;
}
$kegPeserta
=
[];
foreach
(
$registrasi
->
pkRegistrasiPeserta
as
$item
){
...
...
@@ -449,7 +456,7 @@ public function getDataRegis($va)
$konferensi
=
$item
->
rKonferensiPeserta
;
$kegkonaspi
=
$item
->
rKegiatanPeserta
;
$totalHarga
+=
(
int
)
$konferensi
->
harga
;
//
$totalHarga += (int) $konferensi->harga;
$kegPeserta
[]
=
[
'idkon'
=>
$konferensi
->
id
,
...
...
@@ -465,6 +472,7 @@ public function getDataRegis($va)
'konaspi'
=>
$konv
,
'hargaKonferensi'
=>
$kegPeserta
,
'totalHarga'
=>
$totalHarga
,
'jmlAnggota'
=>
$jmlAnggota
];
return
$data
;
...
...
@@ -481,7 +489,7 @@ public function updatePembayaran(Request $request, $va)
try
{
$registrasi
=
Registrasi
::
query
()
->
with
(
'pkKegiatan'
,
'pkRegistrasiPeserta.rKegiatanPeserta'
,
'pkRegistrasiPeserta.rKonferensiPeserta'
)
->
with
(
'pkKegiatan'
,
'pkRegistrasiPeserta.rKegiatanPeserta'
,
'pkRegistrasiPeserta.rKonferensiPeserta'
,
'pkAnggota'
)
->
where
(
'nomor_va'
,
$va
)
->
update
([
'tanggal_bayar'
=>
Carbon
::
now
()
...
...
app/Models/Anggota.php
View file @
81cd1b37
...
...
@@ -21,4 +21,8 @@ class Anggota extends Model
'telepon'
,
'nik'
];
public
function
rRegistrasi
()
{
return
$this
->
belongsTo
(
Registrasi
::
class
,
'id_registrasi'
,
'id'
);
}
}
app/Models/KegiatanPeserta.php
View file @
81cd1b37
...
...
@@ -34,4 +34,8 @@ public function rKegiatanPeserta() {
public
function
rKonferensiPeserta
()
{
return
$this
->
belongsTo
(
Konferensi
::
class
,
'id_konferensi'
,
'id'
);
}
public
function
rAnggota
(){
return
$this
->
belongsTo
(
Anggota
::
class
,
'id_anggota'
,
'id'
);
}
}
app/Models/Registrasi.php
View file @
81cd1b37
...
...
@@ -45,6 +45,10 @@ public function pkKonferensi() {
}
public
function
pkRegistrasiPeserta
()
{
return
$this
->
hasMany
(
KegiatanPeserta
::
class
,
'id_registrasi'
,
'id'
);
return
$this
->
hasMany
(
KegiatanPeserta
::
class
,
'id_registrasi'
,
'id'
)
->
with
(
'rAnggota'
);
}
public
function
pkAnggota
(){
return
$this
->
hasMany
(
Anggota
::
class
,
'id_registrasi'
,
'id'
);
}
}
resources/views/email/selesai_pembayaran.blade.php
View file @
81cd1b37
...
...
@@ -71,18 +71,21 @@
Convention
</td>
<td class="
text
-
center
">Rp
{
{$konaspi['harga']??'param'}
}
</td>
<td class="
text
-
center
">
1
</td>
<td class="
text
-
right
">Rp
{
{$
konaspi['harga']
??'param'}
}
</td>
<td class="
text
-
center
">
{{(
$jmlAnggota
!= 0) ?
$jmlAnggota
: 1}}
</td>
<td class="
text
-
right
">Rp
{
{$
totalHarga
??'param'}
}
</td>
</tr>
@if (
isset
(
$hargaKonferensi
))
@foreach (
$
hargaKonferensi
as
$kon
)
@if (
!empty
(
$hargaKonferensi
))
@foreach (
$
registrasi->pkRegistrasiPeserta
as
$kon
)
@php
$subtotal
=
$subtotal
+
$kon['hargakon']
;
//
$subtotal
=
$subtotal
+
$kon['hargakon']
;
@endphp
<tr>
<td>
{
{$no}
}
</td>
<td>
{
{$kon['namakeg']}
}
<br> Konferensi : <b>
{
{$kon['namakon']??'param'}
}
</b>
{
{$kon->rKegiatanPeserta->nama}
}
<br> Konferensi : <b>
{
{$kon->rKonferensiPeserta->nama??'param'}
}
</b>
@isset(
$kon->rAnggota
)
<br>Anggota : <b>{{
$kon->rAnggota
->nama }}</b>
@endisset
</td>
{{-- <td class="
text
-
center
">Rp
{
{$kon['hargakon']??'param'}
}
</td> --}}
<td class="
text
-
center
">-</td>
...
...
@@ -111,13 +114,13 @@
<div class="
invoice
-
detail
-
item
">
<div class="
invoice
-
detail
-
name
">Subtotal</div>
{{-- <div class="
invoice
-
detail
-
value
">Rp
{
{$subtotal}
}
</div> --}}
<div class="
invoice
-
detail
-
value
">Rp
{
{$
initialh
arga}
}
</div>
<div class="
invoice
-
detail
-
value
">Rp
{
{$
totalH
arga}
}
</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
{
{$subtotal}
}
</div> --}}
<div class="
invoice
-
detail
-
value
invoice
-
detail
-
value
-
lg
">Rp
{
{$
initialh
arga}
}
</div>
<div class="
invoice
-
detail
-
value
invoice
-
detail
-
value
-
lg
">Rp
{
{$
totalH
arga}
}
</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