Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pa2d4ti06
Project
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Juliper
pa2d4ti06
Commits
196e320d
Commit
196e320d
authored
Jun 15, 2017
by
Palti Sinaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
report
parent
8cd8ed9e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
34 deletions
+47
-34
OwnerController.php
app/Http/Controllers/OwnerController.php
+3
-3
reportOwner.blade.php
resources/views/pdf/reportOwner.blade.php
+44
-31
No files found.
app/Http/Controllers/OwnerController.php
View file @
196e320d
...
@@ -52,9 +52,9 @@ class OwnerController extends Controller
...
@@ -52,9 +52,9 @@ class OwnerController extends Controller
$dataHomestay
=
DB
::
table
(
'homestay'
)
$dataHomestay
=
DB
::
table
(
'homestay'
)
->
join
(
'pemilikhomestay'
,
'homestay.id_pemilik'
,
'='
,
'pemilikhomestay.id'
)
->
join
(
'pemilikhomestay'
,
'homestay.id_pemilik'
,
'='
,
'pemilikhomestay.id'
)
->
where
(
'pemilikhomestay.id_akun'
,
'='
,
Auth
::
user
()
->
id
)
->
where
(
'pemilikhomestay.id_akun'
,
'='
,
Auth
::
user
()
->
id
)
->
select
(
'homestay.id'
)
->
select
(
'homestay.id'
,
'homestay.nama_homestay'
)
->
get
();
->
get
();
//dd($dataHomestay[0]->nama_homestay);
$dataPesanan
=
DB
::
table
(
'daftar_book'
)
$dataPesanan
=
DB
::
table
(
'daftar_book'
)
->
where
(
'daftar_book.homestay'
,
'='
,
$dataHomestay
[
0
]
->
id
)
->
where
(
'daftar_book.homestay'
,
'='
,
$dataHomestay
[
0
]
->
id
)
->
whereMonth
(
'daftar_book.tanggal_mulai'
,
'='
,
$request
[
'bulan'
])
->
whereMonth
(
'daftar_book.tanggal_mulai'
,
'='
,
$request
[
'bulan'
])
...
@@ -69,7 +69,7 @@ class OwnerController extends Controller
...
@@ -69,7 +69,7 @@ class OwnerController extends Controller
//dd($jumlah_tamu);
//dd($jumlah_tamu);
$pdf
=
PDF
::
loadView
(
'pdf.reportOwner'
,[
'data'
=>
$dataPesanan
],[
'tamu'
=>
$jumlah_tamu
,
'penghasilan'
=>
$penghasilan
]);
$pdf
=
PDF
::
loadView
(
'pdf.reportOwner'
,[
'data'
=>
$dataPesanan
],[
'tamu'
=>
$jumlah_tamu
,
'penghasilan'
=>
$penghasilan
,
'bulan'
=>
$request
[
'bulan'
],
'namaHomestay'
=>
$dataHomestay
[
0
]
->
nama_homestay
]);
return
$pdf
->
stream
(
'reportOwner.pdf'
);
return
$pdf
->
stream
(
'reportOwner.pdf'
);
}
}
...
...
resources/views/pdf/reportOwner.blade.php
View file @
196e320d
...
@@ -9,44 +9,57 @@
...
@@ -9,44 +9,57 @@
<p
style=
"float:right;"
><b>
Tanggal :
</b>
<?php
echo
date
(
"Y/m/d"
)
;
?>
</p>
<p
style=
"float:right;"
><b>
Tanggal :
</b>
<?php
echo
date
(
"Y/m/d"
)
;
?>
</p>
<br><br><br>
<br><br><br>
<center>
<h1>
Laporan di Bulan {{$bulan}}
</h1></center>
<center>
{{$namaHomestay}}
</center>
@foreach($data as $a)
<table
class=
"table table-user-information"
>
<table
class=
"table"
>
<tr>
<td></td>
<td>
Nama Pemesan
</td>
<td>
Jumlah Kamar
</td>
<td>
Jumlah Tamu
</td>
<td>
Lama Menginap
</td>
<td>
Extrabed
</td>
<td>
Tanggal Mulai
</td>
<td>
Tanggal Berakhir
</td>
<td>
Total Harga
</td>
</tr>
@foreach($data as $a)
<tr>
<tr>
<td></td>
<th>
Nama Pemesan
</th>
<td>
:
</td>
<td>
{{$a->nama_pemesan}}
</td>
<td>
{{$a->nama_pemesan}}
</td>
<td>
{{$a->jumlah_kamar}}
</td>
</tr>
<td>
{{$a->jumlah_tamu}}
</td>
<tr>
<td>
{{$a->lama_menginap}}
</td>
<th>
Jumlah Kamar
</th>
<td>
{{$a->extrabed}}
</td>
<td>
:
</td>
<td>
{{$a->jumlah_kamar}} kamar
</td>
</tr>
<tr>
<th>
Jumlah Tamu
</th>
<td>
:
</td>
<td>
{{$a->jumlah_tamu}} orang
</td>
</tr>
<tr>
<th>
Lama Menginap
</th>
<td>
:
</td>
<td>
{{$a->lama_menginap}} Malam
</td>
</tr>
<tr>
<th>
Extra-bed
</th>
<td>
:
</td>
<td>
{{$a->extrabed}} buah
</td>
</tr>
<tr>
<th>
Tanggal Check-in
</th>
<td>
:
</td>
<td>
{{$a->tanggal_mulai}}
</td>
<td>
{{$a->tanggal_mulai}}
</td>
<td>
{{$a->tanggal_berakhir}}
</td>
<td>
{{$a->total_harga}}
</td>
</tr>
</tr>
@endforeach
<tr>
<tr>
<th>
Tanggal Check-out
</th>
<td>
Total
</td>
<td>
:
</td>
<td></td>
<td>
{{$a->tanggal_berakhir}}
</td>
<td></td>
<td>
{{$tamu}}
</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>
{{$penghasilan}}
</td>
</tr>
</tr>
<tr>
<th>
Total Pembayaran
</th>
<td>
:
</td>
<td>
{{$a->total_harga}}
</td>
</tr>
<br><br>
</table>
</table>
@endforeach
<h3>
Total Tamu :
</h3>
{{$tamu}}
<h3>
Total Penghasilan :
</h3>
{{$penghasilan}}
</body>
</body>
</html>
</html>
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