X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/a97574b881103cc09a48152a4f29f8a2cc1c38a3..1c69cfbc1e0344e80d1602780fb9db218d98923a:/SL/Controller/YearEndTransactions.pm diff --git a/SL/Controller/YearEndTransactions.pm b/SL/Controller/YearEndTransactions.pm index a81fa3bbc..522803837 100644 --- a/SL/Controller/YearEndTransactions.pm +++ b/SL/Controller/YearEndTransactions.pm @@ -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; }