FIX Bad filter on date on salary list
This commit is contained in:
parent
dd38f6c35b
commit
8ad310c8a0
@ -260,12 +260,19 @@ if ($search_user) {
|
||||
if ($search_label) {
|
||||
$sql .= natural_search(array('s.label'), $search_label);
|
||||
}
|
||||
if (!empty($search_date_start_from) && !empty($search_date_start_to)) {
|
||||
$sql .= " AND s.datesp BETWEEN '".$db->idate($search_date_start_from)."' AND '".$db->idate($search_date_start_to)."'";
|
||||
if (!empty($search_date_start_from)) {
|
||||
$sql .= " AND s.datesp >= '".$db->idate($search_date_start_from)."'";
|
||||
}
|
||||
if (!empty($search_date_end_from) && !empty($search_date_end_to)) {
|
||||
$sql .= " AND s.dateep BETWEEN '".$db->idate($search_date_end_from)."' AND '".$db->idate($search_date_end_to)."'";
|
||||
if (!empty($search_date_end_from)) {
|
||||
$sql .= " AND s.dateep >= '".$db->idate($search_date_end_from)."'";
|
||||
}
|
||||
if (!empty($search_date_start_to)) {
|
||||
$sql .= " AND s.datesp <= '".$db->idate($search_date_start_to)."'";
|
||||
}
|
||||
if (!empty($search_date_end_to)) {
|
||||
$sql .= " AND s.dateep <= '".$db->idate($search_date_end_to)."'";
|
||||
}
|
||||
|
||||
if ($search_amount) {
|
||||
$sql .= natural_search("s.amount", $search_amount, 1);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user