Revision f850f64b
Von Bernd Bleßmann vor mehr als 3 Jahren hinzugefügt
bin/mozilla/ir.pl | ||
---|---|---|
33 | 33 |
#====================================================================== |
34 | 34 |
|
35 | 35 |
use SL::FU; |
36 |
use SL::Helper::Flash qw(flash_later); |
|
36 | 37 |
use SL::IR; |
37 | 38 |
use SL::IS; |
38 | 39 |
use SL::DB::BankTransactionAccTrans; |
... | ... | |
935 | 936 |
$form->save_history; |
936 | 937 |
} |
937 | 938 |
# /saving the history |
938 |
# I keep the old default / comment for refactorer, pls check instance_conf: |
|
939 |
#if ($::instance_conf->get_ir_add_doc && $::instance_conf->get_doc_storage) { |
|
940 |
# my $add_doc_url = build_std_url("script=ir.pl", 'action=edit', 'id=' . E($form->{id})); |
|
941 |
# print $form->redirect_header($add_doc_url); |
|
942 |
#} |
|
943 |
$form->{callback} = 'ir.pl?action=edit&id=' . $form->{id}; |
|
944 |
$form->redirect( $locale->text('Invoice') |
|
945 |
. " $form->{invnumber} " |
|
946 |
. ", " . $locale->text('ID') |
|
947 |
. ': ' . $form->{id} . ' ' |
|
948 |
. $locale->text('posted!')); |
|
939 |
|
|
940 |
my $redirect_url; |
|
941 |
if ($::instance_conf->get_ir_add_doc && $::instance_conf->get_doc_storage) { |
|
942 |
$redirect_url = build_std_url("script=ir.pl", 'action=edit', 'id=' . E($form->{id}), 'fragment=ui-tabs-docs'); |
|
943 |
} else { |
|
944 |
$redirect_url = build_std_url("script=ir.pl", 'action=edit', 'id=' . E($form->{id})); |
|
945 |
} |
|
946 |
SL::Helper::Flash::flash_later('info', |
|
947 |
$locale->text('Invoice') |
|
948 |
. " $form->{invnumber} " |
|
949 |
. ", " . $locale->text('ID') |
|
950 |
. ': ' . $form->{id} . ' ' |
|
951 |
. $locale->text('posted!')); |
|
952 |
print $form->redirect_header($redirect_url); |
|
953 |
$::dispatcher->end_request; |
|
949 | 954 |
} |
950 | 955 |
$form->error($locale->text('Cannot post invoice!')); |
951 | 956 |
|
templates/webpages/ir/form_header.html | ||
---|---|---|
14 | 14 |
<p>[% saved_message %]</p> |
15 | 15 |
|
16 | 16 |
[%- FOREACH key = HIDDENS %] |
17 |
<input type="hidden" name="[% HTML.escape(key) %]" value="[% HTML.escape($key) %]">
|
|
17 |
[% L.hidden_tag(key, $key) %]
|
|
18 | 18 |
[%- END %] |
19 | 19 |
<input type="hidden" name="follow_up_trans_id_1" value="[% id %]"> |
20 | 20 |
<input type="hidden" name="follow_up_trans_type_1" value="purchase_invoice"> |
... | ... | |
33 | 33 |
[%- END %] |
34 | 34 |
[%- IF id %] |
35 | 35 |
[%- IF INSTANCE_CONF.get_doc_storage %] |
36 |
<li><a href="controller.pl?action=File/list&file_type=document&object_type=purchase_invoice&object_id=[% HTML.url(id) %]">[% 'Documents' | $T8 %]</a></li>
|
|
36 |
<li><a href="#ui-tabs-docs">[% 'Documents' | $T8 %]</a></li>
|
|
37 | 37 |
<li><a href="controller.pl?action=File/list&file_type=attachment&object_type=purchase_invoice&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li> |
38 | 38 |
[%- END %] |
39 | 39 |
[%- IF AUTH.assert('record_links', 1) %] |
... | ... | |
43 | 43 |
[%- END %] |
44 | 44 |
</ul> |
45 | 45 |
|
46 |
[%- IF INSTANCE_CONF.get_doc_storage %] |
|
47 |
<div id="ui-tabs-docs"></div> |
|
48 |
[%- END %] |
|
49 |
|
|
46 | 50 |
<div id="ui-tabs-basic-data"> |
47 | 51 |
<table width="100%"> |
48 | 52 |
<tr> |
... | ... | |
201 | 205 |
[% IF creditwarning != '' %] |
202 | 206 |
alert('[% 'Credit Limit exceeded!!!' | $T8 %]'); |
203 | 207 |
[% END %] |
208 |
kivi.File.doc_tab_init('ir_tabs', 'ui-tabs-docs', $('#id').val(), 'purchase_invoice'); |
|
204 | 209 |
}); |
205 | 210 |
//--> |
206 | 211 |
</script> |
Auch abrufbar als: Unified diff
EK-Rechnung: Bei Verbleib in der Maske nach Buchen Dokumenten-Tab laden