X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FLICENSES.pm;h=ca9c679f984fb1b420e51f63cae2608c1168f4ed;hb=b89137f814fb873ddc98c765b7a0ef17bed83ce1;hp=8f9c0259206c70ff332b2df2e7af6e5dd1da92f1;hpb=83914eeb2e95cdf587565952eef54be59dd58693;p=kivitendo-erp.git diff --git a/SL/LICENSES.pm b/SL/LICENSES.pm index 8f9c02592..ca9c679f9 100644 --- a/SL/LICENSES.pm +++ b/SL/LICENSES.pm @@ -35,16 +35,18 @@ package LICENSES; use SL::Form; +use strict; + sub save_license { $main::lxdebug->enter_sub(); my ($self, $myconfig, $form) = @_; - $dbh = $form->dbconnect($myconfig); + my $dbh = $form->dbconnect($myconfig); - $query = + my $query = qq| INSERT INTO license (licensenumber) VALUES ('$form->{licensenumber}')|; - $sth = $dbh->prepare($query); + my $sth = $dbh->prepare($query); $sth->execute || $form->dberror($query); $sth->finish(); @@ -52,7 +54,7 @@ sub save_license { qq|SELECT l.id FROM license l WHERE l.licensenumber = '$form->{licensenumber}'|; $sth = $dbh->prepare($query); $sth->execute || $form->dberror($query); - ($license_id) = $sth->fetchrow_array; + my ($license_id) = $sth->fetchrow_array; $sth->finish(); # save license @@ -88,7 +90,7 @@ sub get_customers { my $sth = $dbh->prepare($query); $sth->execute || $form->dberror($query); $form->{"all_customers"} = []; - while ($ref = $sth->fetchrow_hashref(NAME_lc)) { + while ($ref = $sth->fetchrow_hashref("NAME_lc")) { push(@{ $form->{"all_customers"} }, $ref); } $sth->finish(); @@ -174,7 +176,7 @@ sub search { $sth = $dbh->prepare($query); $sth->execute() || $form->dberror($query); $form->{"licenses"} = []; - while ($ref = $sth->fetchrow_hashref(NAME_lc)) { + while ($ref = $sth->fetchrow_hashref("NAME_lc")) { push(@{ $form->{"licenses"} }, $ref); } @@ -207,7 +209,7 @@ sub get_license { . $form->{"id"}; $sth = $dbh->prepare($query); $sth->execute() || $form->dberror($query); - $form->{"license"} = $sth->fetchrow_hashref(NAME_lc); + $form->{"license"} = $sth->fetchrow_hashref("NAME_lc"); $sth->finish(); $dbh->disconnect(); $main::lxdebug->leave_sub();