@@ 75-85 (lines=11) @@ | ||
72 | return $table; |
|
73 | } |
|
74 | ||
75 | public function getCustomQuery() |
|
76 | { |
|
77 | if ("PaymentsReport" == $this->class) { |
|
78 | //user_error('Please implement getCustomQuery() on ' . $this->class, E_USER_ERROR); |
|
79 | } else { |
|
80 | //buildSQL($filter = "", $sort = "", $limit = "", $join = "", $restrictClasses = true, $having = "") |
|
81 | $query = singleton('Payment')->buildSQL('', 'Payment.Created DESC'); |
|
82 | $query->groupby[] = 'Payment.ID'; |
|
83 | return $query; |
|
84 | } |
|
85 | } |
|
86 | ||
87 | public function getExportFields() |
|
88 | { |
|
@@ 96-105 (lines=10) @@ | ||
93 | } |
|
94 | } |
|
95 | ||
96 | public function getExportQuery() |
|
97 | { |
|
98 | if ("PaymentsReport" == $this->class) { |
|
99 | //user_error('Please implement getExportFields() on ' . $this->class, E_USER_ERROR); |
|
100 | } else { |
|
101 | $query = singleton('Payment')->buildSQL('', 'Payment.Created DESC'); |
|
102 | $query->groupby[] = 'Payment.ID'; |
|
103 | return $query; |
|
104 | } |
|
105 | } |
|
106 | ||
107 | protected function statistic($type) |
|
108 | { |