Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #3592 - AOR Report- Date parameter doesn't work with any value of type 'Period' #3612

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions modules/AOR_Reports/AOR_Report.php
Expand Up @@ -1560,17 +1560,17 @@ function build_report_query_where($query = array())
$params = base64_decode($condition->value);
}
$date = getPeriodEndDate($params)->format('Y-m-d H:i:s');
$value = '"' . getPeriodDate($params)->format('Y-m-d H:i:s') . '"';
$value = "'" . getPeriodDate($params)->format('Y-m-d H:i:s') . "'";

$query['where'][] = ($tiltLogicOp ? '' : ($condition->logic_op ? $condition->logic_op . ' ' : 'AND '));
$tiltLogicOp = false;

switch ($aor_sql_operator_list[$condition->operator]) {
case "=":
$query['where'][] = $field . ' BETWEEN ' . $value . ' AND ' . '"' . $date . '"';
$query['where'][] = $field . " BETWEEN " . $value . " AND " . "'" . $date . "'";
break;
case "!=":
$query['where'][] = $field . ' NOT BETWEEN ' . $value . ' AND ' . '"' . $date . '"';
$query['where'][] = $field . " NOT BETWEEN " . $value . " AND " . "'" . $date . "'";
break;
case ">":
case "<":
Expand Down