From 55a380fc6a132ce618bfbee813779781bfbfa483 Mon Sep 17 00:00:00 2001 From: Bernd Blessmann Date: Sat, 1 Oct 2011 09:35:08 +0200 Subject: [PATCH] post auch als inline aufrufbar damit es von einem Skript aus benutzt werden kann. --- bin/mozilla/ap.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index bcd858ade..361d43272 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -1079,6 +1079,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 +1155,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!')); } -- 2.20.1