summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xLedgerSMB/Form.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm
index 8c9cd548..e1faa621 100755
--- a/LedgerSMB/Form.pm
+++ b/LedgerSMB/Form.pm
@@ -2216,7 +2216,7 @@ sub lastname_used {
my ($self, $myconfig, $dbh2, $vc, $module) = @_;
my $dbh = $self->{dbh};
-
+ $vc ||= $form->{vc}; # add default to correct for improper passing
my $arap = ($vc eq 'customer') ? "ar" : "ap";
my $where = "1 = 1";
my $sth;