From e033a41f06168fb8c61de22c7ec8910d88a2e775 Mon Sep 17 00:00:00 2001 From: Garry Collum Date: Thu, 24 Sep 2009 13:18:49 -0400 Subject: [PATCH] Bug 2505: Enables warnings in members/mancredit.pl and maninvoice.pl Fixes resulting warnings. Also corrects a couple of minor typos. Signed-off-by: Galen Charlton --- members/mancredit.pl | 6 ++++-- members/maninvoice.pl | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/members/mancredit.pl b/members/mancredit.pl index c2b49bd952..f122ea8277 100755 --- a/members/mancredit.pl +++ b/members/mancredit.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -#wrriten 11/1/2000 by chris@katipo.oc.nz +#written 11/1/2000 by chris@katipo.oc.nz #script to display borrowers account details @@ -22,6 +22,8 @@ # Suite 330, Boston, MA 02111-1307 USA use strict; +use warnings; + use C4::Auth; use C4::Output; use CGI; @@ -43,7 +45,7 @@ if ($add){ my $barcode=$input->param('barcode'); my $itemnum = GetItemnumberFromBarcode($barcode) if $barcode; my $desc=$input->param('desc'); - my $amount=$input->param('amount'); + my $amount=$input->param('amount') || 0; $amount = -$amount; my $type=$input->param('type'); manualinvoice($borrowernumber,$itemnum,$desc,$type,$amount); diff --git a/members/maninvoice.pl b/members/maninvoice.pl index ff0b9ff5be..34c2349dce 100755 --- a/members/maninvoice.pl +++ b/members/maninvoice.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -#wrriten 11/1/2000 by chris@katipo.oc.nz +#written 11/1/2000 by chris@katipo.oc.nz #script to display borrowers account details @@ -22,6 +22,8 @@ # Suite 330, Boston, MA 02111-1307 USA use strict; +use warnings; + use C4::Auth; use C4::Output; use CGI; -- 2.39.5