X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fap.pl;h=f62294eaa7d2372d25c99464dc30f8cac9b1ab5d;hb=06eebe9868a3890f47d128eeeded938441df8f21;hp=c97460877ea9db3500d9e424979d66d3592d8ad7;hpb=b02735f55360e5a4e02dca40458b48cf057ecd7b;p=kivitendo-erp.git diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index c97460877..f62294eaa 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -195,7 +195,7 @@ sub form_header { my $form = $main::form; my %myconfig = %main::myconfig; my $locale = $main::locale; - my $cgi = $main::cgi; + my $cgi = $::request->{cgi}; $main::auth->assert('general_ledger'); @@ -285,7 +285,8 @@ sub form_header { my $notes = qq||; - my $department = qq| + my $department; + $department = qq| | . $locale->text('Department') . qq| @@ -715,7 +716,7 @@ $jsscript $exchangerate = qq|{"exchangerate_$i"}>|; } else { - $exchangerate = qq|$form->{"exchangerate_$i"}|. + $exchangerate = qq|{"exchangerate_$i"}>$form->{"exchangerate_$i"}|; } } @@ -781,12 +782,12 @@ $jsscript qq|{"paid_project_id_$i"}>|; } - $column_data{"paid_$i"} = $paid; - $column_data{"AP_paid_$i"} = $AP_paid; - $column_data{"exchangerate_$i"} = qq|$exchangerate|; - $column_data{"datepaid_$i"} = $datepaid; - $column_data{"source_$i"} = $source; - $column_data{"memo_$i"} = $memo; + $column_data{"paid_$i"} = $paid; + $column_data{"AP_paid_$i"} = $AP_paid; + $column_data{"exchangerate_$i"} = qq|$exchangerate|; + $column_data{"datepaid_$i"} = $datepaid; + $column_data{"source_$i"} = $source; + $column_data{"memo_$i"} = $memo; $column_data{"paid_project_id_$i"} = $paid_project_id; map { print qq|$column_data{"${_}_$i"}\n| } @column_index; @@ -836,7 +837,7 @@ sub form_footer { my $form = $main::form; my %myconfig = %main::myconfig; my $locale = $main::locale; - my $cgi = $main::cgi; + my $cgi = $::request->{cgi}; $main::auth->assert('general_ledger'); @@ -1079,6 +1080,8 @@ sub post { $main::auth->assert('general_ledger'); + my ($inline) = @_; + # check if there is a vendor, invoice and due date $form->isblank("transdate", $locale->text("Invoice Date missing!")); $form->isblank("duedate", $locale->text("Due Date missing!")); @@ -1153,7 +1156,7 @@ sub post { # /saving the history remove_draft() if $form->{remove_draft}; # Dieser Text wird niemals ausgegeben: Probleme beim redirect? - $form->redirect($locale->text('Transaction posted!')); + $form->redirect($locale->text('Transaction posted!')) unless $inline; } else { $form->error($locale->text('Cannot post transaction!')); }