my ($self, $myconfig, $form) = @_;
# connect to database, turn AutoCommit off
- my $dbh = $form->dbconnect_noauto($myconfig);
+ my $dbh = SL::DB->client->dbh;
my ($query, @values);
$form->{PR} = selectall_hashref_query($form, $dbh, $query, @values);
- $dbh->disconnect;
-
$main::lxdebug->leave_sub();
}
my ($self, $myconfig, $form) = @_;
# connect to database, turn AutoCommit off
- my $dbh = $form->dbconnect_noauto($myconfig);
+ my $dbh = SL::DB->client->dbh;
my ($query, @values);
($form->{statement_balance}) = selectrow_query($form, $dbh, $query, @values);
- $dbh->disconnect;
-
$main::lxdebug->leave_sub();
}
my ($self, $myconfig, $form) = @_;
# connect to database, turn AutoCommit off
- my $dbh = $form->dbconnect_noauto($myconfig);
+ my $dbh = SL::DB->client->dbh;
my $ARAP = $form->{db} eq "ar" ? "AR" : "AP";
WHERE link LIKE '%${ARAP}_paid%'|;
$form->{PR} = selectall_hashref_query($form, $dbh, $query);
- $dbh->disconnect;
-
$main::lxdebug->leave_sub();
}
my ($self, $myconfig, $form) = @_;
# connect to database, turn AutoCommit off
- my $dbh = $form->dbconnect_noauto($myconfig);
+ my $dbh = SL::DB->client->dbh;
my $ml = 1;
my $arap;
$sth_details->finish();
}
- $dbh->disconnect;
-
$main::lxdebug->leave_sub();
}
use IO::File;
use Fcntl qw(:seek);
+use SL::DB;
#use SL::Auth;
use SL::DB::AuthClient;
use SL::DB::Employee;
return LOGIN_AUTH_DBUPDATE_AVAILABLE() if $dbupdater_auth->unapplied_upgrade_scripts($::auth->dbconnect);
# check if database is down
- my $dbh = $form->dbconnect_noauto;
+ my $dbh = SL::DB->client->dbh;
# we got a connection, check the version
my ($dbversion) = $dbh->selectrow_array(qq|SELECT version FROM defaults|);
my $creditcount = 0;
my ($debitcredit, $amount);
- my $dbh = $form->dbconnect_noauto(\%myconfig);
+ my $dbh = SL::DB->client->dbh;
my ($notax_id) = selectrow_query($form, $dbh, "SELECT id FROM tax WHERE taxkey = 0 LIMIT 1", );
my $zerotaxes = selectall_hashref_query($form, $dbh, "SELECT id FROM tax WHERE rate = 0", );
- $dbh->disconnect;
my @flds =
qw(accno debit credit projectnumber fx_transaction source memo tax taxchart);
my $debitcredit;
my %split_safety = ();
- my $dbh = $form->dbconnect_noauto(\%myconfig);
+ my $dbh = SL::DB->client->dbh;
my ($notax_id) = selectrow_query($form, $dbh, "SELECT id FROM tax WHERE taxkey = 0 LIMIT 1", );
my $zerotaxes = selectall_hashref_query($form, $dbh, "SELECT id FROM tax WHERE rate = 0", );
- $dbh->disconnect;
my @flds = qw(accno debit credit projectnumber fx_transaction source memo tax taxchart);