From 37c48ccfb2b0893366676741a506e0243db49d40 Mon Sep 17 00:00:00 2001 From: Ian Walls Date: Mon, 3 Oct 2011 10:45:59 -0400 Subject: [PATCH] Bug 5236 Followup: items table information being keyed by biblionumber instead! This patch fixes an error with bugfix 5236; any item-table information in the PREDUE letter was being parsed with biblionumber as the key, instead of itemnumber. Unless itemnumber == biblionumber, this will ALWAYS return the wrong information. I've moved the item table parsing line to within the if ($itemnumber) conditional check, and replaced the key to use the itemnumber instead of the biblionumber. Signed-off-by: Chris Cormack --- misc/cronjobs/advance_notices.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/cronjobs/advance_notices.pl b/misc/cronjobs/advance_notices.pl index 3ca483569f..1fa358f190 100755 --- a/misc/cronjobs/advance_notices.pl +++ b/misc/cronjobs/advance_notices.pl @@ -349,11 +349,11 @@ sub parse_letter { } if ( $params->{'itemnumber'} ) { C4::Letters::parseletter( $params->{'letter'}, 'issues', $params->{'itemnumber'} ); + C4::Letters::parseletter( $params->{'letter'}, 'items', $params->{'itemnumber'} ); } if ( $params->{'biblionumber'} ) { C4::Letters::parseletter( $params->{'letter'}, 'biblio', $params->{'biblionumber'} ); C4::Letters::parseletter( $params->{'letter'}, 'biblioitems', $params->{'biblionumber'} ); - C4::Letters::parseletter( $params->{'letter'}, 'items', $params->{'biblionumber'} ); } return $params->{'letter'}; -- 2.39.5