| @@ 149-159 (lines=11) @@ | ||
| 146 | return $table; |
|
| 147 | } |
|
| 148 | ||
| 149 | public function getCustomQuery() |
|
| 150 | { |
|
| 151 | if ("SalesReport" == $this->class) { |
|
| 152 | user_error('Please implement getCustomQuery() on ' . $this->class, E_USER_ERROR); |
|
| 153 | } else { |
|
| 154 | //buildSQL($filter = "", $sort = "", $limit = "", $join = "", $restrictClasses = true, $having = "") |
|
| 155 | $query = singleton('Order')->buildSQL('', 'Order.Created DESC'); |
|
| 156 | $query->groupby[] = 'Order.ID'; |
|
| 157 | return $query; |
|
| 158 | } |
|
| 159 | } |
|
| 160 | ||
| 161 | public function getExportFields() |
|
| 162 | { |
|
| @@ 169-178 (lines=10) @@ | ||
| 166 | } |
|
| 167 | } |
|
| 168 | ||
| 169 | public function getExportQuery() |
|
| 170 | { |
|
| 171 | if ("SalesReport" == $this->class) { |
|
| 172 | user_error('Please implement getExportFields() on ' . $this->class, E_USER_ERROR); |
|
| 173 | } else { |
|
| 174 | $query = singleton('Order')->buildSQL('', 'Order.Created DESC'); |
|
| 175 | $query->groupby[] = 'Order.Created'; |
|
| 176 | return $query; |
|
| 177 | } |
|
| 178 | } |
|
| 179 | ||
| 180 | protected function statistic($type) |
|
| 181 | { |
|