summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-30 04:57:17 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-30 04:57:17 +0000
commit397c0451508646eda7a34b0f9a7f0d95e544d9f6 (patch)
tree3cc2c3a6efd042a41c0062943b089def9d43db75 /bin
parent7de9d38661b0ff22dc8e37dd52b01b9e665f22e8 (diff)
Fixing missing buttons issue
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@706 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ir.pl7
-rwxr-xr-xbin/is.pl8
2 files changed, 11 insertions, 4 deletions
diff --git a/bin/ir.pl b/bin/ir.pl
index f05fb764..01c194b1 100755
--- a/bin/ir.pl
+++ b/bin/ir.pl
@@ -604,9 +604,12 @@ sub form_footer {
} else {
if ($transdate > $closedto) {
- for ('update', 'post', 'schedule') { $a{$_} = 1 }
+ for ('update', 'post', 'schedule') { $allowed{$_} = 1 }
+ for (keys %button) { delete $button{$_} if ! $allowed{$_} }
+ }
+ elsif ($closedto){
+ %buttons = ();
}
- for (keys %button) { delete $button{$_} if ! $a{$_} }
}
for (sort { $button{$a}->{ndx} <=> $button{$b}->{ndx} } keys %button) { $form->print_button(\%button, $_) }
diff --git a/bin/is.pl b/bin/is.pl
index d34419d7..fa1a6c19 100755
--- a/bin/is.pl
+++ b/bin/is.pl
@@ -671,11 +671,15 @@ sub form_footer {
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{$_} }
+ }
+ elsif ($closedto){
+ %button = ();
}
- for (keys %button) { delete $button{$_} if ! $a{$_} }
}
for (sort { $button{$a}->{ndx} <=> $button{$b}->{ndx} } keys %button) { $form->print_button(\%button, $_) }