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
4ca66c00
Commit
4ca66c00
authored
Jun 14, 2017
by
Juliper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
eb6c3919
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
AdminController.php
app/Http/Controllers/AdminController.php
+12
-1
No files found.
app/Http/Controllers/AdminController.php
View file @
4ca66c00
...
@@ -44,6 +44,12 @@ class AdminController extends Controller
...
@@ -44,6 +44,12 @@ class AdminController extends Controller
->
select
(
'homestay.nama_homestay'
,
'homestay.owner'
,
'pelanggan.nama'
,
'transaksi.total_pembayaran'
,
'transaksi.jumlah_kamar'
,
'daftar_book.*'
)
->
select
(
'homestay.nama_homestay'
,
'homestay.owner'
,
'pelanggan.nama'
,
'transaksi.total_pembayaran'
,
'transaksi.jumlah_kamar'
,
'daftar_book.*'
)
->
get
();
->
get
();
$data2
=
DB
::
table
(
'daftar_book'
)
->
where
(
'daftar_book.homestay'
,
'='
,
$dataHomestay
[
0
]
->
id
)
->
where
(
'daftar_book.id_transaksi'
,
'='
,
null
)
->
whereMonth
(
'daftar_book.tanggal_mulai'
,
'='
,
$request
[
'bulan'
])
->
get
();
//$i=0;
//$i=0;
$penghasilan
=
0
;
$penghasilan
=
0
;
foreach
(
$data
as
$a
){
foreach
(
$data
as
$a
){
...
@@ -51,7 +57,12 @@ class AdminController extends Controller
...
@@ -51,7 +57,12 @@ class AdminController extends Controller
//$i++;
//$i++;
}
}
dd
(
$data
,
$penghasilan
);
foreach
(
$data2
as
$b
){
$biaya
=
(
$b
->
jumlah_kamar
*
150000
)
*
$b
->
lama_menginap
;
$penghasilan
+=
$biaya
;
}
dd
(
$data
,
$data2
,
$penghasilan
);
dd
(
'masuk'
,
$request
[
'bulan'
],
$request
[
'nama_homestay'
],
$data
);
dd
(
'masuk'
,
$request
[
'bulan'
],
$request
[
'nama_homestay'
],
$data
);
return
view
(
''
);
return
view
(
''
);
...
...
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