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

SF.net SVN: ledger-smb:[4085] branches/1.3



Revision: 4085
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4085&view=rev
Author:   einhverfr
Date:     2011-11-25 23:05:09 +0000 (Fri, 25 Nov 2011)
Log Message:
-----------
Correcting commit behavior or update_status

Modified Paths:
--------------
    branches/1.3/Changelog
    branches/1.3/LedgerSMB/Form.pm
    branches/1.3/bin/arapprn.pl
    branches/1.3/bin/io.pl
    branches/1.3/bin/jc.pl
    branches/1.3/bin/pos.pl

Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog	2011-11-25 20:33:54 UTC (rev 4084)
+++ branches/1.3/Changelog	2011-11-25 23:05:09 UTC (rev 4085)
@@ -21,6 +21,8 @@
 * Default language handling for invoices (Herman V)
 * Fixed LaTeX errors in timecard templates (Chris T)
 * Reduced warnings in logs (Chris T)
+* Fixed error when batch printing timecards (Erik H)
+* Fixed menu reversal with batch printing (Erik H)
 
 Changelog for LedgerSMB 1.3.6
 * Including xelatex templates under directory templates/xedemo (Chris T)

Modified: branches/1.3/LedgerSMB/Form.pm
===================================================================
--- branches/1.3/LedgerSMB/Form.pm	2011-11-25 20:33:54 UTC (rev 4084)
+++ branches/1.3/LedgerSMB/Form.pm	2011-11-25 23:05:09 UTC (rev 4085)
@@ -2875,7 +2875,7 @@
 
 sub update_status {
 
-    my ( $self, $myconfig ) = @_;
+    my ( $self, $myconfig, $commit ) = @_;
 
     # no id return
     return unless $self->{id};
@@ -2909,6 +2909,9 @@
     $sth->execute( $self->{id}, $printed, $emailed, $spoolfile,
         $self->{formname} ) || $self->dberror($query);
     $sth->finish;
+    if ($commit){
+        $dbh->commit;
+    }
 
 }
 

Modified: branches/1.3/bin/arapprn.pl
===================================================================
--- branches/1.3/bin/arapprn.pl	2011-11-25 20:33:54 UTC (rev 4084)
+++ branches/1.3/bin/arapprn.pl	2011-11-25 23:05:09 UTC (rev 4085)
@@ -311,7 +311,7 @@
         $form->{queued} =~ s/^ //;
 
         # save status
-        $form->update_status( \%myconfig );
+        $form->update_status( \%myconfig, 1);
 
         $old_form->{queued} = $form->{queued};
 
@@ -336,7 +336,7 @@
             $form->{printed} .= " $form->{formname}";
             $form->{printed} =~ s/^ //;
 
-            $form->update_status( \%myconfig );
+            $form->update_status( \%myconfig, 1);
         }
 
         $old_form->{printed} = $form->{printed} if %$old_form;

Modified: branches/1.3/bin/io.pl
===================================================================
--- branches/1.3/bin/io.pl	2011-11-25 20:33:54 UTC (rev 4084)
+++ branches/1.3/bin/io.pl	2011-11-25 23:05:09 UTC (rev 4085)
@@ -1721,7 +1721,7 @@
             $form->{printed} .= " $form->{formname}";
             $form->{printed} =~ s/^ //;
 
-            $form->update_status( \%myconfig );
+            $form->update_status( \%myconfig, 1);
         }
 
         $old_form->{printed} = $form->{printed} if %$old_form;
@@ -1749,7 +1749,7 @@
             $form->{emailed} =~ s/^ //;
 
             # save status
-            $form->update_status( \%myconfig );
+            $form->update_status( \%myconfig, 1);
         }
 
         $now = scalar localtime;
@@ -1822,7 +1822,7 @@
         $form->{queued} =~ s/^ //;
 
         # save status
-        $form->update_status( \%myconfig );
+        $form->update_status( \%myconfig, 1);
 
         $old_form->{queued} = $form->{queued};
 

Modified: branches/1.3/bin/jc.pl
===================================================================
--- branches/1.3/bin/jc.pl	2011-11-25 20:33:54 UTC (rev 4084)
+++ branches/1.3/bin/jc.pl	2011-11-25 23:05:09 UTC (rev 4085)
@@ -2144,7 +2144,7 @@
             $form->{printed} .= " $form->{formname}";
             $form->{printed} =~ s/^ //;
 
-            $form->update_status( \%myconfig );
+            $form->update_status( \%myconfig, 1);
         }
 
         %audittrail = (
@@ -2181,7 +2181,7 @@
         $form->{printmode} = '>';
 
         $form->{queued} = "$form->{formname} $filename";
-        $form->update_status( \%myconfig );
+        $form->update_status( \%myconfig, 1);
 
         %audittrail = (
             tablename => jcitems,

Modified: branches/1.3/bin/pos.pl
===================================================================
--- branches/1.3/bin/pos.pl	2011-11-25 20:33:54 UTC (rev 4084)
+++ branches/1.3/bin/pos.pl	2011-11-25 23:05:09 UTC (rev 4085)
@@ -1022,7 +1022,7 @@
         $form->{printed} .= " $form->{formname}";
         $form->{printed} =~ s/^ //;
 
-        $form->update_status( \%myconfig );
+        $form->update_status( \%myconfig, 1);
     }
     $old_form->{printed} = $form->{printed};
 

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