summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-07-31 22:08:16 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-07-31 22:08:16 +0000
commit327beb77919cbea42841ec0c10977f4d1c3648ca (patch)
tree16c970b664c69f82ec595f0ee290e9f30686c55d /bin
parent41db8ed11dae7f891481015d2d6022e26ed3ad1e (diff)
Fixing issues with adding ap/ar vouchers to existing batch
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2228 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'bin')
-rw-r--r--bin/aa.pl8
1 files changed, 3 insertions, 5 deletions
diff --git a/bin/aa.pl b/bin/aa.pl
index 7a79fde5..da60e1b4 100644
--- a/bin/aa.pl
+++ b/bin/aa.pl
@@ -887,7 +887,7 @@ sub form_footer {
'delete' =>
{ ndx => 8, key => 'D', value => $locale->text('Delete') },
);
- if (!$form->{approved}){
+ if (!$form->{approved} && !$form->{batch_id}){
$button{approve} = { ndx => 3, key => 'O', value => $locale->text('Post') };
delete $button{post_as_new};
delete $button{print_and_post_as_new};
@@ -895,13 +895,11 @@ sub form_footer {
delete $button{print_and_post};
}
- if ($form->{separate_duties}){
+ if ($form->{separate_duties} || $form->{batch_id}){
$button{post}->{value} = $locale->text('Save');
$form->hide_form('separate_duties');
}
-
if ( $form->{id} ) {
-
if ( $form->{locked} || ( $transdate && $transdate <= $closedto ) )
{
for ( "post", "print_and_post", "delete" ) {
@@ -923,7 +921,7 @@ sub form_footer {
}
delete $button{"print_and_post"} if !${LedgerSMB::Sysconfig::latex};
- if ( $transdate && $transdate <= $closedto ) {
+ if ( $transdate && ($transdate <= $closedto) ) {
for ( "post", "print_and_post" ) { delete $button{$_} }
}
}