Revision 48508b25
Von Tamino Steinert vor 6 Monaten hinzugefügt
bin/mozilla/ar.pl | ||
---|---|---|
908 | 908 |
$main::lxdebug->leave_sub(); |
909 | 909 |
} |
910 | 910 |
|
911 |
sub post_and_close { |
|
912 |
$main::lxdebug->enter_sub(); |
|
913 |
$main::auth->assert('ar_transactions'); |
|
914 |
my $locale = $main::locale; |
|
915 |
my $form = $::form; |
|
916 |
|
|
917 |
# inline post |
|
918 |
post(1); |
|
919 |
|
|
920 |
my $callback = $form->{callback} |
|
921 |
|| "controller.pl?action=LoginScreen/user_login"; |
|
922 |
my $msg = $locale->text("AR transaction '#1' posted (ID: #2)", $form->{invnumber}, $form->{id}); |
|
923 |
SL::Helper::Flash::flash_later('info', $msg); |
|
924 |
print $form->redirect_header($callback); |
|
925 |
$::dispatcher->end_request; |
|
926 |
|
|
927 |
$main::lxdebug->leave_sub(); |
|
928 |
} |
|
929 |
|
|
911 | 930 |
sub use_as_new { |
912 | 931 |
$main::lxdebug->enter_sub(); |
913 | 932 |
|
... | ... | |
1522 | 1541 |
: $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.') |
1523 | 1542 |
: undef, |
1524 | 1543 |
], |
1544 |
action => [ |
|
1545 |
t8('Post and Close'), |
|
1546 |
submit => [ '#form', { action => "post_and_close" } ], |
|
1547 |
checks => [ 'kivi.validate_form', 'kivi.AR.check_fields_before_posting' ], |
|
1548 |
disabled => !$may_edit_create ? t8('You must not change this AR transaction.') |
|
1549 |
: $is_closed ? t8('The billing period has already been locked.') |
|
1550 |
: $is_storno ? t8('A canceled invoice cannot be posted.') |
|
1551 |
: ($::form->{id} && $change_never) ? t8('Changing invoices has been disabled in the configuration.') |
|
1552 |
: ($::form->{id} && $change_on_same_day_only) ? t8('Invoices can only be changed on the day they are posted.') |
|
1553 |
: $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.') |
|
1554 |
: undef, |
|
1555 |
], |
|
1525 | 1556 |
action => [ |
1526 | 1557 |
t8('Post Payment'), |
1527 | 1558 |
submit => [ '#form', { action => "post_payment" } ], |
Auch abrufbar als: Unified diff
Speichern/Buchen und schließen zu Belegen hinzufügt