[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1349] trunk/LedgerSMB



Revision: 1349
          http://svn.sourceforge.net/ledger-smb/?rev=1349&view=rev
Author:   einhverfr
Date:     2007-07-05 11:35:37 -0700 (Thu, 05 Jul 2007)

Log Message:
-----------
Removing a large number of COMMIT's believed to be unnecessary

Modified Paths:
--------------
    trunk/LedgerSMB/Form.pm
    trunk/LedgerSMB/IS.pm

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2007-07-05 17:26:10 UTC (rev 1348)
+++ trunk/LedgerSMB/Form.pm	2007-07-05 18:35:37 UTC (rev 1349)
@@ -1077,7 +1077,6 @@
     $self->update_exchangerate( $self->{dbh}, $currency, $transdate, $buy,
         $sell );
 
-    $dbh->commit;
 }
 
 sub get_exchangerate {
@@ -1098,7 +1097,6 @@
     }
 
     $sth->finish;
-    $self->{dbh}->commit;
     $exchangerate;
 }
 
@@ -1118,7 +1116,6 @@
     my ($exchangerate) = $sth->fetchrow_array;
 
     $sth->finish;
-    $self->{dbh}->commit;
 
     $exchangerate;
 }
@@ -1159,7 +1156,6 @@
             $self->{shiptofax},      $self->{shiptoemail}
         ) || $self->dberror($query);
         $sth->finish;
-        $self->{dbh}->commit;
     }
 }
 
@@ -1181,7 +1177,6 @@
     $a[1] *= 1;
 
     $sth->finish;
-    $self->{dbh}->commit;
 
     @a;
 }
@@ -1225,7 +1220,6 @@
     }
 
     $sth->finish;
-    $self->{dbh}->commit;
 
     $i;
 
@@ -1326,7 +1320,6 @@
 
     $sth->finish;
     $self->all_taxaccounts( $myconfig, $dbh, $transdate );
-    $self->{dbh}->commit;
 }
 
 sub all_taxaccounts {
@@ -1365,7 +1358,6 @@
             $sth->finish;
         }
     }
-    $self->{dbh}->commit;
 }
 
 sub all_employees {
@@ -1405,7 +1397,6 @@
     }
 
     $sth->finish;
-    $dbh->commit;
 }
 
 sub all_projects {
@@ -1453,7 +1444,6 @@
     }
 
     $sth->finish;
-    $dbh->commit;
 }
 
 sub all_departments {
@@ -1486,7 +1476,6 @@
 
     $sth->finish;
     $self->all_years($myconfig);
-    $dbh->commit;
 }
 
 sub all_years {
@@ -1539,7 +1528,6 @@
         '12' => 'December'
     );
 
-    $dbh->commit;
 }
 
 sub create_links {
@@ -1715,7 +1703,6 @@
     }
 
     $self->all_vc( $myconfig, $vc, $module, $dbh, $self->{transdate}, $job );
-    $self->{dbh}->commit;
 }
 
 sub lastname_used {
@@ -1755,7 +1742,6 @@
     my $ref = $sth->fetchrow_hashref(NAME_lc);
     for ( keys %$ref ) { $self->{$_} = $ref->{$_} }
     $sth->finish;
-    $dbh->commit;
 }
 
 sub current_date {
@@ -1792,7 +1778,6 @@
     $sth = $dbh->prepare($query);
     $sth->execute(@queryargs);
     ($thisdate) = $sth->fetchrow_array;
-    $dbh->commit;
     $thisdate;
 }
 
@@ -1894,7 +1879,6 @@
     }
 
     $sth->finish;
-    $dbh->commit;
 }
 
 sub update_status {
@@ -1934,7 +1918,6 @@
         $self->{formname} );
     $sth->finish;
 
-    $dbh->commit;
 }
 
 sub save_status {
@@ -2055,7 +2038,6 @@
 
         chop $self->{recurring};
     }
-    $dbh->commit;
 }
 
 sub save_recurring {
@@ -2210,8 +2192,8 @@
             $sth->finish;
         }
     }
-
     $dbh->commit;
+
 }
 
 sub save_intnotes {
@@ -2656,7 +2638,6 @@
 "$audittrail->{tablename}|$audittrail->{reference}|$audittrail->{formname}|$audittrail->{action}|$timestamp|";
     }
 
-    $dbh->commit;
     $rv;
 }
 

Modified: trunk/LedgerSMB/IS.pm
===================================================================
--- trunk/LedgerSMB/IS.pm	2007-07-05 17:26:10 UTC (rev 1348)
+++ trunk/LedgerSMB/IS.pm	2007-07-05 18:35:37 UTC (rev 1349)
@@ -891,6 +891,8 @@
       ($exchangerate)
       ? $exchangerate
       : $form->parse_amount( $myconfig, $form->{exchangerate} );
+    $form->{invnumber} = $form->update_defaults( $myconfig, "sinumber", $dbh )
+      unless $form->{invnumber};
 
     my $i;
     my $item;
@@ -1382,8 +1384,6 @@
     $form->{terms}       *= 1;
     $form->{taxincluded} *= 1;
 
-    $form->{invnumber} = $form->update_defaults( $myconfig, "sinumber", $dbh )
-      unless $form->{invnumber};
 
     # save AR record
     $query = qq|


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.