projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Das seitliche Menü hat jetzt Icons für die Unterpunkte, welche auch klickbar sind.
[kivitendo-erp.git]
/
SL
/
LICENSES.pm
diff --git
a/SL/LICENSES.pm
b/SL/LICENSES.pm
index
25b4d66
..
ca9c679
100644
(file)
--- a/
SL/LICENSES.pm
+++ b/
SL/LICENSES.pm
@@
-35,16
+35,18
@@
package LICENSES;
use SL::Form;
use SL::Form;
+use strict;
+
sub save_license {
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
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}')|;
qq| INSERT INTO license (licensenumber) VALUES ('$form->{licensenumber}')|;
- $sth = $dbh->prepare($query);
+
my
$sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
$sth->finish();
$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);
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
$sth->finish();
# save license
@@
-68,11
+70,6
@@
sub save_license {
$sth->execute || $form->dberror($query);
$sth->finish();
$sth->execute || $form->dberror($query);
$sth->finish();
- if ($form->{own_product}) {
- $form->update_balance($dbh, "parts", "onhand", qq|id = $form->{parts_id}|,
- 1);
- }
-
$dbh->disconnect();
$main::lxdebug->leave_sub();
$dbh->disconnect();
$main::lxdebug->leave_sub();
@@
-93,7
+90,7
@@
sub get_customers {
my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
$form->{"all_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();
push(@{ $form->{"all_customers"} }, $ref);
}
$sth->finish();
@@
-127,7
+124,7
@@
sub search {
if ($form->{"customer_name"}) {
$f .= " AND " if ($f);
$f .=
if ($form->{"customer_name"}) {
$f .= " AND " if ($f);
$f .=
- "(customer_id IN (SELECT id FROM customer WHERE name ILIKE "
+ "(
l.
customer_id IN (SELECT id FROM customer WHERE name ILIKE "
. $dbh->quote('%' . $form->{"customer_name"} . '%') . "))";
}
. $dbh->quote('%' . $form->{"customer_name"} . '%') . "))";
}
@@
-179,7
+176,7
@@
sub search {
$sth = $dbh->prepare($query);
$sth->execute() || $form->dberror($query);
$form->{"licenses"} = [];
$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);
}
push(@{ $form->{"licenses"} }, $ref);
}
@@
-212,7
+209,7
@@
sub get_license {
. $form->{"id"};
$sth = $dbh->prepare($query);
$sth->execute() || $form->dberror($query);
. $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();
$sth->finish();
$dbh->disconnect();
$main::lxdebug->leave_sub();