[Patches] [PATCH] [SIGNED-OFF] BUG 5607 : Adds parsing of issues fields in

koha-patchbot at kohaaloha.com koha-patchbot at kohaaloha.com
Wed Dec 21 03:12:56 NZDT 2011


From: Sophie Meynieux <sophie.meynieux at biblibre.com>
Date: Mon, 19 Dec 2011 12:31:21 +0100
Subject: [PATCH] [SIGNED-OFF] BUG 5607 : Adds parsing of issues fields in
 overdue letters

Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>
Patch makes it possible to add fields from the issues table to overdue notices.

Template used for testing:
<item>"<<biblio.title>>" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> , Checkout date: <<issues.issuedate>>, Due date: <<issues.date_due>> Fine: <fine>GBP</fine> Checkout date from items: <<items.onloan>></item>

Possible improvements:
- Dates are not formatted according to dateformat system preference
---
 misc/cronjobs/overdue_notices.pl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl
index 27941da..71e6a05 100755
--- a/misc/cronjobs/overdue_notices.pl
+++ b/misc/cronjobs/overdue_notices.pl
@@ -684,6 +684,7 @@ sub parse_letter { # FIXME: this code should probably be moved to C4::Letters:pa
             $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'biblio',      $item->{'biblionumber'} );
             $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'biblioitems', $item->{'biblionumber'} );
             $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'items', $item->{'itemnumber'} );
+            $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'issues', $item->{'itemnumber'} );
             $params->{'letter'}->{'content'} =~ s/(<item>.*<\/item>)/$1\n$item_format/ if scalar(@{$params->{'items'}} > 0);
 
         }
-- 
1.7.5.4


More information about the Patches mailing list