You are here

function pay_handler_filter_amount::op_simple in Pay 7

Same name and namespace in other branches
  1. 6 includes/views/pay_handler_filter_amount.inc \pay_handler_filter_amount::op_simple()

Overrides views_handler_filter_numeric::op_simple

File

includes/views/pay_handler_filter_amount.inc, line 140

Class

pay_handler_filter_amount
Simple filter to handle greater than/less than filters

Code

function op_simple($field) {
  if ($this->value['value_or_goal'] == 'goal') {
    $total_goal = $this->query
      ->add_field($this->table_alias, 'total_goal');
    $this->query
      ->add_having($this->options['group'], "{$field} {$this->operator} %s", $total_goal);
  }
  else {
    $this->query
      ->add_having($this->options['group'], "{$field} {$this->operator} %d", $this->value['value']);
  }
}