[Koha-patches] [PATCH] [SIGNED-OFF] Bug 5197: add <<today>> token to notices

Nicole C. Engard nengard at bywatersolutions.com
Mon Jul 11 19:49:51 CEST 2011


From: Ian Walls <ian.walls at bywatersolutions.com>

implements for Overdue notices

Signed-off-by: Nicole C. Engard <nengard at bywatersolutions.com>
---
 misc/cronjobs/overdue_notices.pl |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl
index bc97ecb..e605451 100755
--- a/misc/cronjobs/overdue_notices.pl
+++ b/misc/cronjobs/overdue_notices.pl
@@ -644,6 +644,9 @@ sub parse_letter { # FIXME: this code should probably be moved to C4::Letters:pa
         return unless exists $params->{$required};
     }
 
+   my $todaysdate = C4::Dates->new()->output("syspref");
+   $params->{'letter'}->{title}   =~ s/<<today>>/$todaysdate/g;
+   $params->{'letter'}->{content} =~ s/<<today>>/$todaysdate/g;
 
     if ( $params->{'substitute'} ) {
         while ( my ( $key, $replacedby ) = each %{ $params->{'substitute'} } ) {
-- 
1.7.2.3



More information about the Koha-patches mailing list