]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/Controller/YearEndTransactions.pm
EB/SB Buchungen minimale Kindersicherung für Datumswerte
[kivitendo-erp.git] / SL / Controller / YearEndTransactions.pm
index a81fa3bbc968b0738b2728dd854bda6d59462f47..522803837a59fba439d58bb19bec482db56467b5 100644 (file)
@@ -65,10 +65,12 @@ sub action_list {
 sub action_generate {
   my ($self) = @_;
 
-  my $cnt = $self->make_booking();
-
-  flash('info', $::locale->text('#1 CB transactions and #1 OB transactions generated.',$cnt)) if $cnt > 0;
-
+  if ($self->cb_date > $self->ob_date) {
+    flash ('error', $::locale->text('CB date #1 is higher than OB date #2. Please select again.', $self->cb_date, $self->ob_date));
+  } else {
+    my $cnt = $self->make_booking();
+    flash('info', $::locale->text('#1 CB transactions and #1 OB transactions generated.',$cnt)) if $cnt > 0;
+  }
   $self->action_list;
 }