From 00feeffa607179138e02324d14a589699ab43f7a Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 27 Oct 2017 09:51:18 -0400 Subject: [PATCH] Bug 18267 [QA Followup] - Supress warnings Signed-off-by: Kyle M Hall --- Koha/Edifact/Line.pm | 6 +++--- t/EdiInvoice.t | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Koha/Edifact/Line.pm b/Koha/Edifact/Line.pm index ccb975c..b8f0743 100644 --- a/Koha/Edifact/Line.pm +++ b/Koha/Edifact/Line.pm @@ -747,9 +747,9 @@ sub pri_price { foreach my $s ( @{ $self->{segs} } ) { if ( $s->tag eq 'PRI' && $s->elem( 0, 0 ) eq $price_qualifier ) { return { - price => $s->elem( 0, 1 ), - type => $s->elem( 0, 2 ), - type_qualifier => $s->elem( 0, 3 ), + price => $s->elem( 0, 1 ) || undef, + type => $s->elem( 0, 2 ) || undef, + type_qualifier => $s->elem( 0, 3 ) || undef, }; } } diff --git a/t/EdiInvoice.t b/t/EdiInvoice.t index 877ce5a..c5a9956 100755 --- a/t/EdiInvoice.t +++ b/t/EdiInvoice.t @@ -70,7 +70,7 @@ my $lineprice = $lines->[7]->price_net; is( $lineprice, 4.55, 'correct net line price returned' ); -my $lineprice = $lines->[7]->price_gross; +$lineprice = $lines->[7]->price_gross; is( $lineprice, 7.99, 'correct gross line price returned' ); -- 2.10.2