summaryrefslogtreecommitdiff
path: root/LedgerSMB/OE.pm
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-13 01:47:52 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-13 01:47:52 +0000
commit1535312181520fa2fa182860476ecc6e0486f40f (patch)
treea57347a02c0563b38687c19cbd75056ee9e8016b /LedgerSMB/OE.pm
parentc41d0a434606332cc7dd1a1e81f4dcaeea590896 (diff)
Lots more dbconnects removed
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@541 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/OE.pm')
-rwxr-xr-xLedgerSMB/OE.pm15
1 files changed, 7 insertions, 8 deletions
diff --git a/LedgerSMB/OE.pm b/LedgerSMB/OE.pm
index 0992b00e..cc13693c 100755
--- a/LedgerSMB/OE.pm
+++ b/LedgerSMB/OE.pm
@@ -750,7 +750,6 @@ sub delete {
$form->audittrail($dbh, "", \%audittrail);
my $rc = $dbh->commit;
- $dbh->disconnect;
if ($rc) {
foreach $spoolfile (@spoolfiles) {
@@ -1000,7 +999,7 @@ sub order_details {
my ($self, $myconfig, $form) = @_;
# connect to database
- my $dbh = $form->dbconnect($myconfig);
+ my $dbh = $form->{dbh};
my $query;
my $sth;
@@ -1729,7 +1728,7 @@ sub project_description {
sub get_warehouses {
my ($self, $myconfig, $form) = @_;
- my $dbh = $form->dbconnect($myconfig);
+ my $dbh = $form->{dbh};
# setup warehouses
my $query = qq|
SELECT id, description
@@ -1744,7 +1743,7 @@ sub get_warehouses {
}
$sth->finish;
- $dbh->disconnect;
+ $dbh->commit;
}
@@ -1757,7 +1756,7 @@ sub save_inventory {
my $ml = ($form->{type} eq 'ship_order') ? -1 : 1;
- my $dbh = $form->dbconnect_noauto($myconfig);
+ my $dbh = $form->{dbh};
my $sth;
my $wth;
my $serialnumber;
@@ -2110,7 +2109,7 @@ sub get_inventory {
sub transfer {
my ($self, $myconfig, $form) = @_;
- my $dbh = $form->dbconnect_noauto($myconfig);
+ my $dbh = $form->{dbh};
($form->{employee}, $form->{employee_id}) = $form->get_employee($dbh);
@@ -2205,7 +2204,7 @@ sub get_soparts {
# foreign exchange rates
&exchangerate_defaults($dbh, $form);
- $dbh->disconnect;
+ $dbh->commit;
}
@@ -2302,7 +2301,7 @@ sub generate_orders {
}
# connect to database
- my $dbh = $form->dbconnect_noauto($myconfig);
+ my $dbh = $form->{dbh};
# foreign exchange rates
&exchangerate_defaults($dbh, $form);