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
de32596c
Commit
de32596c
authored
Jun 14, 2017
by
Palti Sinaga
Browse files
Options
Browse Files
Download
Plain Diff
asdasd
parents
75fac108
ffc0f29f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
66 additions
and
37 deletions
+66
-37
AdminController.php
app/Http/Controllers/AdminController.php
+34
-28
GuestController.php
app/Http/Controllers/GuestController.php
+16
-3
ListBook.php
app/ListBook.php
+1
-1
Transaksi.php
app/Transaksi.php
+1
-1
detailreqFasilitas.blade.php
...endor/adminlte/layouts/admin/detailreqFasilitas.blade.php
+2
-2
rincianpemesanan.blade.php
...dor/adminlte/layouts/customers/rincianpemesanan.blade.php
+12
-2
No files found.
app/Http/Controllers/AdminController.php
View file @
de32596c
...
...
@@ -73,46 +73,52 @@ class AdminController extends Controller
$dataHomestay
=
Homestay
::
where
(
'nama_homestay'
,
$request
[
'nama_homestay'
])
->
get
();
//dd($dataHomestay[0]->id);
//$dataBok = DB::table('daftar_book')
// ->where('da');
$asd
=
Transaksi
::
all
()
->
where
(
'status'
,
1
);
// $asd = Transaksi::all()->where('status',1);
//dd($asd);
//dd($request['bulan']);
$data
=
DB
::
table
(
'daftar_book'
)
if
(
$request
[
'bulang'
]
==
null
){
$dataHos
=
DB
::
table
(
'daftar_book'
)
->
join
(
'transaksi'
,
'daftar_book.id_transaksi'
,
'='
,
'transaksi.id'
)
->
join
(
'homestay'
,
'daftar_book.homestay'
,
'='
,
'homestay.id'
)
->
where
(
'daftar_book.homestay'
,
'='
,
$dataHomestay
[
0
]
->
id
)
->
select
(
'homestay.nama_homestay'
,
'homestay.owner'
,
'transaksi.total_pembayaran'
,
'transaksi.jumlah_kamar'
,
'daftar_book.*'
)
->
get
();
return
view
(
'adminlte::layouts.admin.resultlistpesanan'
)
->
with
(
'data'
,
$dataHos
);
}
else
{
$data
=
DB
::
table
(
'daftar_book'
)
->
join
(
'transaksi'
,
'daftar_book.id_transaksi'
,
'='
,
'transaksi.id'
)
->
join
(
'homestay'
,
'daftar_book.homestay'
,
'='
,
'homestay.id'
)
//->join('pelanggan','transaksi.id_pelanggan','=','pelanggan.id')
->
where
(
'daftar_book.homestay'
,
'='
,
$dataHomestay
[
0
]
->
id
)
->
whereMonth
(
'daftar_book.tanggal_mulai'
,
'='
,
$request
[
'bulan'
])
//->where('transaksi.status','=',1)
->
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
){
$penghasilan
+=
$a
->
total_pembayaran
;
//$i++;
}
$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
();
foreach
(
$data2
as
$b
){
$biaya
=
(
$b
->
jumlah_kamar
*
150000
)
*
$b
->
lama_menginap
;
$penghasilan
+=
$biaya
;
}
//$i=0;
$penghasilan
=
0
;
foreach
(
$data
as
$a
){
$penghasilan
+=
$a
->
total_pembayaran
;
//$i++;
}
foreach
(
$data2
as
$b
){
$biaya
=
(
$b
->
jumlah_kamar
*
150000
)
*
$b
->
lama_menginap
;
$penghasilan
+=
$biaya
;
}
// dd($data,$data2,$penghasilan);
// dd($data,$data2,$penghasilan);
// dd('masuk',$request['bulan'],$request['nama_homestay'],$data);
return
view
(
'adminlte::layouts.admin.resultlistpesanan'
)
->
with
(
'data'
,
$data
);
}
// dd('masuk',$request['bulan'],$request['nama_homestay'],$data);
return
view
(
'adminlte::layouts.admin.resultlistpesanan'
)
->
with
(
'data'
,
$data
);
}
...
...
app/Http/Controllers/GuestController.php
View file @
de32596c
...
...
@@ -53,8 +53,13 @@ class GuestController extends Controller
$trans
->
jumlah_kamar
=
$request
[
'jumlah_kamar'
];
$trans
->
jumlah_tamu
=
$request
[
'jumlah_tamu'
];
$trans
->
lama_menginap
=
$request
[
'lama_menginap'
];
if
(
$request
[
'extrabed'
]
==
null
){
$trans
->
extrabed
=
0
;
}
else
{
$trans
->
extrabed
=
$request
[
'extrabed'
];
}
$trans
->
permintaan_khusus
=
$request
[
'permintaan_khusus'
];
$trans
->
total_pembayaran
=
$request
[
'total_harga'
];
$trans
->
total_pembayaran
=
$request
[
'total_harga'
]
+
(
$request
[
'extrabed'
]
*
30000
)
;
$trans
->
status
=
0
;
$trans
->
save
();
...
...
@@ -63,7 +68,10 @@ class GuestController extends Controller
->
select
(
'transaksi.id'
)
->
where
(
'transaksi.tanggal_mulai'
,
'='
,
$request
[
'tanggal_mulai'
])
->
where
(
'transaksi.tanggal_berakhir'
,
'='
,
$request
[
'tanggal_selesai'
])
->
where
(
'transaksi.total_pembayaran'
,
'='
,
$request
[
'total_harga'
])
->
where
(
'transaksi.total_pembayaran'
,
'='
,
$request
[
'total_harga'
]
+
+
(
$request
[
'extrabed'
]
*
30000
))
->
where
(
'transaksi.jumlah_kamar'
,
'='
,
$request
[
'jumlah_kamar'
])
->
where
(
'transaksi.jumlah_tamu'
,
'='
,
$request
[
'jumlah_tamu'
])
->
where
(
'transaksi.lama_menginap'
,
'='
,
$request
[
'lama_menginap'
])
->
get
();
//dd($dataTrans);
...
...
@@ -73,7 +81,12 @@ class GuestController extends Controller
$lb
->
homestay
=
$request
[
'id_homestay'
];
$lb
->
id_transaksi
=
$dataTrans
[
0
]
->
id
;
$lb
->
nama_pemesan
=
$request
[
'nama'
];
$lb
->
total_harga
=
$request
[
'total_harga'
];
if
(
$request
[
'extrabed'
]
==
null
){
$lb
->
extrabed
=
0
;
}
else
{
$lb
->
extrabed
=
$request
[
'extrabed'
];
}
$lb
->
total_harga
=
$request
[
'total_harga'
]
+
(
$request
[
'extrabed'
]
*
30000
);
$lb
->
permintaan_khusus
=
$request
[
'permintaan_khusus'
];
$lb
->
jumlah_kamar
=
$request
[
'jumlah_kamar'
];
$lb
->
jumlah_tamu
=
$request
[
'jumlah_tamu'
];
...
...
app/ListBook.php
View file @
de32596c
...
...
@@ -9,7 +9,7 @@ class ListBook extends Model
protected
$table
=
"daftar_book"
;
protected
$fillable
=
[
'jumlah_tamu'
,
'total_harga'
,
'permintaan_khusus'
,
'nama_pemesan'
,
'tanggal_mulai'
,
'tanggal_berakhir'
,
'homestay'
,
'jumlah_kamar'
'
extrabed'
,
'
jumlah_tamu'
,
'total_harga'
,
'permintaan_khusus'
,
'nama_pemesan'
,
'tanggal_mulai'
,
'tanggal_berakhir'
,
'homestay'
,
'jumlah_kamar'
];
public
$timestamps
=
false
;
...
...
app/Transaksi.php
View file @
de32596c
...
...
@@ -9,7 +9,7 @@ class Transaksi extends Model
protected
$table
=
"transaksi"
;
protected
$fillable
=
[
'tanggal_konfirmasi'
,
'jumlah_tamu'
,
'permintaan_khusus'
,
'id_pelanggan'
,
'tanggal_mulai'
,
'tanggal_berakhir'
,
'lama_menginap'
,
'total_pembayaran'
,
'tanggal_konfirmasi'
,
'status'
,
'
extrabed'
,
'
tanggal_konfirmasi'
,
'jumlah_tamu'
,
'permintaan_khusus'
,
'id_pelanggan'
,
'tanggal_mulai'
,
'tanggal_berakhir'
,
'lama_menginap'
,
'total_pembayaran'
,
'tanggal_konfirmasi'
,
'status'
,
];
public
$timestamps
=
false
;
...
...
resources/views/vendor/adminlte/layouts/admin/detailreqFasilitas.blade.php
View file @
de32596c
...
...
@@ -95,8 +95,8 @@
<button type="
submit
" class="
btn
btn
-
info
"><i class="
fa
fa
-
check
"> Terima</i></button>
</form>
<!--
{
{url('requestFasilitass/'.$data->id)}
}
-->
<form action="" method="
post
" style="
display
:
inline
">
<!-- -->
<form action="
{{
url
(
'requestFasilitass/'
.
$data
->
id
)}}
" method="
post
" style="
display
:
inline
">
{
{csrf_field()}
}
<input type="
hidden
" name="
_method
" value="
PUT
">
<button type="
submit
" class="
btn
btn
-
danger
" data-toggle="
modal
" data-target="
#confirmDelete"
...
...
resources/views/vendor/adminlte/layouts/customers/rincianpemesanan.blade.php
View file @
de32596c
...
...
@@ -26,7 +26,9 @@
<label>Alamat Email Kontak</label>
<input type="
text
" name="
kontak_email
" class="
form
-
control
" id="
inputEmail3
" value="
{{
Auth
::
user
()
->
email
}}
">
</div>
</div>
</div>
<div class="
form
-
group
">
<div class="
col
-
sm
-
10
">
...
...
@@ -34,6 +36,14 @@
<textarea name="
permintaan_khusus
" style="
border
:
#cccccc 1px solid;border-radius: 5px; min-height:150px;"></textarea>
</
div
>
</
div
>
<
div
class
="
form
-
group
">
<div class="
col
-
sm
-
10
">
<label>ExtraBed</label>
<input type="
number
" min="
0
" name="
extrabed
" class="
form
-
control
" id="
inputEmail3
" >
</div>
</div>
<input type="
hidden
" value="
{{
$dataUser
->
no_telepon
}}
" name="
id_user
">
<input type="
hidden
" value="
{{
$request
->
lama_menginap
}}
" name="
lama_menginap
">
<input type="
hidden
" value="
{{
$request
->
tanggal_mulai
}}
" name="
tanggal_mulai
">
...
...
@@ -106,7 +116,7 @@
<
tr
>
<
td
>
Total
Bayar
</
td
>
<
td
>:</
td
>
<
td
>
{{
$totalHarga
}}
</
td
>
<
td
>
<
input
type
=
"text"
name
=
"total_harga"
value
=
"
{
{$totalHarga}
}
"
disabled
>
</
td
>
</
tr
>
</
table
>
<
br
>
...
...
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