<?php
//inventories Data
$custominvent = mysqli_query($conn, "SELECT * FROM inventory WHERE inve_deleted = '0' ");
$custominventtotal = mysqli_num_rows($custominvent);
//Cities Data
$customcity = mysqli_query($conn, "SELECT * FROM cities WHERE city_deleted = 0 ");
$customcitytotal = mysqli_num_rows($customcity);
//Hotel Data
$customhotel = mysqli_query($conn, "SELECT * FROM hotels WHERE deleted = 0 $queryadd ");
$customhoteltotal = mysqli_num_rows($customhotel);
//Bookings Data
$custombooking = mysqli_query($conn, "SELECT * FROM booking_master WHERE deleted = '0' $queryadd ");
$custombookingtotal = mysqli_num_rows($custombooking);
//Reviews Data
$customreview = mysqli_query($conn, "SELECT * FROM reviews WHERE deleted = '0' $queryaddreview ");
$customreviewtotal = mysqli_num_rows($customreview);
//Lastest checkins
$customcheckins = mysqli_query($conn, "SELECT * FROM booking_master WHERE check_in_date >= '$todaybooking' $queryadd ORDER BY check_in_date  LIMIT 8");
$customcheckinstotal = mysqli_num_rows($customcheckins);
//Lastest checkouts
$customcheckouts = mysqli_query($conn, "SELECT * FROM booking_master WHERE check_out_date >= '$todaybooking' $queryadd ORDER BY check_out_date LIMIT 8");
$customcheckoutstotal = mysqli_num_rows($customcheckouts);
//sales
$customsalestoday = mysqli_query($conn, "SELECT IFNULL(SUM(precio_total),0.00) AS totalhoy FROM transactions WHERE created > '$datetimebooking' $queryadd ");
$customsalestotal = mysqli_num_rows($customsalestoday);
$customsalestodayData = mysqli_fetch_array($customsalestoday);
$customsalesmonth = mysqli_query($conn, "SELECT IFNULL(SUM(precio_total),0.00) AS totalhoy FROM transactions WHERE created > '$datemonthbooking' $queryadd ");
$customsalesmonthtotal = mysqli_num_rows($customsalesmonth);
$customsalesmonthData = mysqli_fetch_array($customsalesmonth);
$customsalesyear = mysqli_query($conn, "SELECT IFNULL(SUM(precio_total),0.00) AS totalhoy FROM transactions WHERE created > '$dateyearbooking' $queryadd ");
$customsalesyeartotal = mysqli_num_rows($customsalesyear);
$customsalesyearData = mysqli_fetch_array($customsalesyear);
?>
