diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-09-08 05:25:46 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-09-08 05:25:46 +0000 |
commit | 8f20a81aeb9e25a80ff07a35be240b5b97fea9b3 (patch) | |
tree | 7ed95767d8668d57514764801deb0ea2ae33e7a7 | |
parent | b22caca93654d10eac19cddaaaa0207ea41394ca (diff) |
Correcting more breakage on entity stuff
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1545 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r-- | LedgerSMB/CP.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/LedgerSMB/CP.pm b/LedgerSMB/CP.pm index 4419beac..6d31c5aa 100644 --- a/LedgerSMB/CP.pm +++ b/LedgerSMB/CP.pm @@ -215,7 +215,7 @@ sub get_openinvoices { my $dbh = $form->{dbh}; $vc_id = $dbh->quote( $form->{"entity_id"} ); - my $where = qq|WHERE a.entity__id = $vc_id + my $where = qq|WHERE a.entity_id = $vc_id AND a.amount != a.paid|; $curr = $dbh->quote( $form->{currency} ); @@ -257,9 +257,10 @@ sub get_openinvoices { } my $query = qq|SELECT a.id, a.invnumber, a.transdate, a.amount, a.paid, - a.curr, c.name, a.entity_id, c.language_code + a.curr, e.name, a.entity_id, c.language_code FROM $form->{arap} a JOIN $form->{vc} c ON (c.entity_id = a.entity_id) + JOIN entity e ON (a.entity_id = e.id) $where ORDER BY $sortorder|; |