Merge pull request #815 from abhishek-webkul/gli-1381

Updated: Added Rooms filter and added suggestions for Hotel and Room type filter inputs on admin orders list page
This commit is contained in:
Rohit Jain
2024-03-15 12:27:01 +05:30
committed by GitHub
7 changed files with 383 additions and 44 deletions

View File

@@ -941,7 +941,7 @@ class AdminControllerCore extends Controller
if (!Validate::isDate($value[1])) {
$this->errors[] = Tools::displayError('The \'To\' date format is invalid (YYYY-MM-DD)');
} elseif (isset($value[0]) && !empty($value[0]) && strtotime($value[0]) > strtotime($value[1])) {
$this->errors[] = Tools::displayError('The \'To\' date cannot be before than from date');
$this->errors[] = Tools::displayError('The \'To\' date cannot be earlier than \'From\' date');
} else {
$sql_filter .= ' AND '.pSQL($key).' <= \''.pSQL(Tools::dateTo($value[1])).'\'';
}