Merge branch 'master' of github.com:kivitendo/kivitendo-erp
[kivitendo-erp.git] / bin / mozilla / ir.pl
index 3f67961..b226bb0 100644 (file)
@@ -149,7 +149,7 @@ sub invoice_links {
     $form->{currency} = $currency;
   }
 
-  my @curr = split(/:/, $form->{currencies}); #seems to be missing
+  my @curr = $form->get_all_currencies();
   map { $form->{selectcurrency} .= "<option>$_\n" } @curr;
 
   $form->{oldvendor} = "$form->{vendor}--$form->{vendor_id}";
@@ -358,7 +358,6 @@ sub form_header {
   map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts}];
 
   $form->{jsscript} = 1;
-  $::request->layout->use_stylesheet('presenter/record/record_list.css');
   $form->header();
 
   print $form->parse_html_template("ir/form_header", \%TMPL_VAR);
@@ -723,6 +722,8 @@ sub post {
   my $invdate      = $form->datetonum($form->{invdate},  \%myconfig);
   my $max_datepaid = _max_datepaid();
 
+  $form->error($locale->text('Cannot post transaction above the maximum future booking date!'))
+    if ($form->date_max_future($invdate, \%myconfig));
   $form->error($locale->text('Cannot post invoice for a closed period!')) if $max_datepaid && $form->date_closed($max_datepaid, \%myconfig);
 
   $form->isblank("exchangerate", $locale->text('Exchangerate missing!'))