koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/C4 Letters.pm [rel_3_0]


From: Antoine Farnault
Subject: [Koha-cvs] koha/C4 Letters.pm [rel_3_0]
Date: Fri, 12 Jan 2007 18:11:06 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_3_0
Changes by:     Antoine Farnault <toins>        07/01/12 18:11:06

Modified files:
        C4             : Letters.pm 

Log message:
        log when claiming an issue.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Letters.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.4.2.7&r2=1.4.2.8

Patches:
Index: Letters.pm
===================================================================
RCS file: /sources/koha/koha/C4/Letters.pm,v
retrieving revision 1.4.2.7
retrieving revision 1.4.2.8
diff -u -b -r1.4.2.7 -r1.4.2.8
--- Letters.pm  22 Dec 2006 15:37:14 -0000      1.4.2.7
+++ Letters.pm  12 Jan 2007 18:11:06 -0000      1.4.2.8
@@ -30,7 +30,7 @@
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
 
 # set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.4.2.7 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.4.2.8 $' =~ /\d+/g;
     shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v );
 };
 
@@ -215,7 +215,8 @@
        return $result;
 }
 
-=head2 sendalert
+=head2 SendAlerts
+
        parameters :
        - $type : the type of alert
        - $externalid : the id of the "object" to query
@@ -304,8 +305,8 @@
             sendmail(%mail);
                        warn "sending to $mail{To} From $mail{From} subj 
$mail{Subject} Mess $mail{Message}";
         }
-        if (C4::Context->preference("Activate_Log")){
-           logaction($userenv->{number},"Acquisition","Send Acquisition claim 
letter","","order list : 
".join(",",@$externalid)."\n$innerletter->{title}\n$innerletter->{content}")
+        if (C4::Context->preference("LetterLog")){
+           logaction($userenv->{number},"ACQUISITION","Send Acquisition claim 
letter","","order list : 
".join(",",@$externalid)."\n$innerletter->{title}\n$innerletter->{content}")
         }
                warn "sending to From $userenv->{emailaddress} subj 
$innerletter->{title} Mess $innerletter->{content}";
     }
@@ -346,19 +347,31 @@
                         Message => "".$innerletter->{content},
                         );
             sendmail(%mail);
+               &logaction(
+                   C4::Context->userenv->{'number'},
+                   "ACQUISITION",
+                   "CLAIM ISSUE",
+                   undef,
+                   "To=".$databookseller->{contemail}.
+                   " Title=".$innerletter->{title}.
+                   " Content=".$innerletter->{content}
+               ) if C4::Context->preference("LetterLog");
         }
                warn "sending to From $userenv->{emailaddress} subj 
$innerletter->{title} Mess $innerletter->{content}";
        }
 }
 
-=head2
+=head2 parseletter
+
        parameters :
        - $letter : a hash to letter fields (title & content useful)
        - $table : the Koha table to parse.
        - $pk : the primary key to query on the $table table
        parse all fields from a table, and replace values in title & content 
with the appropriate value
        (not exported sub, used only internally)
+
 =cut
+
 sub parseletter {
        my ($letter,$table,$pk) = @_;
 #      warn "Parseletter : ($letter,$table,$pk)";




reply via email to

[Prev in Thread] Current Thread [Next in Thread]