Revision a59c4c73
Von Bernd Bleßmann vor mehr als 3 Jahren hinzugefügt
bin/mozilla/ir.pl | ||
---|---|---|
260 | 260 |
|
261 | 261 |
$is_linked_bank_transaction = 1; |
262 | 262 |
} |
263 |
|
|
264 |
my $create_post_action = sub { |
|
265 |
# $_[0]: description |
|
266 |
# $_[1]: after_action |
|
267 |
action => [ |
|
268 |
$_[0], |
|
269 |
submit => [ '#form', { action => "post", after_action => $_[1] } ], |
|
270 |
checks => [ 'kivi.validate_form' ], |
|
271 |
checks => [ 'kivi.validate_form', 'kivi.AP.check_fields_before_posting', 'kivi.AP.check_duplicate_invnumber' ], |
|
272 |
disabled => !$may_edit_create ? t8('You must not change this invoice.') |
|
273 |
: $form->{locked} ? t8('The billing period has already been locked.') |
|
274 |
: $form->{storno} ? t8('A canceled invoice cannot be posted.') |
|
275 |
: ($form->{id} && $change_never) ? t8('Changing invoices has been disabled in the configuration.') |
|
276 |
: ($form->{id} && $change_on_same_day_only) ? t8('Invoices can only be changed on the day they are posted.') |
|
277 |
: $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.') |
|
278 |
: undef, |
|
279 |
], |
|
280 |
}; |
|
281 |
|
|
282 |
my @post_entries; |
|
283 |
if ($::instance_conf->get_ir_add_doc && $::instance_conf->get_doc_storage) { |
|
284 |
@post_entries = ( $create_post_action->(t8('Post'), 'doc-tab') ); |
|
285 |
} elsif ($::instance_conf->get_doc_storage) { |
|
286 |
@post_entries = ( $create_post_action->(t8('Post')), |
|
287 |
$create_post_action->(t8('Post and upload document'), 'doc-tab') ); |
|
288 |
} else { |
|
289 |
@post_entries = ( $create_post_action->(t8('Post')) ); |
|
290 |
} |
|
291 |
|
|
263 | 292 |
for my $bar ($::request->layout->get('actionbar')) { |
264 | 293 |
$bar->add( |
265 | 294 |
action => [ |
... | ... | |
269 | 298 |
accesskey => 'enter', |
270 | 299 |
disabled => !$may_edit_create ? t8('You must not change this invoice.') : undef, |
271 | 300 |
], |
272 |
|
|
273 | 301 |
combobox => [ |
274 |
action => [ |
|
275 |
t8('Post'), |
|
276 |
submit => [ '#form', { action => "post" } ], |
|
277 |
checks => [ 'kivi.validate_form' ], |
|
278 |
checks => [ 'kivi.validate_form', 'kivi.AP.check_fields_before_posting', 'kivi.AP.check_duplicate_invnumber' ], |
|
279 |
disabled => !$may_edit_create ? t8('You must not change this invoice.') |
|
280 |
: $form->{locked} ? t8('The billing period has already been locked.') |
|
281 |
: $form->{storno} ? t8('A canceled invoice cannot be posted.') |
|
282 |
: ($form->{id} && $change_never) ? t8('Changing invoices has been disabled in the configuration.') |
|
283 |
: ($form->{id} && $change_on_same_day_only) ? t8('Invoices can only be changed on the day they are posted.') |
|
284 |
: $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.') |
|
285 |
: undef, |
|
286 |
], |
|
302 |
@post_entries, |
|
287 | 303 |
action => [ |
288 | 304 |
t8('Post Payment'), |
289 | 305 |
submit => [ '#form', { action => "post_payment" } ], |
... | ... | |
938 | 954 |
# /saving the history |
939 | 955 |
|
940 | 956 |
my $redirect_url; |
941 |
if ($::instance_conf->get_ir_add_doc && $::instance_conf->get_doc_storage) {
|
|
957 |
if ('doc-tab' eq $form->{after_action}) {
|
|
942 | 958 |
$redirect_url = build_std_url("script=ir.pl", 'action=edit', 'id=' . E($form->{id}), 'fragment=ui-tabs-docs'); |
943 | 959 |
} else { |
944 | 960 |
$redirect_url = build_std_url("script=ir.pl", 'action=edit', 'id=' . E($form->{id})); |
Auch abrufbar als: Unified diff
Ek-Rg: verschiedene Buchungs-Aktionen je nach Mandantenkonfig
- DMS aus: Verhalten wie zuvor
- DMS an und "Dokumente für Dialogbuchung hinzufügen" eingestellt:
"Buchen" bucht und führt im selben Beleg zum DMS-Tab.
- DMS an und "Dokumente für Dialogbuchung hinzufügen" ausgestellt:
"Buchen" (Haupt-Aktion) bucht und führt zum selben Beleg (wie vorher).
Es gibt eine zweite Aktion "Buchen und Dokument hochladen". Diese bucht und
führt im selben Beleg zum DMS-Tab.