Bug 3482 Allow hold notices to be sent in print form
[koha.git] / C4 / Letters.pm
index 3c6ff15..cf3e215 100644 (file)
@@ -41,7 +41,7 @@ BEGIN {
        $VERSION = 3.01;
        @ISA = qw(Exporter);
        @EXPORT = qw(
-       &GetLetters &getletter &addalert &getalert &delalert &findrelatedto &SendAlerts
+       &GetLetters &getletter &addalert &getalert &delalert &findrelatedto &SendAlerts GetPrintMessages
        );
 }
 
@@ -667,6 +667,26 @@ sub GetRSSMessages {
                                    borrowernumber         => $params->{'borrowernumber'}, } );
 }
 
+=head2 GetPrintMessages
+
+=over 4
+
+my $message_list = GetPrintMessages( { borrowernumber => $borrowernumber } )
+
+Returns a arrayref of all queued print messages (optionally, for a particular
+person).
+
+=back
+
+=cut
+
+sub GetPrintMessages {
+    my $params = shift || {};
+    
+    return _get_unsent_messages( { message_transport_type => 'print',
+                                   borrowernumber         => $params->{'borrowernumber'}, } );
+}
+
 =head2 GetQueuedMessages ([$hashref])
 
 =over 4