diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-09-01 22:49:54 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-09-01 22:49:54 +0000 |
commit | b1d3c56e3824b123e09bf807ee1cd9a71ca43efc (patch) | |
tree | b08d91c62c87b60085d55c2c3b3557ad654765b9 /LedgerSMB/Form.pm | |
parent | 0ca18bdebd500c752b7ae1dcc8f54c65fd2c25af (diff) |
Fixing bind errors when transdate is omitted in Form::all_vc and also ensuring that invoices show up in transaction report.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1493 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/Form.pm')
-rw-r--r-- | LedgerSMB/Form.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index cb20e03f..f1c873d0 100644 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -1702,7 +1702,9 @@ sub all_vc { $where = qq| (startdate IS NULL OR startdate <= ?) AND (enddate IS NULL OR enddate >= ?) AND entity_class = ?|; - push (@queryargs, $transdate, $transdate ); + push (@queryargs, $transdate, $transdate, $self->{vc_class}); + } else { + $where = " true"; } $sth = $dbh->prepare($query); @@ -1734,7 +1736,7 @@ sub all_vc { ORDER BY name|; shift @queryargs; - push( @queryargs, $self->{vc_class}, $self->{"${vc}_id"} ); + push( @queryargs, $self->{"${vc}_id"} ); $sth = $dbh->prepare($query); $sth->execute(@queryargs) || $self->dberror($query); |