added org holds address, updated default layout some
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 11 Aug 2006 14:10:12 +0000 (14:10 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 11 Aug 2006 14:10:12 +0000 (14:10 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5458 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/examples/hold_notification_template.example
Open-ILS/src/perlmods/OpenILS/Application/Circ/HoldNotify.pm

index 5e15353..5a517b9 100644 (file)
@@ -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
index 3b857f7..9549817 100644 (file)
@@ -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;