From 2331a2d8e0052950334d25cbdc58ec01f6d7fbb8 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. --- misc/cronjobs/advance_notices.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/misc/cronjobs/advance_notices.pl b/misc/cronjobs/advance_notices.pl index 3ca4835..1fa358f 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'}; -- 1.7.4.1