Revision 09685616
Von Moritz Bunkus vor fast 16 Jahren hinzugefügt
SL/AP.pm | ||
---|---|---|
399 | 399 |
my $query = |
400 | 400 |
qq|SELECT a.id, a.invnumber, a.transdate, a.duedate, a.amount, a.paid, | . |
401 | 401 |
qq| a.ordnumber, v.name, a.invoice, a.netamount, a.datepaid, a.notes, | . |
402 |
qq| a.globalproject_id, | . |
|
402 |
qq| a.globalproject_id, a.storno, a.storno_id, | .
|
|
403 | 403 |
qq| pr.projectnumber AS globalprojectnumber, | . |
404 | 404 |
qq| e.name AS employee | . |
405 | 405 |
qq|FROM ap a | . |
... | ... | |
407 | 407 |
qq|LEFT JOIN employee e ON (a.employee_id = e.id) | . |
408 | 408 |
qq|LEFT JOIN project pr ON (a.globalproject_id = pr.id) |; |
409 | 409 |
|
410 |
my $where = qq| WHERE COALESCE(storno, false) != true |;
|
|
410 |
my $where = '';
|
|
411 | 411 |
my @values; |
412 | 412 |
|
413 | 413 |
if ($form->{vendor_id}) { |
... | ... | |
458 | 458 |
} |
459 | 459 |
|
460 | 460 |
if ($where) { |
461 |
# substr($where, 0, 4) = "WHERE";
|
|
461 |
substr($where, 0, 4, " WHERE ");
|
|
462 | 462 |
$query .= $where; |
463 | 463 |
} |
464 | 464 |
|
Auch abrufbar als: Unified diff
Bei Kreditorenbuchungsberichten in der Typ-Spalte auch Stornos gesondert ausweisen.