X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fap.pl;h=fe978cb2c9f4ae4b9b97fc3b9a9bac65de0dd1fa;hb=103d03fb414002f186353c48e41eeecd76d1e31d;hp=a6e36daaade4f3431a4006d30e7f44c611b6334e;hpb=0070a2500fcd59d65a6f39a7a4e8d5eb9ef6cdbd;p=kivitendo-erp.git diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index a6e36daaa..fe978cb2c 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -154,6 +154,12 @@ sub load_record_template { $::form->{$_} = $form_defaults->{$_} for keys %{ $form_defaults // {} }; flash('info', $::locale->text("The record template '#1' has been loaded.", $template->template_name)); + flash('info', $::locale->text("Payment bookings disallowed. After the booking this record may be " . + "suggested with the amount of '#1' or otherwise has to be choosen manually." . + " No automatic payment booking will be done to chart '#2'.", + $form_defaults->{paid_1_suggestion}, + $form_defaults->{AP_paid_1_suggestion}, + )) if $::form->{no_payment_bookings}; update( keep_rows_without_amount => 1, @@ -817,9 +823,14 @@ sub post { $form->{what_done} = "invoice"; $form->save_history; } - # /saving the history - # Dieser Text wird niemals ausgegeben: Probleme beim redirect? - $form->redirect($locale->text('AP transaction posted.')) unless $inline; + # 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}; + } else { $form->error($locale->text('Cannot post transaction!')); } @@ -1187,8 +1198,8 @@ sub setup_ap_display_form_action_bar { my $closedto = $::form->datetonum($::form->{closedto}, \%::myconfig); my $is_closed = $transdate <= $closedto; - my $change_never = $::instance_conf->get_ar_changeable == 0; - my $change_on_same_day_only = $::instance_conf->get_ar_changeable == 2 && ($::form->current_date(\%::myconfig) ne $::form->{gldate}); + my $change_never = $::instance_conf->get_ap_changeable == 0; + my $change_on_same_day_only = $::instance_conf->get_ap_changeable == 2 && ($::form->current_date(\%::myconfig) ne $::form->{gldate}); my $is_storno = IS->is_storno(\%::myconfig, $::form, 'ap', $::form->{id}); my $has_storno = IS->has_storno(\%::myconfig, $::form, 'ap');