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
9174037e
Commit
9174037e
authored
Jun 14, 2017
by
Palti Sinaga
Browse files
Options
Browse Files
Download
Plain Diff
H-1 lagi1
parents
b5a915ec
7bb7ca8f
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 @
9174037e
...
...
@@ -86,6 +86,12 @@ class AdminController extends Controller
->
select
(
'homestay.nama_homestay'
,
'homestay.owner'
,
'transaksi.total_pembayaran'
,
'transaksi.jumlah_kamar'
,
'daftar_book.*'
)
->
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;
$penghasilan
=
0
;
foreach
(
$data
as
$a
){
...
...
@@ -93,7 +99,12 @@ class AdminController extends Controller
//$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
);
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