my @values = map { $_ } @{ $form->{ALL_CURRENCIES} };
my %labels = map { $_ => $_ } @{ $form->{ALL_CURRENCIES} };
$form->{currency} = $form->{defaultcurrency} unless $form->{currency};
- $TMPL_VAR{show_exchangerate} = $form->{currency} ne $form->{defaultcurrency};
+ # show_exchangerate is also later needed in another template
+ $form->{show_exchangerate} = $form->{currency} ne $form->{defaultcurrency};
$TMPL_VAR{currencies} = NTI($cgi->popup_menu('-name' => 'currency', '-default' => $form->{"currency"},
'-values' => \@values, '-labels' => \%labels,
'-onchange' => "document.getElementById('update_button').click();"
$form->error($locale->text("Invoice has already been storno'd!"));
}
+ $form->error($locale->text('Cannot post storno for a closed period!'))
+ if ( $form->date_closed($form->{invdate}, \%myconfig));
+
my $employee_id = $form->{employee_id};
invoice_links();
prepare_invoice();
$form->header;
print qq|
-<body>
-
<form method=post action=$form->{script}>
|;