Changeset 2101227
- Timestamp:
- 06/05/2019 07:59:23 PM (7 years ago)
- Location:
- ecalypse-rental-starter/trunk
- Files:
-
- 2 edited
-
class.ecalypse-rental.php (modified) (3 diffs)
-
ecalypse-rental-starter.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ecalypse-rental-starter/trunk/class.ecalypse-rental.php
r2037009 r2101227 2141 2141 2142 2142 $overbooking = get_option('ecalypse_rental_overbooking'); 2143 $sql_having = ''; 2143 2144 if ($overbooking && $overbooking == 'no') { 2144 2145 … … 2163 2164 FROM `' . EcalypseRental::$db['fleet'] . '` f WHERE f.`id_fleet` = %d AND f.`deleted` IS NULL'; 2164 2165 //$wpdb->query('SELECT '); 2166 $sql_having = ' HAVING `rented_cars` < f.`number_vehicles` '; 2165 2167 } else { 2166 2168 $sql = 'SELECT f.*, 0 as `booked` FROM `' . EcalypseRental::$db['fleet'] . '` f WHERE f.`id_fleet` = %d AND f.`deleted` IS NULL'; 2167 2169 } 2168 2170 2169 $vehicle = $wpdb->get_row($wpdb->prepare($sql , $id_fleet));2171 $vehicle = $wpdb->get_row($wpdb->prepare($sql.$sql_having, $id_fleet)); 2170 2172 2171 2173 if (DEBUG_MODE) { … … 2177 2179 // Prices 2178 2180 if ($vehicle && ($vehicle->number_vehicles > $vehicle->booked || ($overbooking && $overbooking == 'yes'))) { 2179 2181 2180 2182 // get additional vehicles 2181 2183 $vehicle->additional_vehicles = self::get_vehicles($_GET); 2184 2182 2185 if ($vehicle->additional_vehicles && isset($vehicle->additional_vehicles['results'])) { 2183 2186 $vehicle->additional_vehicles = $vehicle->additional_vehicles['results']; 2184 2187 } 2185 2186 2188 $vehicle->prices = self::get_prices('fleet', $vehicle->id_fleet, $date_from, $date_to, $promocode, (isset($filters['el']) ? (int) $filters['el'] : false), (isset($filters['rl']) ? (int) $filters['rl'] : false), (isset($filters['dl']) ? true : false), (isset($filters['p']) ? $filters['p'] : false)); 2187 2189 // Free km -
ecalypse-rental-starter/trunk/ecalypse-rental-starter.php
r2089842 r2101227 7 7 Plugin URI: http://ecalypse.com/wordpressecalypse-rental/ 8 8 Description: Ecalypse Rental Starter enables complete rental management of cars, bikes and other equipment. 9 Version: 4.0.1 29 Version: 4.0.13 10 10 Author: Ecalypse s.r.o. 11 11 Author URI: http://ecalypse.com/ … … 74 74 } else { 75 75 76 define('ECALYPSERENTALSTARTER_VERSION', '4.0.1 2');76 define('ECALYPSERENTALSTARTER_VERSION', '4.0.13'); 77 77 define('ECALYPSERENTALSTARTER__MINIMUM_WP_VERSION', '3.9'); 78 78 define('ECALYPSERENTALSTARTER__PLUGIN_URL', plugin_dir_url(__FILE__));
Note: See TracChangeset
for help on using the changeset viewer.