projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kivitendo-CSS: auskommentierten Inhalt entfernt
[kivitendo-erp.git]
/
SL
/
IR.pm
diff --git
a/SL/IR.pm
b/SL/IR.pm
index
f1a1b7c
..
3498bf0
100644
(file)
--- a/
SL/IR.pm
+++ b/
SL/IR.pm
@@
-933,7
+933,8
@@
sub delete_invoice {
);
map { do_query($form, $dbh, $_, @values) } @queries;
);
map { do_query($form, $dbh, $_, @values) } @queries;
- });
+ 1;
+ }) or do { die SL::DB->client->error };
return 1;
}
return 1;
}
@@
-944,7
+945,7
@@
sub retrieve_invoice {
my ($self, $myconfig, $form) = @_;
# connect to database
my ($self, $myconfig, $form) = @_;
# connect to database
- my $dbh =
$form->dbconnect($myconfig)
;
+ my $dbh =
SL::DB->client->dbh
;
my ($query, $sth, $ref, $q_invdate);
my ($query, $sth, $ref, $q_invdate);
@@
-976,7
+977,6
@@
sub retrieve_invoice {
map { $form->{$_} = $ref->{$_} } keys %$ref;
if (!$form->{id}) {
map { $form->{$_} = $ref->{$_} } keys %$ref;
if (!$form->{id}) {
- $dbh->disconnect();
$main::lxdebug->leave_sub();
return;
$main::lxdebug->leave_sub();
return;
@@
-1094,8
+1094,6
@@
sub retrieve_invoice {
Common::webdav_folder($form);
Common::webdav_folder($form);
- $dbh->disconnect();
-
$main::lxdebug->leave_sub();
}
$main::lxdebug->leave_sub();
}
@@
-1107,7
+1105,7
@@
sub get_vendor {
$params = $form unless defined $params && ref $params eq "HASH";
# connect to database
$params = $form unless defined $params && ref $params eq "HASH";
# connect to database
- my $dbh =
$form->dbconnect($myconfig)
;
+ my $dbh =
SL::DB->client->dbh
;
my $dateformat = $myconfig->{dateformat};
$dateformat .= "yy" if $myconfig->{dateformat} !~ /^y/;
my $dateformat = $myconfig->{dateformat};
$dateformat .= "yy" if $myconfig->{dateformat} !~ /^y/;
@@
-1207,8
+1205,6
@@
sub get_vendor {
$params->{rowcount} = $i if ($i && !$params->{type});
}
$params->{rowcount} = $i if ($i && !$params->{type});
}
- $dbh->disconnect();
-
$main::lxdebug->leave_sub();
}
$main::lxdebug->leave_sub();
}
@@
-1217,8
+1213,7
@@
sub retrieve_item {
my ($self, $myconfig, $form) = @_;
my ($self, $myconfig, $form) = @_;
- # connect to database
- my $dbh = $form->dbconnect($myconfig);
+ my $dbh = SL::DB->client->dbh;
my $i = $form->{rowcount};
my $i = $form->{rowcount};
@@
-1423,8
+1418,6
@@
sub retrieve_item {
map { $item->{"ic_cvar_" . $_->{name} } = $_->{value} } @{ $custom_variables };
}
map { $item->{"ic_cvar_" . $_->{name} } = $_->{value} } @{ $custom_variables };
}
- $dbh->disconnect();
-
$main::lxdebug->leave_sub();
}
$main::lxdebug->leave_sub();
}
@@
-1433,8
+1426,7
@@
sub vendor_details {
my ($self, $myconfig, $form, @wanted_vars) = @_;
my ($self, $myconfig, $form, @wanted_vars) = @_;
- # connect to database
- my $dbh = $form->dbconnect($myconfig);
+ my $dbh = SL::DB->client->dbh;
my @values;
my @values;
@@
-1480,8
+1472,6
@@
sub vendor_details {
'translation_type' => 'greetings::' . ($form->{cp_gender} eq 'f' ? 'female' : 'male'),
'allow_fallback' => 1);
'translation_type' => 'greetings::' . ($form->{cp_gender} eq 'f' ? 'female' : 'male'),
'allow_fallback' => 1);
- $dbh->disconnect();
-
$main::lxdebug->leave_sub();
}
$main::lxdebug->leave_sub();
}
@@
-1490,8
+1480,7
@@
sub item_links {
my ($self, $myconfig, $form) = @_;
my ($self, $myconfig, $form) = @_;
- # connect to database
- my $dbh = $form->dbconnect($myconfig);
+ my $dbh = SL::DB->client->dbh;
my $query =
qq|SELECT accno, description, link
my $query =
qq|SELECT accno, description, link
@@
-1511,8
+1500,6
@@
sub item_links {
}
$sth->finish();
}
$sth->finish();
- $dbh->disconnect();
-
$main::lxdebug->leave_sub();
}
$main::lxdebug->leave_sub();
}