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

SF.net SVN: ledger-smb: [706] branches/1.2/bin



Revision: 706
          http://svn.sourceforge.net/ledger-smb/?rev=706&view=rev
Author:   einhverfr
Date:     2006-11-29 20:57:17 -0800 (Wed, 29 Nov 2006)

Log Message:
-----------
Fixing missing buttons issue

Modified Paths:
--------------
    branches/1.2/bin/ir.pl
    branches/1.2/bin/is.pl

Modified: branches/1.2/bin/ir.pl
===================================================================
--- branches/1.2/bin/ir.pl	2006-11-29 20:28:21 UTC (rev 705)
+++ branches/1.2/bin/ir.pl	2006-11-30 04:57:17 UTC (rev 706)
@@ -604,9 +604,12 @@
     } else {
 
       if ($transdate > $closedto) {
-	for ('update', 'post', 'schedule') { $a{$_} = 1 }
+	for ('update', 'post', 'schedule') { $allowed{$_} = 1 }
+        for (keys %button) { delete $button{$_} if ! $allowed{$_} }
       }
-      for (keys %button) { delete $button{$_} if ! $a{$_} }
+      elsif ($closedto){
+	%buttons = ();
+      }
     }
 
     for (sort { $button{$a}->{ndx} <=> $button{$b}->{ndx} } keys %button) { $form->print_button(\%button, $_) }

Modified: branches/1.2/bin/is.pl
===================================================================
--- branches/1.2/bin/is.pl	2006-11-29 20:28:21 UTC (rev 705)
+++ branches/1.2/bin/is.pl	2006-11-30 04:57:17 UTC (rev 706)
@@ -671,11 +671,15 @@
 
       if ($transdate > $closedto) {
 	
-	for ("update", "ship_to", "print", "e_mail", "post", "schedule") { $a{$_} = 1 }
+	for ("update", "ship_to", "print", "e_mail", "post", "schedule") { 
+		$allowed{$_} = 1 }
 	$a{'print_and_post'} = 1 if ${LedgerSMB::Sysconfig::latex};
 	
+        for (keys %button) { delete $button{$_} if ! $allowed{$_} }
       }
-      for (keys %button) { delete $button{$_} if ! $a{$_} }
+      elsif ($closedto){
+	%button = ();
+      }
     }
     
     for (sort { $button{$a}->{ndx} <=> $button{$b}->{ndx} } keys %button) { $form->print_button(\%button, $_) }


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