From: Jan Büren Date: Tue, 11 May 2021 06:42:08 +0000 (+0200) Subject: Prüfung ob nach einer Buchung noch ein Beleg erfasst werden soll X-Git-Tag: kivitendo-mebil_0.1-0~9^2~236 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=39bdd9e00b88bd6a32276b1a25dfb158a6f382c2;p=kivitendo-erp.git Prüfung ob nach einer Buchung noch ein Beleg erfasst werden soll --- diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index c993d9ed7..710013e39 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -860,11 +860,15 @@ sub post { # no restore_from_session_id needed. we like to have a newly generated # list of invoices for bank transactions print $form->redirect_header($form->{callback}) if ($form->{callback} =~ /BankTransaction/); - $form->redirect($locale->text('AP transaction posted.') . ' ' . $locale->text('ID') . ': ' . $form->{id}) unless $inline; - # TODO Add callback/return flag in myconfig # With version 3.5 we can add documents, but only after posting. there should be a flag in myconfig for the user # $form->{callback} ||= 'ap.pl?action=edit&id=' . $form->{id} if $myconfig{no_reset_arap}; + # or a client config setting + if ($::instance_conf->get_ap_add_doc && $::instance_conf->get_doc_storage) { + my $add_doc_url = build_std_url("script=ap.pl", 'action=edit', 'id=' . E($form->{id})); + print $form->redirect_header($add_doc_url); + } + $form->redirect($locale->text('AP transaction posted.') . ' ' . $locale->text('ID') . ': ' . $form->{id}) unless $inline; } else { $form->error($locale->text('Cannot post transaction!')); } diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index d88cb2d14..17b87476b 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -817,6 +817,10 @@ 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); + } $form->redirect($locale->text('AR transaction posted.') . ' ' . $locale->text('ID') . ': ' . $form->{id}) unless $inline; $main::lxdebug->leave_sub(); diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 16aaf775a..886d756f8 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -1395,6 +1395,10 @@ sub post_transaction { if ($form->{callback} =~ /BankTransaction/ && $form->{bt_id}) { print $form->redirect_header($form->{callback}); $form->redirect($locale->text('GL transaction posted.') . ' ' . $locale->text('ID') . ': ' . $form->{id}); + } elsif ($::instance_conf->get_gl_add_doc && $::instance_conf->get_doc_storage) { + my $add_doc_url = build_std_url("script=gl.pl", 'action=edit', 'id=' . E($form->{id})); + print $form->redirect_header($add_doc_url); + $form->redirect($locale->text('GL transaction posted.') . ' ' . $locale->text('ID') . ': ' . $form->{id}); } # remove or clarify diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index da168a228..0b9a4b227 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -935,6 +935,11 @@ sub post { $form->save_history; } # /saving the history + # I keep the old default / comment for refactorer, pls check instance_conf: + #if ($::instance_conf->get_ir_add_doc && $::instance_conf->get_doc_storage) { + # my $add_doc_url = build_std_url("script=ir.pl", 'action=edit', 'id=' . E($form->{id})); + # print $form->redirect_header($add_doc_url); + #} $form->{callback} = 'ir.pl?action=edit&id=' . $form->{id}; $form->redirect( $locale->text('Invoice') . " $form->{invnumber} " diff --git a/doc/changelog b/doc/changelog index ee47ba4b3..a8b4d8145 100644 --- a/doc/changelog +++ b/doc/changelog @@ -36,6 +36,10 @@ Mittelgroße neue Features: Mahnung Kleinere neue Features und Detailverbesserungen: + - Falls der Mandant zu jeder Buchung einen Beleg hinzufügen möchte, + ist dies jetzt in der Mandantenkonfiguration einstellbar und falls + zusätzlich die DMS Funktion aktiv ist, bleibt der Bearbeiter nach + dem Erfassen einer Buchung in der Maske und kann einen Beleg hinzufügen - Ausgelagerte Lieferscheinen können zurückgelagerte werden insofern der konfigurierbare Zurücklagerungszeitraum noch nicht überschritten ist. - Angebote und Aufträge im Ein- und Verkauf können optionale Positionen enthalten. diff --git a/locale/de/all b/locale/de/all index e4c39b99a..aa18fb049 100755 --- a/locale/de/all +++ b/locale/de/all @@ -208,6 +208,10 @@ $self->{texts} = { 'Add custom data export query' => 'Benutzerdefinierte Datenexport-Abfrage erfassen', 'Add custom variable' => 'Benutzerdefinierte Variable erfassen', 'Add department' => 'Abteilung hinzufügen', + 'Add document for AP transactions' => 'Dokumente für Kreditorenbuchung hinzufügen (benötigt DMS)', + 'Add document for AR transactions' => 'Dokumente für Debitorenbuchung hinzufügen (benötigt DMS)', + 'Add document for GL transactions' => 'Dokumente für Dialogbuchung hinzufügen (benötigt DMS)', + 'Add document for Purchase invoices' => 'Dokumente für Einkaufsrechnung hinzufügen (benötigt DMS)', 'Add empty line (csv_import)' => 'Leere Zeile einfügen', 'Add function block' => 'Funktionsblock hinzufügen', 'Add greeting' => 'Anrede hinzufügen', @@ -3067,6 +3071,7 @@ $self->{texts} = { 'Show delivery value report' => 'Lieferwertbericht anzeigen', 'Show details' => 'Details anzeigen', 'Show details and reports of parts, services, assemblies' => 'Details und Berichte von Waren, Dienstleistungen und Erzeugnissen anzeigen', + 'Show document tab after posting?' => 'Buchungsmaske nicht verlassen', 'Show documents in WebDAV' => 'Dokumente im WebDAV anzeigen', 'Show documents in file storage' => 'Dokumente im Dateimanagement anzeigen', 'Show fields used for the best before date?' => 'Felder zur Eingabe des Mindesthaltbarkeitsdatums anzeigen?', diff --git a/locale/en/all b/locale/en/all index 204237ed7..86c8695b2 100644 --- a/locale/en/all +++ b/locale/en/all @@ -208,6 +208,10 @@ $self->{texts} = { 'Add custom data export query' => '', 'Add custom variable' => '', 'Add department' => '', + 'Add document for AP transactions' => '', + 'Add document for AR transactions' => '', + 'Add document for GL transactions' => '', + 'Add document for Purchase invoices' => '', 'Add empty line (csv_import)' => '', 'Add function block' => '', 'Add greeting' => '', @@ -3067,6 +3071,7 @@ $self->{texts} = { 'Show delivery value report' => '', 'Show details' => '', 'Show details and reports of parts, services, assemblies' => '', + 'Show document tab after posting?' => '', 'Show documents in WebDAV' => '', 'Show documents in file storage' => '', 'Show fields used for the best before date?' => '', diff --git a/templates/webpages/client_config/_posting_configuration.html b/templates/webpages/client_config/_posting_configuration.html index 557ee1320..73583eb5f 100644 --- a/templates/webpages/client_config/_posting_configuration.html +++ b/templates/webpages/client_config/_posting_configuration.html @@ -38,22 +38,22 @@ - [% LxERP.t8(' Add document for Purchase invoices') %] + [% LxERP.t8('Add document for Purchase invoices') %] [% L.yes_no_tag('defaults.ir_add_doc', SELF.posting_options, value_key = 'value', title_key = 'title', default = SELF.defaults.ir_add_doc) %] [% LxERP.t8('Show document tab after posting?') %] - [% LxERP.t8(' Add document for AR transactions') %] + [% LxERP.t8('Add document for AR transactions') %] [% L.yes_no_tag('defaults.ar_add_doc', SELF.posting_options, value_key = 'value', title_key = 'title', default = SELF.defaults.ar_add_doc) %] [% LxERP.t8('Show document tab after posting?') %] - [% LxERP.t8(' Add document for AP transactions') %] + [% LxERP.t8('Add document for AP transactions') %] [% L.yes_no_tag('defaults.ap_add_doc', SELF.posting_options, value_key = 'value', title_key = 'title', default = SELF.defaults.ap_add_doc) %] [% LxERP.t8('Show document tab after posting?') %] - [% LxERP.t8(' Add document for GL transactions') %] + [% LxERP.t8('Add document for GL transactions') %] [% L.yes_no_tag('defaults.gl_add_doc', SELF.posting_options, value_key = 'value', title_key = 'title', default = SELF.defaults.gl_add_doc) %] [% LxERP.t8('Show document tab after posting?') %]