uc_coupon_handler_filter_gross.inc 502 B

1234567891011121314151617181920212223
  1. <?php
  2. // $Id$
  3. /**
  4. * @file
  5. * Filter based on coupon order gross (total+value)
  6. */
  7. class uc_coupon_handler_filter_gross extends views_handler_filter_numeric {
  8. function query() {
  9. $this->ensure_my_table();
  10. $uco = $this->query->ensure_table('uc_orders');
  11. $uc = $this->table_alias;
  12. $field = "($uco.order_total + $uc.value)";
  13. $info = $this->operators();
  14. if (!empty($info[$this->operator]['method'])) {
  15. $this->{$info[$this->operator]['method']}($field);
  16. }
  17. }
  18. }