Revision 02d27081
Von Sven Schöling vor mehr als 8 Jahren hinzugefügt
SL/CP.pm | ||
---|---|---|
|
||
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";
|
||
|
||
... | ... | |
$query = qq|SELECT closedto FROM defaults|;
|
||
($form->{closedto}) = selectrow_query($form, $dbh, $query);
|
||
|
||
$dbh->disconnect;
|
||
|
||
$main::lxdebug->leave_sub();
|
||
}
|
||
|
||
... | ... | |
|
||
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";
|
||
... | ... | |
$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();
|
||
}
|
||
|
||
... | ... | |
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";
|
||
|
||
... | ... | |
SQL
|
||
($form->{openinvoices_other_currencies}) = selectfirst_array_query($form, $dbh, $query, conv_i($form->{"${vc}_id"}), "$form->{currency}");
|
||
|
||
$dbh->disconnect;
|
||
|
||
$main::lxdebug->leave_sub();
|
||
}
|
||
|
Auch abrufbar als: Unified diff
CP: single-dbh disconnects