[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [541] trunk/LedgerSMB
- Subject: SF.net SVN: ledger-smb: [541] trunk/LedgerSMB
- From: ..hidden..
- Date: Sun, 12 Nov 2006 17:47:55 -0800
Revision: 541
http://svn.sourceforge.net/ledger-smb/?rev=541&view=rev
Author: einhverfr
Date: 2006-11-12 17:47:52 -0800 (Sun, 12 Nov 2006)
Log Message:
-----------
Lots more dbconnects removed
Modified Paths:
--------------
trunk/LedgerSMB/AM.pm
trunk/LedgerSMB/CP.pm
trunk/LedgerSMB/HR.pm
trunk/LedgerSMB/IR.pm
trunk/LedgerSMB/OE.pm
trunk/LedgerSMB/PE.pm
trunk/LedgerSMB/RC.pm
trunk/LedgerSMB/RP.pm
Modified: trunk/LedgerSMB/AM.pm
===================================================================
--- trunk/LedgerSMB/AM.pm 2006-11-13 01:18:22 UTC (rev 540)
+++ trunk/LedgerSMB/AM.pm 2006-11-13 01:47:52 UTC (rev 541)
@@ -675,7 +675,7 @@
my ($self, $myconfig, $form) = @_;
# connect to database
- my $dbh = $form->dbconnect($myconfig);
+ my $dbh = $form->{dbh};
my $query = qq|
SELECT description, discount
@@ -695,7 +695,7 @@
my ($self, $myconfig, $form) = @_;
# connect to database
- my $dbh = $form->dbconnect($myconfig);
+ my $dbh = $form->{dbh};
$form->{description} =~ s/-(-)+/-/g;
$form->{description} =~ s/ ( )+/ /g;
Modified: trunk/LedgerSMB/CP.pm
===================================================================
--- trunk/LedgerSMB/CP.pm 2006-11-13 01:18:22 UTC (rev 540)
+++ trunk/LedgerSMB/CP.pm 2006-11-13 01:47:52 UTC (rev 541)
@@ -560,7 +560,7 @@
my ($self, $myconfig, $form) = @_;
# connect to database, turn AutoCommit off
- my $dbh = $form->dbconnect_noauto($myconfig);
+ my $dbh = $form->{dbh};
my $sth;
Modified: trunk/LedgerSMB/HR.pm
===================================================================
--- trunk/LedgerSMB/HR.pm 2006-11-13 01:18:22 UTC (rev 540)
+++ trunk/LedgerSMB/HR.pm 2006-11-13 01:47:52 UTC (rev 541)
@@ -37,7 +37,7 @@
sub get_employee {
my ($self, $myconfig, $form) = @_;
- my $dbh = $form->dbconnect($myconfig);
+ my $dbh = $form->{dbh};
my $query;
my $sth;
@@ -173,7 +173,7 @@
my ($self, $myconfig, $form) = @_;
# connect to database
- my $dbh = $form->dbconnect_noauto($myconfig);
+ my $dbh = $form->{dbh};
# delete employee
Modified: trunk/LedgerSMB/IR.pm
===================================================================
--- trunk/LedgerSMB/IR.pm 2006-11-13 01:18:22 UTC (rev 540)
+++ trunk/LedgerSMB/IR.pm 2006-11-13 01:47:52 UTC (rev 541)
@@ -975,7 +975,7 @@
my ($self, $myconfig, $form) = @_;
# connect to database
- my $dbh = $form->dbconnect_noauto($myconfig);
+ my $dbh = $form->{dbh};
my $query;
@@ -1370,7 +1370,7 @@
my ($self, $myconfig, $form) = @_;
# connect to database
- my $dbh = $form->dbconnect($myconfig);
+ my $dbh = $form->{dbh};
my $query = qq|
SELECT accno, description, link
Modified: trunk/LedgerSMB/OE.pm
===================================================================
--- trunk/LedgerSMB/OE.pm 2006-11-13 01:18:22 UTC (rev 540)
+++ trunk/LedgerSMB/OE.pm 2006-11-13 01:47:52 UTC (rev 541)
@@ -750,7 +750,6 @@
$form->audittrail($dbh, "", \%audittrail);
my $rc = $dbh->commit;
- $dbh->disconnect;
if ($rc) {
foreach $spoolfile (@spoolfiles) {
@@ -1000,7 +999,7 @@
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 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 @@
}
$sth->finish;
- $dbh->disconnect;
+ $dbh->commit;
}
@@ -1757,7 +1756,7 @@
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 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 @@
# foreign exchange rates
&exchangerate_defaults($dbh, $form);
- $dbh->disconnect;
+ $dbh->commit;
}
@@ -2302,7 +2301,7 @@
}
# connect to database
- my $dbh = $form->dbconnect_noauto($myconfig);
+ my $dbh = $form->{dbh};
# foreign exchange rates
&exchangerate_defaults($dbh, $form);
Modified: trunk/LedgerSMB/PE.pm
===================================================================
--- trunk/LedgerSMB/PE.pm 2006-11-13 01:18:22 UTC (rev 540)
+++ trunk/LedgerSMB/PE.pm 2006-11-13 01:47:52 UTC (rev 541)
@@ -979,7 +979,7 @@
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 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 @@
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 @@
$form->all_employees($myconfig, $dbh, $transdate);
- $dbh->disconnect;
+ $dbh->commit;
}
Modified: trunk/LedgerSMB/RC.pm
===================================================================
--- trunk/LedgerSMB/RC.pm 2006-11-13 01:18:22 UTC (rev 540)
+++ trunk/LedgerSMB/RC.pm 2006-11-13 01:47:52 UTC (rev 541)
@@ -444,7 +444,7 @@
sub reconcile {
my ($self, $myconfig, $form) = @_;
- my $dbh = $form->dbconnect($myconfig);
+ my $dbh = $form->{dbh};
my $query = qq|SELECT id FROM chart
WHERE accno = '$form->{accno}'|;
Modified: trunk/LedgerSMB/RP.pm
===================================================================
--- trunk/LedgerSMB/RP.pm 2006-11-13 01:18:22 UTC (rev 540)
+++ trunk/LedgerSMB/RP.pm 2006-11-13 01:47:52 UTC (rev 541)
@@ -104,7 +104,7 @@
sub yearend_statement {
my ($self, $myconfig, $form) = @_;
- my $dbh = $form->dbconnect($myconfig);
+ my $dbh = $form->{dbh};
# if todate < existing yearends, delete GL and yearends
my $query = qq|SELECT trans_id FROM yearend WHERE transdate >= ?|;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.