Revision 2819d504
Von Thomas Kasulke vor mehr als 17 Jahren hinzugefügt
SL/CA.pm | ||
---|---|---|
247 | 247 |
@values = (); |
248 | 248 |
|
249 | 249 |
foreach my $id (@id) { |
250 |
|
|
250 |
|
|
251 | 251 |
# NOTE: Postgres is really picky about the order of implicit CROSS |
252 | 252 |
# JOINs with ',' if you alias the tables and want to use the |
253 | 253 |
# alias later in another JOIN. the alias you want to use has to |
... | ... | |
266 | 266 |
$dpt_join . |
267 | 267 |
qq|WHERE | . $where . $dpt_where . $project . |
268 | 268 |
qq| AND ac.chart_id = ? | . |
269 |
qq| AND ac.trans_id = a.id | . |
|
270 | 269 |
|
271 | 270 |
qq|UNION | . |
272 | 271 |
|
... | ... | |
275 | 274 |
qq|FROM acc_trans ac, customer c, ar a | . |
276 | 275 |
$dpt_join . |
277 | 276 |
qq|WHERE | . $where . $dpt_where . $project . |
278 |
qq| AND ac.chart_id = ? | .
|
|
279 |
qq| AND ac.trans_id = a.id | .
|
|
280 |
qq| AND a.customer_id = c.id | .
|
|
277 |
qq| AND ac.chart_id = ? | . |
|
278 |
qq| AND NOT a.storno | .
|
|
279 |
qq| AND a.customer_id = c.id | . |
|
281 | 280 |
|
282 | 281 |
qq|UNION | . |
283 | 282 |
|
... | ... | |
286 | 285 |
qq|FROM acc_trans ac, vendor v, ap a | . |
287 | 286 |
$dpt_join . |
288 | 287 |
qq|WHERE | . $where . $dpt_where . $project . |
289 |
qq| AND ac.chart_id = ? | .
|
|
290 |
qq| AND ac.trans_id = a.id | .
|
|
291 |
qq| AND a.vendor_id = v.id |;
|
|
288 |
qq| AND ac.chart_id = ? | . |
|
289 |
qq| AND NOT a.storno | .
|
|
290 |
qq| AND a.vendor_id = v.id |; |
|
292 | 291 |
|
293 | 292 |
push(@values, |
294 | 293 |
@where_values, @department_values, @project_values, $id, |
... | ... | |
345 | 344 |
$union = qq|UNION ALL|; |
346 | 345 |
} |
347 | 346 |
|
348 |
$query .= qq|ORDER BY | . $sortorder;
|
|
347 |
$query .= qq|ORDER BY | . $form->{sort};
|
|
349 | 348 |
$sth = prepare_execute_query($form, $dbh, $query, @values); |
350 | 349 |
|
351 | 350 |
$form->{CA} = []; |
Auch abrufbar als: Unified diff
Überarbeitung der Ausgabe der Kontenansichten. Alle Buchungen - bis auf stornierte - werden gruppiert (je nach Sortierung) angezeigt.