summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-01-09 23:02:03 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-01-09 23:02:03 +0000
commit08e4db540ef5dc2b8ca90e27b11b5f8406d68224 (patch)
tree7fdf149a17f435a951a8e567b5e96209b8dc1f8a
parent428f6a8085fdef7360473a4c9328766064475324 (diff)
Fixing outstanding invoice reports to ignore unapproved transactions by default.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2032 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r--LedgerSMB/AA.pm3
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);