diff options
-rw-r--r-- | LedgerSMB/AA.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/LedgerSMB/AA.pm b/LedgerSMB/AA.pm index 835dbe0d..182a6867 100644 --- a/LedgerSMB/AA.pm +++ b/LedgerSMB/AA.pm @@ -958,7 +958,8 @@ sub transactions { # the third state, all invoices, sets no explicit toggles. It just selects them all, as normal. - $query .= "WHERE $where + $approved = ($form->{approved}) ? 'NULL' : 'FALSE'; + $query .= "WHERE (coalesce($approved, TRUE) OR a.approved) AND $where ORDER BY $sortorder"; my $sth = $dbh->prepare($query); $sth->execute(@paidargs) || $form->dberror($query); |