Commit 9174037e by Palti Sinaga

H-1 lagi1

parents b5a915ec 7bb7ca8f
......@@ -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('');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment