From 8b402f82dfac4c6e3b98b7c607ed7b0227d9f84f Mon Sep 17 00:00:00 2001 From: Joe Atzberger Date: Tue, 20 Jan 2009 19:18:22 -0600 Subject: [PATCH] Prevent js failure if syspref "gist" is undefined. The javascript is malformed and therefore fails the onsubmit check if gist does not receive a value. This patch allows failover to default 0. Also removed an unused dbh. Signed-off-by: Galen Charlton --- acqui/neworderempty.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index 8baa60b7af..df23586cc9 100755 --- a/acqui/neworderempty.pl +++ b/acqui/neworderempty.pl @@ -94,7 +94,6 @@ my $suggestionid = $input->param('suggestionid'); my $close = $input->param('close'); my $data; my $new; -my $dbh = C4::Context->dbh; if ( $ordnum eq '' ) { # create order $new = 'yes'; @@ -262,7 +261,7 @@ $template->param( nocalc => $bookseller->{'nocalc'}, name => $bookseller->{'name'}, currency => $bookseller->{'listprice'}, - gstrate => C4::Context->preference("gist"), + gstrate => C4::Context->preference("gist") || 0, loop_currencies => \@loop_currency, orderexists => ( $new eq 'yes' ) ? 0 : 1, title => $data->{'title'}, -- 2.39.5