X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=maninvoice.pl;h=62d3d6fb06d61bfb69ca6bae03c22795461372e3;hb=a1fb264dad93a800462a143917331f9ec3aab7e1;hp=ac323c418d9df200092de9c7cf674a745713368e;hpb=3d03be3c86ec619144682d25701690a5ccc38c60;p=koha.git diff --git a/maninvoice.pl b/maninvoice.pl index ac323c418d..62d3d6fb06 100755 --- a/maninvoice.pl +++ b/maninvoice.pl @@ -22,7 +22,9 @@ # Suite 330, Boston, MA 02111-1307 USA use strict; +use C4::Auth; use C4::Output; +use C4::Interface::CGI::Output; use CGI; use C4::Search; use C4::Accounts2; @@ -41,9 +43,20 @@ if ($add){ my $amount=$input->param('amount'); my $type=$input->param('type'); manualinvoice($bornum,$itemnum,$desc,$type,$amount); - print $input->redirect("/cgi-bin/koha/moremember.pl?bornum=$bornum"); + print $input->redirect("/cgi-bin/koha/boraccount.pl?bornum=$bornum"); } else { - my $template=gettemplate("maninvoice.tmpl"); - $template->param( bornum => $bornum); - print "Content-Type: text/html\n\n", $template->output; + my ($template, $loggedinuser, $cookie) + = get_template_and_user({template_name => "maninvoice.tmpl", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => {borrowers => 1}, + debug => 1, + }); + $template->param(bornum => $bornum); + print $input->header( + -type => guesstype($template->output), + -cookie => $cookie + ),$template->output; + }