Revision 02d27081
Von Sven Schöling vor mehr als 8 Jahren hinzugefügt
SL/CP.pm | ||
---|---|---|
67 | 67 |
|
68 | 68 |
my ($self, $myconfig, $form) = @_; |
69 | 69 |
|
70 |
# connect to database |
|
71 |
my $dbh = $form->dbconnect($myconfig); |
|
70 |
my $dbh = SL::DB->client->dbh; |
|
72 | 71 |
|
73 | 72 |
my $ARAP = $form->{ARAP} eq "AR" ? "AR" : "AP"; |
74 | 73 |
|
... | ... | |
98 | 97 |
$query = qq|SELECT closedto FROM defaults|; |
99 | 98 |
($form->{closedto}) = selectrow_query($form, $dbh, $query); |
100 | 99 |
|
101 |
$dbh->disconnect; |
|
102 |
|
|
103 | 100 |
$main::lxdebug->leave_sub(); |
104 | 101 |
} |
105 | 102 |
|
... | ... | |
108 | 105 |
|
109 | 106 |
my ($self, $myconfig, $form) = @_; |
110 | 107 |
|
111 |
my $dbh = $form->dbconnect($myconfig);
|
|
108 |
my $dbh = SL::DB->client->dbh;
|
|
112 | 109 |
|
113 | 110 |
my $arap = ($form->{vc} eq 'customer') ? 'ar' : 'ap'; |
114 | 111 |
my $vc = $form->{vc} eq "customer" ? "customer" : "vendor"; |
... | ... | |
128 | 125 |
$form->{"all_$form->{vc}"} = selectall_hashref_query($form, $dbh, $query); |
129 | 126 |
} |
130 | 127 |
|
131 |
# aufruf für all_deparments rausgenommen, da die abteilungen nur |
|
132 |
# beim buchen der belege (rechnung, fibu) geändert werden und danach |
|
133 |
# NICHT mehr überschrieben werden |
|
134 |
$dbh->disconnect; |
|
135 |
|
|
136 | 128 |
$main::lxdebug->leave_sub(); |
137 | 129 |
} |
138 | 130 |
|
... | ... | |
142 | 134 |
my ($self, $myconfig, $form) = @_; |
143 | 135 |
|
144 | 136 |
# connect to database |
145 |
my $dbh = $form->dbconnect($myconfig);
|
|
137 |
my $dbh = SL::DB->client->dbh;
|
|
146 | 138 |
|
147 | 139 |
my $vc = $form->{vc} eq "customer" ? "customer" : "vendor"; |
148 | 140 |
|
... | ... | |
187 | 179 |
SQL |
188 | 180 |
($form->{openinvoices_other_currencies}) = selectfirst_array_query($form, $dbh, $query, conv_i($form->{"${vc}_id"}), "$form->{currency}"); |
189 | 181 |
|
190 |
$dbh->disconnect; |
|
191 |
|
|
192 | 182 |
$main::lxdebug->leave_sub(); |
193 | 183 |
} |
194 | 184 |
|
Auch abrufbar als: Unified diff
CP: single-dbh disconnects