]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Debitorebuchung: Redirects nach Buchen aufgeräumt …
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Fri, 9 Jul 2021 10:35:01 +0000 (12:35 +0200)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Fri, 9 Jul 2021 10:35:01 +0000 (12:35 +0200)
- kein redirect nach redirect_header. redirect schickt ruft auch
  redirect_header auf, prüft aber, ob schon ein header geschickt wurde
  und bricht dann ab.
- Verbesserte Info-Ausgabe mit Rechnungsnummer.

bin/mozilla/ar.pl
locale/de/all
locale/en/all

index 17b87476b0d03bb228c2db0898f3fc95e7818d33..71f94cce8da808d561f7a9b423fe6a5b281fb3e9 100644 (file)
@@ -50,7 +50,7 @@ use SL::DB::Employee;
 use SL::DB::Invoice;
 use SL::DB::RecordTemplate;
 use SL::DB::Tax;
-use SL::Helper::Flash qw(flash);
+use SL::Helper::Flash qw(flash flash_later);
 use SL::Locale::String qw(t8);
 use SL::Presenter::Tag;
 use SL::Presenter::Chart;
@@ -817,11 +817,18 @@ sub post {
   }
   # /saving the history
 
-  if ($::instance_conf->get_ar_add_doc && $::instance_conf->get_doc_storage) {
-    my $add_doc_url = build_std_url("script=ar.pl", 'action=edit', 'id=' . E($form->{id}));
-    print $form->redirect_header($add_doc_url);
+  if (!$inline) {
+    my $msg = $locale->text("AR transaction '#1' posted (ID: #2)", $form->{invnumber}, $form->{id});
+    if ($::instance_conf->get_ar_add_doc && $::instance_conf->get_doc_storage) {
+      my $add_doc_url = build_std_url("script=ar.pl", 'action=edit', 'id=' . E($form->{id}));
+      SL::Helper::Flash::flash_later('info', $msg);
+      print $form->redirect_header($add_doc_url);
+      $::dispatcher->end_request;
+
+    } else {
+      $form->redirect($msg);
+    }
   }
-  $form->redirect($locale->text('AR transaction posted.') . ' ' . $locale->text('ID') . ': ' . $form->{id}) unless $inline;
 
   $main::lxdebug->leave_sub();
 }
index 74dfbda25727596cd0aac5edfebeb662867bf310..5fc21143044af5f0b593b33b1cbbb53947f0a712 100755 (executable)
@@ -92,7 +92,7 @@ $self->{texts} = {
   'AR Transaction (abbreviation)' => 'D',
   'AR Transaction/AccTrans Item row names' => 'Namen der Rechnungs/Buchungszeilen',
   'AR Transactions'             => 'Debitorenbuchungen',
-  'AR transaction posted.'      => 'Debitorenbuchung verbucht.',
+  'AR transaction \'#1\' posted (ID: #2)' => 'Debitorenbuchung \'#1\' verbucht (Buchungsnummer: #2)',
   'AR transactions changeable'  => 'Änderbarkeit von Debitorenbuchungen',
   'ASSETS'                      => 'AKTIVA',
   'ATTENTION! If you enabled this feature you can not simply turn it off again without taking care that best_before fields are emptied in the database.' => 'ACHTUNG! Wenn Sie diese Einstellung aktivieren, dann können Sie sie später nicht ohne Weiteres deaktivieren, ohne dafür zu sorgen, dass die Felder der Mindeshaltbarkeitsdaten in der Datenbank leer gemacht werden.',
index b0fe87bbb218adfcf87f0f8424d1e118e3173734..ceea86cc34c97b6310cf8b417968d4fbb6b2e356 100644 (file)
@@ -92,7 +92,7 @@ $self->{texts} = {
   'AR Transaction (abbreviation)' => '',
   'AR Transaction/AccTrans Item row names' => '',
   'AR Transactions'             => 'Sales Transactions',
-  'AR transaction posted.'      => '',
+  'AR transaction \'#1\' posted (ID: #2)' => '',
   'AR transactions changeable'  => '',
   'ASSETS'                      => '',
   'ATTENTION! If you enabled this feature you can not simply turn it off again without taking care that best_before fields are emptied in the database.' => '',