From aabbc76dd022209d7e347fa260646e1efcad58e8 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 11 Aug 2006 14:10:12 +0000 Subject: [PATCH] added org holds address, updated default layout some git-svn-id: svn://svn.open-ils.org/ILS/trunk@5458 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../hold_notification_template.example | 2 +- .../OpenILS/Application/Circ/HoldNotify.pm | 28 ++++++++++--------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Open-ILS/examples/hold_notification_template.example b/Open-ILS/examples/hold_notification_template.example index 5e1535338b..5a517b95d1 100644 --- a/Open-ILS/examples/hold_notification_template.example +++ b/Open-ILS/examples/hold_notification_template.example @@ -14,7 +14,7 @@ ${LIBRARY_ADDRESS} ${PATRON_NAME} ${PATRON_ADDRESS} - Hold Available for Pickup + Hold Available for Pickup The item you requested is available for pickup from the Library. Contact the Circulation Desk to check out the diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/HoldNotify.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/HoldNotify.pm index 3b857f7a6e..95498170c9 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/HoldNotify.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/HoldNotify.pm @@ -187,7 +187,6 @@ sub extract_data { my $patron = $self->patron; my $o_name = $self->pickup_lib->name; - my $o_addr = $self->pickup_lib->holds_address; my $p_name = $patron->first_given_name .' '.$patron->family_name; # try to find a suitable address for the patron @@ -204,17 +203,20 @@ sub extract_data { unless( defined $p_addrs ) { $p_addrs = - $p_addr->street1."\n". - $p_addr->street2."\n". - $p_addr->city."\n". - $p_addr->state."\n". - $p_addr->post_code."\n"; + $p_addr->street1." ". + $p_addr->street2." ". + $p_addr->city." ". + $p_addr->state." ". + $p_addr->post_code; } - my @time = localtime(); - my $day = $time[3]; - my $month = $time[4] + 1; - my $year = $time[5] + 1900; + my $l_addr = $e->retrieve_actor_org_address($self->pickup_lib->holds_address); + my $l_addrs = (!$l_addr) ? "" : + $l_addr->street1." ". + $l_addr->street2." ". + $l_addr->city." ". + $l_addr->state." ". + $l_addr->post_code; my $title; my $author; @@ -233,8 +235,8 @@ sub extract_data { return { patron_email => $self->patron->email, - pickup_lib_name => $o_name, - pickup_lib_addr => $o_addr, + pickup_lib_name => $o_name, + pickup_lib_addr => $l_addrs, patron_name => $p_name, patron_addr => $p_addrs, title => $title, @@ -275,7 +277,7 @@ sub flesh_template { my( $self, $str ) = @_; return undef unless $str; - my @time = localtime(); + my @time = CORE::localtime(); my $day = $time[3]; my $month = $time[4] + 1; my $year = $time[5] + 1900; -- 2.43.2