Meldungen beim Erstellen von Wiedervorlagen im Kunden/Lieferanten
authorThomas Heck <theck@linet-services.de>
Mon, 5 Aug 2013 11:28:29 +0000 (13:28 +0200)
committerThomas Heck <theck@linet-services.de>
Mon, 5 Aug 2013 11:28:29 +0000 (13:28 +0200)
SL/Controller/CustomerVendor.pm

index 2fabe14..6f253ad 100644 (file)
@@ -117,10 +117,17 @@ sub _save {
     }
 
     if( $self->{note}->subject ne '' && $self->{note}->body ne '' ) {
+
+      if ( !$self->{note_followup}->follow_up_date ) {
+        $::form->error($::locale->text('Date missing!'));
+      }
+
       $self->{note}->trans_id($self->{cv}->id);
       $self->{note}->save();
       $self->{note_followup}->save();
 
+      SL::Helper::Flash::flash_later('info', $::locale->text('Follow-Up saved.'));
+
       $self->{note} = SL::DB::Note->new();
       $self->{note_followup} = SL::DB::FollowUp->new();
     }