X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FCP.pm;h=dc52af8aa6e21358d8dd8c19cb67f81184e0b1b0;hb=58b97f84fdd297b2a5aa14e408fdb1a154663d72;hp=508dada31312602127f33be5f039bdc14fd85a64;hpb=16c60c08cc186d288b2569cce73512428e63a39a;p=kivitendo-erp.git diff --git a/SL/CP.pm b/SL/CP.pm index 508dada31..dc52af8aa 100644 --- a/SL/CP.pm +++ b/SL/CP.pm @@ -25,7 +25,8 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1335, USA. #====================================================================== # # Check and receipt printing payment module backend routines @@ -67,8 +68,7 @@ sub paymentaccounts { my ($self, $myconfig, $form) = @_; - # connect to database - my $dbh = $form->dbconnect($myconfig); + my $dbh = SL::DB->client->dbh; my $ARAP = $form->{ARAP} eq "AR" ? "AR" : "AP"; @@ -98,8 +98,6 @@ sub paymentaccounts { $query = qq|SELECT closedto FROM defaults|; ($form->{closedto}) = selectrow_query($form, $dbh, $query); - $dbh->disconnect; - $main::lxdebug->leave_sub(); } @@ -108,7 +106,7 @@ sub get_openvc { my ($self, $myconfig, $form) = @_; - my $dbh = $form->dbconnect($myconfig); + my $dbh = SL::DB->client->dbh; my $arap = ($form->{vc} eq 'customer') ? 'ar' : 'ap'; my $vc = $form->{vc} eq "customer" ? "customer" : "vendor"; @@ -128,11 +126,6 @@ sub get_openvc { $form->{"all_$form->{vc}"} = selectall_hashref_query($form, $dbh, $query); } - # aufruf für all_deparments rausgenommen, da die abteilungen nur - # beim buchen der belege (rechnung, fibu) geändert werden und danach - # NICHT mehr überschrieben werden - $dbh->disconnect; - $main::lxdebug->leave_sub(); } @@ -142,7 +135,7 @@ sub get_openinvoices { my ($self, $myconfig, $form) = @_; # connect to database - my $dbh = $form->dbconnect($myconfig); + my $dbh = SL::DB->client->dbh; my $vc = $form->{vc} eq "customer" ? "customer" : "vendor"; @@ -187,8 +180,6 @@ sub get_openinvoices { SQL ($form->{openinvoices_other_currencies}) = selectfirst_array_query($form, $dbh, $query, conv_i($form->{"${vc}_id"}), "$form->{currency}"); - $dbh->disconnect; - $main::lxdebug->leave_sub(); }