From: Bernd Bleßmann Date: Thu, 8 Jul 2021 11:17:35 +0000 (+0200) Subject: EK-Rechnung: Bei Verbleib in der Maske nach Buchen Dokumenten-Tab laden X-Git-Tag: kivitendo-mebil_0.1-0~9^2~43 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f850f64b1c76d4f1f5386874d7eda15dd4d3071d;p=kivitendo-erp.git EK-Rechnung: Bei Verbleib in der Maske nach Buchen Dokumenten-Tab laden --- diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 0b9a4b227..069b9a780 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -33,6 +33,7 @@ #====================================================================== use SL::FU; +use SL::Helper::Flash qw(flash_later); use SL::IR; use SL::IS; use SL::DB::BankTransactionAccTrans; @@ -935,17 +936,21 @@ 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} " - . ", " . $locale->text('ID') - . ': ' . $form->{id} . ' ' - . $locale->text('posted!')); + + my $redirect_url; + if ($::instance_conf->get_ir_add_doc && $::instance_conf->get_doc_storage) { + $redirect_url = build_std_url("script=ir.pl", 'action=edit', 'id=' . E($form->{id}), 'fragment=ui-tabs-docs'); + } else { + $redirect_url = build_std_url("script=ir.pl", 'action=edit', 'id=' . E($form->{id})); + } + SL::Helper::Flash::flash_later('info', + $locale->text('Invoice') + . " $form->{invnumber} " + . ", " . $locale->text('ID') + . ': ' . $form->{id} . ' ' + . $locale->text('posted!')); + print $form->redirect_header($redirect_url); + $::dispatcher->end_request; } $form->error($locale->text('Cannot post invoice!')); diff --git a/templates/webpages/ir/form_header.html b/templates/webpages/ir/form_header.html index 7604566aa..680d2d1ff 100644 --- a/templates/webpages/ir/form_header.html +++ b/templates/webpages/ir/form_header.html @@ -14,7 +14,7 @@

[% saved_message %]

[%- FOREACH key = HIDDENS %] - + [% L.hidden_tag(key, $key) %] [%- END %] @@ -33,7 +33,7 @@ [%- END %] [%- IF id %] [%- IF INSTANCE_CONF.get_doc_storage %] -
  • [% 'Documents' | $T8 %]
  • +
  • [% 'Documents' | $T8 %]
  • [% 'Attachments' | $T8 %]
  • [%- END %] [%- IF AUTH.assert('record_links', 1) %] @@ -43,6 +43,10 @@ [%- END %] +[%- IF INSTANCE_CONF.get_doc_storage %] +
    +[%- END %] +
    @@ -201,6 +205,7 @@ [% IF creditwarning != '' %] alert('[% 'Credit Limit exceeded!!!' | $T8 %]'); [% END %] + kivi.File.doc_tab_init('ir_tabs', 'ui-tabs-docs', $('#id').val(), 'purchase_invoice'); }); //-->