diff options
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); |