Auftrags-Controller: Beleg neu Laden nach Mail
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Wed, 23 Sep 2020 09:13:21 +0000 (11:13 +0200)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Wed, 23 Sep 2020 09:31:40 +0000 (11:31 +0200)
Damit sind auch die verknüpften Belege, in denen die Mail verlinkt ist,
aktualisiert.

SL/Controller/Order.pm

index b9d940a..bf0915b 100644 (file)
@@ -468,11 +468,15 @@ sub action_send_email {
 
   $self->order->update_attributes(intnotes => $intnotes);
 
-  $self->js
-      ->val('#order_intnotes', $intnotes)
-      ->run('kivi.Order.close_email_dialog')
-      ->flash('info', t8('The email has been sent.'))
-      ->render($self);
+  flash_later('info', t8('The email has been sent.'));
+
+  my @redirect_params = (
+    action => 'edit',
+    type   => $self->type,
+    id     => $self->order->id,
+  );
+
+  $self->redirect_to(@redirect_params);
 }
 
 # open the periodic invoices config dialog