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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
39 deletions
+52
-39
OwnerController.php
app/Http/Controllers/OwnerController.php
+3
-3
reportOwner.blade.php
resources/views/pdf/reportOwner.blade.php
+49
-36
No files found.
app/Http/Controllers/OwnerController.php
View file @
196e320d
...
...
@@ -52,9 +52,9 @@ class OwnerController extends Controller
$dataHomestay
=
DB
::
table
(
'homestay'
)
->
join
(
'pemilikhomestay'
,
'homestay.id_pemilik'
,
'='
,
'pemilikhomestay.id'
)
->
where
(
'pemilikhomestay.id_akun'
,
'='
,
Auth
::
user
()
->
id
)
->
select
(
'homestay.id'
)
->
select
(
'homestay.id'
,
'homestay.nama_homestay'
)
->
get
();
//dd($dataHomestay[0]->nama_homestay);
$dataPesanan
=
DB
::
table
(
'daftar_book'
)
->
where
(
'daftar_book.homestay'
,
'='
,
$dataHomestay
[
0
]
->
id
)
->
whereMonth
(
'daftar_book.tanggal_mulai'
,
'='
,
$request
[
'bulan'
])
...
...
@@ -69,7 +69,7 @@ class OwnerController extends Controller
//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'
);
}
...
...
resources/views/pdf/reportOwner.blade.php
View file @
196e320d
...
...
@@ -9,44 +9,57 @@
<p
style=
"float:right;"
><b>
Tanggal :
</b>
<?php
echo
date
(
"Y/m/d"
)
;
?>
</p>
<br><br><br>
<center>
<h1>
Laporan di Bulan {{$bulan}}
</h1></center>
<center>
{{$namaHomestay}}
</center>
@foreach($data as $a)
<table
class=
"table table-user-information"
>
<tr>
<th>
Nama Pemesan
</th>
<td>
:
</td>
<td>
{{$a->nama_pemesan}}
</td>
</tr>
<tr>
<th>
Jumlah Kamar
</th>
<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>
</tr>
<tr>
<th>
Tanggal Check-out
</th>
<td>
:
</td>
<td>
{{$a->tanggal_berakhir}}
</td>
</tr>
<tr>
<th>
Total Pembayaran
</th>
<td>
:
</td>
<td>
{{$a->total_harga}}
</td>
</tr>
<br><br>
<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>
<td></td>
<td>
{{$a->nama_pemesan}}
</td>
<td>
{{$a->jumlah_kamar}}
</td>
<td>
{{$a->jumlah_tamu}}
</td>
<td>
{{$a->lama_menginap}}
</td>
<td>
{{$a->extrabed}}
</td>
<td>
{{$a->tanggal_mulai}}
</td>
<td>
{{$a->tanggal_berakhir}}
</td>
<td>
{{$a->total_harga}}
</td>
</tr>
@endforeach
<tr>
<td>
Total
</td>
<td></td>
<td></td>
<td>
{{$tamu}}
</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>
{{$penghasilan}}
</td>
</tr>
</table>
@endforeach
<h3>
Total Tamu :
</h3>
{{$tamu}}
<h3>
Total Penghasilan :
</h3>
{{$penghasilan}}
</body>
</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