summaryrefslogtreecommitdiff
path: root/LedgerSMB/PE.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/PE.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/PE.pm')
-rwxr-xr-xLedgerSMB/PE.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/LedgerSMB/PE.pm b/LedgerSMB/PE.pm
index 2d346175..07da3dff 100755
--- a/LedgerSMB/PE.pm
+++ b/LedgerSMB/PE.pm
@@ -979,7 +979,7 @@ sub partsgroups {
my $var;
- my $dbh = $form->dbconnect($myconfig);
+ my $dbh = $form->{dbh};
$form->{sort} = "partsgroup" unless $form->{partsgroup};
my @a = (partsgroup);
@@ -1051,7 +1051,7 @@ sub save_partsgroup {
sub get_partsgroup {
my ($self, $myconfig, $form) = @_;
- my $dbh = $form->dbconnect($myconfig);
+ my $dbh = $form->{dbh};
my $query = qq|SELECT * FROM partsgroup WHERE id = ?|;
my $sth = $dbh->prepare($query);
@@ -1432,7 +1432,7 @@ sub project_sales_order {
my ($self, $myconfig, $form) = @_;
# connect to database
- my $dbh = $form->dbconnect($myconfig);
+ my $dbh = $form->{dbh};
my $query = qq|SELECT current_date|;
my ($transdate) = $dbh->selectrow_array($query);
@@ -1443,7 +1443,7 @@ sub project_sales_order {
$form->all_employees($myconfig, $dbh, $transdate);
- $dbh->disconnect;
+ $dbh->commit;
}