View | Details | Raw Unified | Return to bug 8007
Collapse All | Expand All

(-)a/C4/Auth.pm (+2 lines)
Lines 354-359 sub get_template_and_user { Link Here
354
            EnableBorrowerFiles         => C4::Context->preference('EnableBorrowerFiles'),
354
            EnableBorrowerFiles         => C4::Context->preference('EnableBorrowerFiles'),
355
            UseKohaPlugins              => C4::Context->preference('UseKohaPlugins'),
355
            UseKohaPlugins              => C4::Context->preference('UseKohaPlugins'),
356
            UseCourseReserves            => C4::Context->preference("UseCourseReserves"),
356
            UseCourseReserves            => C4::Context->preference("UseCourseReserves"),
357
            useDischarge                => C4::Context->preference('useDischarge'),
357
        );
358
        );
358
    }
359
    }
359
    else {
360
    else {
Lines 454-459 sub get_template_and_user { Link Here
454
            OPACLocalCoverImages         => C4::Context->preference("OPACLocalCoverImages"),
455
            OPACLocalCoverImages         => C4::Context->preference("OPACLocalCoverImages"),
455
            PatronSelfRegistration       => C4::Context->preference("PatronSelfRegistration"),
456
            PatronSelfRegistration       => C4::Context->preference("PatronSelfRegistration"),
456
            PatronSelfRegistrationDefaultCategory => C4::Context->preference("PatronSelfRegistrationDefaultCategory"),
457
            PatronSelfRegistrationDefaultCategory => C4::Context->preference("PatronSelfRegistrationDefaultCategory"),
458
            useDischarge                 => C4::Context->preference('useDischarge'),
457
        );
459
        );
458
460
459
        $template->param(OpacPublic => '1') if ($user || C4::Context->preference("OpacPublic"));
461
        $template->param(OpacPublic => '1') if ($user || C4::Context->preference("OpacPublic"));
(-)a/C4/Discharges.pm (+100 lines)
Line 0 Link Here
1
package C4::Discharges;
2
3
# Copyright 2013 BibLibre
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it under the
8
# terms of the GNU General Public License as published by the Free Software
9
# Foundation; either version 2 of the License, or (at your option) any later
10
# version.
11
#
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License along
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20
=head1 NAME
21
22
C4::Discharges - functions for discharges
23
24
=head1 DESCRIPTION
25
26
This modules allows to retrieve informations about generated discharges
27
28
=cut
29
30
use Modern::Perl;
31
use File::Basename;
32
33
our $debug;
34
use vars qw(@ISA @EXPORT);
35
BEGIN {
36
    $debug = $ENV{DEBUG} || 0;
37
    require Exporter;
38
    @ISA = qw( Exporter );
39
40
    push @EXPORT, qw(
41
      &GetDischarges
42
      &removeUnprocessedDischarges
43
    );
44
45
46
}
47
48
49
=head1 METHODS
50
51
=head2 GetDischarges($borrowernumber)
52
53
    my @list = GetDischarges($borrowernumber);
54
55
    returns the discharges list for a given borrower.
56
57
=cut
58
59
sub GetDischarges {
60
    my $borrowernumber = shift;
61
    return unless $borrowernumber;
62
63
    my $dischargePath    = C4::Context->preference('dischargePath');
64
    my $dischargeWebPath = C4::Context->preference('dischargeWebPath');
65
    my @return;
66
67
    my $pdf_path = qq{$dischargePath/$borrowernumber/*.pdf};
68
    my @files = <$pdf_path>;
69
    foreach (@files) {
70
        my ($file, $dir, $ext) = fileparse("$_");
71
        push @return, $file;
72
    }
73
74
    return @return;
75
}
76
77
=head2 removeUnprocessedDischarges($borrowernumber)
78
79
    removeUnprocessedDischarges($borrowernumber);
80
81
    Removes all discharges with a pending status, because if the process had been complete, the status would be 'sent'
82
83
=cut
84
85
sub removeUnprocessedDischarges {
86
    my $borrowernumber = shift;
87
    return unless $borrowernumber;
88
89
    my $dbh = C4::Context->dbh;
90
    my $query = q{
91
        DELETE FROM message_queue
92
        WHERE borrowernumber=?
93
            AND letter_code='DISCHARGE'
94
            AND status='pending'
95
    };
96
    my $sth = $dbh->prepare($query);
97
    return $sth->execute($borrowernumber);
98
}
99
100
1;
(-)a/C4/Letters.pm (-6 / +14 lines)
Lines 780-786 sub GetRSSMessages { Link Here
780
780
781
=head2 GetPrintMessages
781
=head2 GetPrintMessages
782
782
783
  my $message_list = GetPrintMessages( { borrowernumber => $borrowernumber } )
783
  my $message_list = GetPrintMessages( { borrowernumber => $borrowernumber [, letter_code => $letter_code] } )
784
784
785
Returns a arrayref of all queued print messages (optionally, for a particular
785
Returns a arrayref of all queued print messages (optionally, for a particular
786
person).
786
person).
Lines 789-798 person). Link Here
789
789
790
sub GetPrintMessages {
790
sub GetPrintMessages {
791
    my $params = shift || {};
791
    my $params = shift || {};
792
    
792
793
    return _get_unsent_messages( { message_transport_type => 'print',
793
    return _get_unsent_messages(
794
                                   borrowernumber         => $params->{'borrowernumber'},
794
        {
795
                                 } );
795
            message_transport_type => 'print',
796
            borrowernumber         => $params->{borrowernumber},
797
            letter_code            => $params->{letter_code},
798
        }
799
    );
796
}
800
}
797
801
798
=head2 GetQueuedMessages ([$hashref])
802
=head2 GetQueuedMessages ([$hashref])
Lines 900-908 ENDSQL Link Here
900
            push @query_params, $params->{'message_transport_type'};
904
            push @query_params, $params->{'message_transport_type'};
901
        }
905
        }
902
        if ( $params->{'borrowernumber'} ) {
906
        if ( $params->{'borrowernumber'} ) {
903
            $statement .= ' AND borrowernumber = ? ';
907
            $statement .= ' AND b.borrowernumber = ? ';
904
            push @query_params, $params->{'borrowernumber'};
908
            push @query_params, $params->{'borrowernumber'};
905
        }
909
        }
910
        if ( $params->{letter_code} ) {
911
            $statement .= ' AND letter_code = ? ';
912
            push @query_params, $params->{letter_code};
913
        }
906
        if ( $params->{'limit'} ) {
914
        if ( $params->{'limit'} ) {
907
            $statement .= ' limit ? ';
915
            $statement .= ' limit ? ';
908
            push @query_params, $params->{'limit'};
916
            push @query_params, $params->{'limit'};
(-)a/C4/Members.pm (-5 / +5 lines)
Lines 2238-2244 sub GetBorrowersNamesAndLatestIssue { Link Here
2238
2238
2239
=head2 DebarMember
2239
=head2 DebarMember
2240
2240
2241
my $success = DebarMember( $borrowernumber, $todate );
2241
my $success = DebarMember( $borrowernumber, $todate, $comment );
2242
2242
2243
marks a Member as debarred, and therefore unable to checkout any more
2243
marks a Member as debarred, and therefore unable to checkout any more
2244
items.
2244
items.
Lines 2249-2263 true on success, false on failure Link Here
2249
=cut
2249
=cut
2250
2250
2251
sub DebarMember {
2251
sub DebarMember {
2252
    my $borrowernumber = shift;
2252
    my ( $borrowernumber, $todate, $comment ) = @_;
2253
    my $todate         = shift;
2254
2253
2255
    return unless defined $borrowernumber;
2254
    return unless defined $borrowernumber;
2256
    return unless $borrowernumber =~ /^\d+$/;
2255
    return unless $borrowernumber =~ /^\d+$/;
2257
2256
2258
    return ModMember(
2257
    return ModMember(
2259
        borrowernumber => $borrowernumber,
2258
        borrowernumber  => $borrowernumber,
2260
        debarred       => $todate
2259
        debarred        => $todate,
2260
        debarredcomment => $comment,
2261
    );
2261
    );
2262
2262
2263
}
2263
}
(-)a/installer/data/mysql/de-DE/mandatory/sample_notices.sql (-1 / +2 lines)
Lines 16-22 VALUES ('circulation','ODUE','Mahnung','Mahnung','Liebe/r <<borrowers.firstname> Link Here
16
('suggestions','ACCEPTED','Anschaffungsvorschlag wurde angenommen', 'Ihr Anschaffungsvorschlag wurde angenommen','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlagen: <<suggestions.title>> by <<suggestions.author>>.\n\nDie Bibliothek hat diesen Titel heute recherchiert und wird Ihn sobald wie möglich im Buchhandel bestellen. Sie erhalten Nachricht, sobald die Bestellung abgeschlossen ist und sobald der Titel in der Bibliotek verfügbar ist.\n\nWenn Sie Fragen haben, richten Sie Ihre Mail bitte an: <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'),
16
('suggestions','ACCEPTED','Anschaffungsvorschlag wurde angenommen', 'Ihr Anschaffungsvorschlag wurde angenommen','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlagen: <<suggestions.title>> by <<suggestions.author>>.\n\nDie Bibliothek hat diesen Titel heute recherchiert und wird Ihn sobald wie möglich im Buchhandel bestellen. Sie erhalten Nachricht, sobald die Bestellung abgeschlossen ist und sobald der Titel in der Bibliotek verfügbar ist.\n\nWenn Sie Fragen haben, richten Sie Ihre Mail bitte an: <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'),
17
('suggestions','AVAILABLE','Vorgeschlagenes Medium verfügbar', 'Das vorgeschlagene Medium ist jetzt verfügbar','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlagen: <<suggestions.title>> von <<suggestions.author>>.\n\nWir freuen uns Ihnen mitteilen zu können, dass dieser Titel jetzt im Bestand der Bibliothek verfügbar ist.\n\nWenn Sie Fragen haben, richten Sie Ihre Mail bitte an: <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'),
17
('suggestions','AVAILABLE','Vorgeschlagenes Medium verfügbar', 'Das vorgeschlagene Medium ist jetzt verfügbar','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlagen: <<suggestions.title>> von <<suggestions.author>>.\n\nWir freuen uns Ihnen mitteilen zu können, dass dieser Titel jetzt im Bestand der Bibliothek verfügbar ist.\n\nWenn Sie Fragen haben, richten Sie Ihre Mail bitte an: <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'),
18
('suggestions','ORDERED','Vorgeschlagenes Medium bestellt', 'Das vorgeschlagene Medium wurde im Buchhandel bestellt','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlaten: <<suggestions.title>> von <<suggestions.author>>.\n\nWir freuen uns Ihnen mitteilen zu können, dass dieser Titel jetzt im Buchhandel bestellt wurde. Nach Eintreffen wird er in unseren Bestand eingearbeitet.\n\nSie erhalten Nachricht, sobald das Medium verfügbar ist.\n\nBei Nachfragen erreichen Sie uns unter der Emailadresse <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'),
18
('suggestions','ORDERED','Vorgeschlagenes Medium bestellt', 'Das vorgeschlagene Medium wurde im Buchhandel bestellt','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlaten: <<suggestions.title>> von <<suggestions.author>>.\n\nWir freuen uns Ihnen mitteilen zu können, dass dieser Titel jetzt im Buchhandel bestellt wurde. Nach Eintreffen wird er in unseren Bestand eingearbeitet.\n\nSie erhalten Nachricht, sobald das Medium verfügbar ist.\n\nBei Nachfragen erreichen Sie uns unter der Emailadresse <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'),
19
('suggestions','REJECTED','Anschaffungsvorschlag nicht angenommen', 'Ihr Anschaffungsvorschlag wurde nicht angenommen','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haven der Bibliothek folgendes Medium zur Anschaffung vorgeschlagen: <<suggestions.title>> von <<suggestions.author>>.\n\nDie Bibliothek hat diesen Titel heute recherchiert und sich gegen eine Anschaffung entschieden.\n\nBegründung: <<suggestions.reason>>\n\nWenn Sie Fragen haben, richten Sie Ihre Mail bitte an: <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>');
19
('suggestions','REJECTED','Anschaffungsvorschlag nicht angenommen', 'Ihr Anschaffungsvorschlag wurde nicht angenommen','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haven der Bibliothek folgendes Medium zur Anschaffung vorgeschlagen: <<suggestions.title>> von <<suggestions.author>>.\n\nDie Bibliothek hat diesen Titel heute recherchiert und sich gegen eine Anschaffung entschieden.\n\nBegründung: <<suggestions.reason>>\n\nWenn Sie Fragen haben, richten Sie Ihre Mail bitte an: <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'),
20
('members', 'DISCHARGE', 'Discharge', 'Discharge for <<borrowers.firstname>> <<borrowers.surname>>', '<h1>Discharge</h1>\r\n\r\nThe library <<borrowers.branchcode>> certifies that the following borrower :\r\n\r\n    <<borrowers.firstname>> <<borrowers.surname>>\r\n   Cardnumber : <<borrowers.cardnumber>>\r\n\r\nreturned all his documents.\r\n\r\n<<today>>');
20
21
21
INSERT INTO `letter` (module, code, name, title, content, is_html)
22
INSERT INTO `letter` (module, code, name, title, content, is_html)
22
VALUES ('circulation','ISSUESLIP','Ausleihquittung (Quittungsdruck)','Ausleihquittung (Quittungsdruck)', '<h3><<branches.branchname>></h3>
23
VALUES ('circulation','ISSUESLIP','Ausleihquittung (Quittungsdruck)','Ausleihquittung (Quittungsdruck)', '<h3><<branches.branchname>></h3>
(-)a/installer/data/mysql/en/mandatory/sample_notices.sql (-1 / +2 lines)
Lines 16-22 VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f Link Here
16
('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
16
('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
17
('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
17
('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
18
('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'),
18
('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'),
19
('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>');
19
('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
20
('members', 'DISCHARGE', 'Discharge', 'Discharge for <<borrowers.firstname>> <<borrowers.surname>>', '<h1>Discharge</h1>\r\n\r\nThe library <<borrowers.branchcode>> certifies that the following borrower :\r\n\r\n    <<borrowers.firstname>> <<borrowers.surname>>\r\n   Cardnumber : <<borrowers.cardnumber>>\r\n\r\nreturned all his documents.\r\n\r\n<<today>>');
20
INSERT INTO `letter` (module, code, name, title, content, is_html)
21
INSERT INTO `letter` (module, code, name, title, content, is_html)
21
VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '<h3><<branches.branchname>></h3>
22
VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '<h3><<branches.branchname>></h3>
22
Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
23
Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
(-)a/installer/data/mysql/es-ES/mandatory/sample_notices.sql (-1 / +2 lines)
Lines 15-19 VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f Link Here
15
('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
15
('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
16
('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
16
('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
17
('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'),
17
('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'),
18
('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>');
18
('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
19
('members', 'DISCHARGE', 'Discharge', 'Discharge for <<borrowers.firstname>> <<borrowers.surname>>', '<h1>Discharge</h1>\r\n\r\nThe library <<borrowers.branchcode>> certifies that the following borrower :\r\n\r\n    <<borrowers.firstname>> <<borrowers.surname>>\r\n   Cardnumber : <<borrowers.cardnumber>>\r\n\r\nreturned all his documents.\r\n\r\n<<today>>');
19
INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','RENEWAL','Item Renewal','Renewals','The following items have been renew:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.');
20
INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','RENEWAL','Item Renewal','Renewals','The following items have been renew:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.');
(-)a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql (-1 / +2 lines)
Lines 17-21 VALUES Link Here
17
('suggestions','ACCEPTED','Suggestion accceptée', 'Suggestion acceptée','Cher(e) <<borrowers.firstname>> <<borrowers.surname>>,\n\nVous avez crée une suggestion d\'achat au sujet du document <<suggestions.title>> de <<suggestions.author>>.\n\nLa Bibliothèque a reçu votre demande ce jour. Nous donnerons suite à votre demande aussi vite que possible. Vous serez averti par courriel dès que la commande sera envoyée,et quand les documents seront arrivés à la Bibliothèque.\n\nSi vous avez des questions, merci de nous contacter à l\'adresse suivante <<branches.branchemail>>.\n\nMerci,\n\n<<branches.branchname>>'),
17
('suggestions','ACCEPTED','Suggestion accceptée', 'Suggestion acceptée','Cher(e) <<borrowers.firstname>> <<borrowers.surname>>,\n\nVous avez crée une suggestion d\'achat au sujet du document <<suggestions.title>> de <<suggestions.author>>.\n\nLa Bibliothèque a reçu votre demande ce jour. Nous donnerons suite à votre demande aussi vite que possible. Vous serez averti par courriel dès que la commande sera envoyée,et quand les documents seront arrivés à la Bibliothèque.\n\nSi vous avez des questions, merci de nous contacter à l\'adresse suivante <<branches.branchemail>>.\n\nMerci,\n\n<<branches.branchname>>'),
18
('suggestions','AVAILABLE','Suggestion disponible', 'Suggestion d\'achat disponible','cher(e) <<borrowers.firstname>> <<borrowers.surname>>,\n\nVous avez effectué une suggestion d\'achat pour le docuement  <<suggestions.title>> de <<suggestions.author>>.\n\nNous sommes heureux de vous informer que le document que vous aviez demandé est maintenant disponible dans nos collections.\n\nSi vous avez des questions, merci de nous contacter par courriel à l\'adresse <<branches.branchemail>>.\n\nMerci,\n\n<<branches.branchname>>'),
18
('suggestions','AVAILABLE','Suggestion disponible', 'Suggestion d\'achat disponible','cher(e) <<borrowers.firstname>> <<borrowers.surname>>,\n\nVous avez effectué une suggestion d\'achat pour le docuement  <<suggestions.title>> de <<suggestions.author>>.\n\nNous sommes heureux de vous informer que le document que vous aviez demandé est maintenant disponible dans nos collections.\n\nSi vous avez des questions, merci de nous contacter par courriel à l\'adresse <<branches.branchemail>>.\n\nMerci,\n\n<<branches.branchname>>'),
19
('suggestions','ORDERED','Suggestion commandée', 'Suggestion commandée','Cher(e) <<borrowers.firstname>> <<borrowers.surname>>,\n\nVous avez effectué une demande de suggestion d\'achat sur le docuement <<suggestions.title>> de <<suggestions.author>>.\n\nNous sommes heureux de vous informer que le document que vous avez demandé est maintenant en commande. Le document devrait arriver rapidement dans nos collections.\n\nVous serez averti quand le docuement sera disponible.\n\nSi vous avez des questions, merci de nous contacter à l\'adresse <<branches.branchemail>>\n\nMerci,\n\n<<branches.branchname>>'),
19
('suggestions','ORDERED','Suggestion commandée', 'Suggestion commandée','Cher(e) <<borrowers.firstname>> <<borrowers.surname>>,\n\nVous avez effectué une demande de suggestion d\'achat sur le docuement <<suggestions.title>> de <<suggestions.author>>.\n\nNous sommes heureux de vous informer que le document que vous avez demandé est maintenant en commande. Le document devrait arriver rapidement dans nos collections.\n\nVous serez averti quand le docuement sera disponible.\n\nSi vous avez des questions, merci de nous contacter à l\'adresse <<branches.branchemail>>\n\nMerci,\n\n<<branches.branchname>>'),
20
('suggestions','REJECTED','Suggestion rejetée', 'Suggestion d\'achat rejeté','Cher(e) <<borrowers.firstname>> <<borrowers.surname>>,\n\nVous avez fait la demande du document <<suggestions.title>> de <<suggestions.author>>.\n\nla Bibliothèque a examiné votre demande ce jour, et a décidé de ne pas retenir la suggestion pour l\'instant.\n\nLa raison est la suivante: <<suggestions.reason>>\n\nSi vous avez des questions, merci de nous contacter à l\'adresse <<branches.branchemail>>.\n\nMerci,\n\n<<branches.branchname>>');
20
('suggestions','REJECTED','Suggestion rejetée', 'Suggestion d\'achat rejeté','Cher(e) <<borrowers.firstname>> <<borrowers.surname>>,\n\nVous avez fait la demande du document <<suggestions.title>> de <<suggestions.author>>.\n\nla Bibliothèque a examiné votre demande ce jour, et a décidé de ne pas retenir la suggestion pour l\'instant.\n\nLa raison est la suivante: <<suggestions.reason>>\n\nSi vous avez des questions, merci de nous contacter à l\'adresse <<branches.branchemail>>.\n\nMerci,\n\n<<branches.branchname>>'),
21
('members', 'DISCHARGE', 'Quitus', 'Quitus pour <<borrowers.firstname>> <<borrowers.surname>>', '<h1>Quitus</h1>\r\n\r\nLa librairie <<borrowers.branchcode>> certifies que lecteur suivant :\r\n\r\n    <<borrowers.firstname>> <<borrowers.surname>>\r\n   Numéro de carte : <<borrowers.cardnumber>>\r\n\r\na bien retourné tous ses documents.\r\n\r\n<<today>>');
21
INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','RENEWAL','Item Renewal','Renewals','Les documents suivants ont été renouvelés\r\n----\r\n<<biblio.title>>\r\n----\r\nMerci, <<branches.branchname>>.');
22
INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','RENEWAL','Item Renewal','Renewals','Les documents suivants ont été renouvelés\r\n----\r\n<<biblio.title>>\r\n----\r\nMerci, <<branches.branchname>>.');
(-)a/installer/data/mysql/it-IT/necessari/notices.sql (-1 / +2 lines)
Lines 15-21 VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f Link Here
15
('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
15
('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
16
('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
16
('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
17
('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'),
17
('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'),
18
('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>');
18
('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
19
('members', 'DISCHARGE', 'Discharge', 'Discharge for <<borrowers.firstname>> <<borrowers.surname>>', '<h1>Discharge</h1>\r\n\r\nThe library <<borrowers.branchcode>> certifies that the following borrower :\r\n\r\n    <<borrowers.firstname>> <<borrowers.surname>>\r\n   Cardnumber : <<borrowers.cardnumber>>\r\n\r\nreturned all his documents.\r\n\r\n<<today>>');
19
INSERT INTO letter (module, code, name, title, content, is_html)
20
INSERT INTO letter (module, code, name, title, content, is_html)
20
VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '<h3><<branches.branchname>></h3>
21
VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '<h3><<branches.branchname>></h3>
21
Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
22
Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
(-)a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql (-1 / +2 lines)
Lines 37-43 VALUES ('circulation','ODUE','Purring','Purring på dokument','<<borrowers.first Link Here
37
('suggestions','ACCEPTED','Forslag godtatt', 'Innkjøpsforslag godtatt','<<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foreslått at biblioteket kjøper inn <<suggestions.title>> av <<suggestions.author>>.\n\nBiblioteket har vurdert forslaget i dag. Dokumentet vil bli bestilt så fort det lar seg gjøre. Du vil få en ny melding når bestillingen er gjort, og når dokumentet ankommer biblioteket.\n\nEr det noe du lurer på, vennligst kontakt oss på <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'),
37
('suggestions','ACCEPTED','Forslag godtatt', 'Innkjøpsforslag godtatt','<<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foreslått at biblioteket kjøper inn <<suggestions.title>> av <<suggestions.author>>.\n\nBiblioteket har vurdert forslaget i dag. Dokumentet vil bli bestilt så fort det lar seg gjøre. Du vil få en ny melding når bestillingen er gjort, og når dokumentet ankommer biblioteket.\n\nEr det noe du lurer på, vennligst kontakt oss på <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'),
38
('suggestions','AVAILABLE','Foreslått dokument tilgjengelig', 'Foreslått dokument tilgjengelig','<<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foreslått at biblioteket kjøper inn <<suggestions.title>> av <<suggestions.author>>.\n\nVi har gleden av å informere deg om at dokumentet nå er innlemmet i samlingen.\n\nEr det noe du lurer på, vennligst kontakt oss på <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'),
38
('suggestions','AVAILABLE','Foreslått dokument tilgjengelig', 'Foreslått dokument tilgjengelig','<<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foreslått at biblioteket kjøper inn <<suggestions.title>> av <<suggestions.author>>.\n\nVi har gleden av å informere deg om at dokumentet nå er innlemmet i samlingen.\n\nEr det noe du lurer på, vennligst kontakt oss på <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'),
39
('suggestions','ORDERED','Innkjøpsforslag i bestilling', 'Innkjøpsforslag i bestilling','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foreslått at biblioteket kjøper inn <<suggestions.title>> av <<suggestions.author>>.\n\nVi har gleden av å informere deg om at dokumentet du foreslo nå er i bestilling.\n\nDu vil få en ny melding når dokumentet er tilgjengelig.\n\nEr det noe du lurer på, vennligst kontakt oss på <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'),
39
('suggestions','ORDERED','Innkjøpsforslag i bestilling', 'Innkjøpsforslag i bestilling','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foreslått at biblioteket kjøper inn <<suggestions.title>> av <<suggestions.author>>.\n\nVi har gleden av å informere deg om at dokumentet du foreslo nå er i bestilling.\n\nDu vil få en ny melding når dokumentet er tilgjengelig.\n\nEr det noe du lurer på, vennligst kontakt oss på <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'),
40
('suggestions','REJECTED','Innkjøpsforslag avslått', 'Innkjøpsforslag avslått','<<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foreslått at biblioteket kjøper inn <<suggestions.title>> av <<suggestions.author>>.\n\nBiblioteket har vurdert innkjøpsforslaget ditt i dag, og bestemt seg for å ikke ta det til følge.\n\nBegrunnelse: <<suggestions.reason>>\n\nEr det noe du lurer på, vennligst kontakt oss på <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>');
40
('suggestions','REJECTED','Innkjøpsforslag avslått', 'Innkjøpsforslag avslått','<<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foreslått at biblioteket kjøper inn <<suggestions.title>> av <<suggestions.author>>.\n\nBiblioteket har vurdert innkjøpsforslaget ditt i dag, og bestemt seg for å ikke ta det til følge.\n\nBegrunnelse: <<suggestions.reason>>\n\nEr det noe du lurer på, vennligst kontakt oss på <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'),
41
('members', 'DISCHARGE', 'Discharge', 'Discharge for <<borrowers.firstname>> <<borrowers.surname>>', '<h1>Discharge</h1>\r\n\r\nThe library <<borrowers.branchcode>> certifies that the following borrower :\r\n\r\n    <<borrowers.firstname>> <<borrowers.surname>>\r\n   Cardnumber : <<borrowers.cardnumber>>\r\n\r\nreturned all his documents.\r\n\r\n<<today>>');
41
INSERT INTO `letter` (module, code, name, title, content, is_html)
42
INSERT INTO `letter` (module, code, name, title, content, is_html)
42
VALUES ('circulation','ISSUESLIP','Utlån','Utlån', '<h3><<branches.branchname>></h3>
43
VALUES ('circulation','ISSUESLIP','Utlån','Utlån', '<h3><<branches.branchname>></h3>
43
Utlånt til <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
44
Utlånt til <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
(-)a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql (-1 / +2 lines)
Lines 17-21 VALUES Link Here
17
('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
17
('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
18
('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
18
('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
19
('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'),
19
('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'),
20
('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>');
20
('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
21
('members', 'DISCHARGE', 'Discharge', 'Discharge for <<borrowers.firstname>> <<borrowers.surname>>', '<h1>Discharge</h1>\r\n\r\nThe library <<borrowers.branchcode>> certifies that the following borrower :\r\n\r\n    <<borrowers.firstname>> <<borrowers.surname>>\r\n   Cardnumber : <<borrowers.cardnumber>>\r\n\r\nreturned all his documents.\r\n\r\n<<today>>');
21
INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','RENEWAL','Item Renewal','Renewals','The following items have been renew:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.');
22
INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','RENEWAL','Item Renewal','Renewals','The following items have been renew:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.');
(-)a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql (-1 / +2 lines)
Lines 15-19 VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f Link Here
15
('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
15
('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
16
('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
16
('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
17
('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'),
17
('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'),
18
('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>');
18
('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
19
('members', 'DISCHARGE', 'Discharge', 'Discharge for <<borrowers.firstname>> <<borrowers.surname>>', '<h1>Discharge</h1>\r\n\r\nThe library <<borrowers.branchcode>> certifies that the following borrower :\r\n\r\n    <<borrowers.firstname>> <<borrowers.surname>>\r\n   Cardnumber : <<borrowers.cardnumber>>\r\n\r\nreturned all his documents.\r\n\r\n<<today>>');
19
INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','RENEWAL','Item Renewal','Renewals','The following items have been renew:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.');
20
INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','RENEWAL','Item Renewal','Renewals','The following items have been renew:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.');
(-)a/installer/data/mysql/sysprefs.sql (+3 lines)
Lines 89-94 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
89
('defaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
89
('defaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
90
('defaultSortOrder','dsc','asc|dsc|az|za','Specify the default sort order','Choice'),
90
('defaultSortOrder','dsc','asc|dsc|az|za','Specify the default sort order','Choice'),
91
('delimiter',';',';|tabulation|,|/|\\|#||','Define the default separator character for exporting reports','Choice'),
91
('delimiter',';',';|tabulation|,|/|\\|#||','Define the default separator character for exporting reports','Choice'),
92
('dischargePath','','','Sets the upload path for the generated discharges','free'),
93
('dischargeWebPath','','','Set the upload path starting from document root for the generated discharges','free'),
92
('Display856uAsImage','OFF','OFF|Details|Results|Both','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','Choice'),
94
('Display856uAsImage','OFF','OFF|Details|Results|Both','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','Choice'),
93
('DisplayClearScreenButton','0','','If set to ON, a clear screen button will appear on the circulation page.','YesNo'),
95
('DisplayClearScreenButton','0','','If set to ON, a clear screen button will appear on the circulation page.','YesNo'),
94
('displayFacetCount','0',NULL,NULL,'YesNo'),
96
('displayFacetCount','0',NULL,NULL,'YesNo'),
Lines 399-404 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
399
('UseControlNumber','0','','If ON, record control number (w subfields) and control number (001) are used for linking of bibliographic records.','YesNo'),
401
('UseControlNumber','0','','If ON, record control number (w subfields) and control number (001) are used for linking of bibliographic records.','YesNo'),
400
('UseCourseReserves','0',NULL,'Enable the course reserves feature.','YesNo'),
402
('UseCourseReserves','0',NULL,'Enable the course reserves feature.','YesNo'),
401
('useDaysMode','Calendar','Calendar|Days|Datedue','Choose the method for calculating due date: select Calendar to use the holidays module, and Days to ignore the holidays module','Choice'),
403
('useDaysMode','Calendar','Calendar|Days|Datedue','Choose the method for calculating due date: select Calendar to use the holidays module, and Days to ignore the holidays module','Choice'),
404
('useDischarge','','','Allows librarians to discharge borrowers and borrowers to request a discharge','YesNo'),
402
('UseICU','0','1','Tell Koha if ICU indexing is in use for Zebra or not.','YesNo'),
405
('UseICU','0','1','Tell Koha if ICU indexing is in use for Zebra or not.','YesNo'),
403
('UseKohaPlugins','0','','Enable or disable the ability to use Koha Plugins.','YesNo'),
406
('UseKohaPlugins','0','','Enable or disable the ability to use Koha Plugins.','YesNo'),
404
('UseQueryParser','0',NULL,'If enabled, try to use QueryParser for queries.','YesNo'),
407
('UseQueryParser','0',NULL,'If enabled, try to use QueryParser for queries.','YesNo'),
(-)a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql (-1 / +2 lines)
Lines 14-18 VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f Link Here
14
('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
14
('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
15
('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
15
('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
16
('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'),
16
('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'),
17
('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>');
17
('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
18
('members', 'DISCHARGE', 'Discharge', 'Discharge for <<borrowers.firstname>> <<borrowers.surname>>', '<h1>Discharge</h1>\r\n\r\nThe library <<borrowers.branchcode>> certifies that the following borrower :\r\n\r\n    <<borrowers.firstname>> <<borrowers.surname>>\r\n   Cardnumber : <<borrowers.cardnumber>>\r\n\r\nreturned all his documents.\r\n\r\n<<today>>');
18
INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','RENEWAL','Item Renewal','Renewals','The following items have been renew:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.');
19
INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','RENEWAL','Item Renewal','Renewals','The following items have been renew:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.');
(-)a/installer/data/mysql/updatedatabase.pl (+11 lines)
Lines 7155-7160 if ( CheckVersion($DBversion) ) { Link Here
7155
    SetVersion($DBversion);
7155
    SetVersion($DBversion);
7156
}
7156
}
7157
7157
7158
7159
$DBversion = "3.13.00.XXX";
7160
if ( CheckVersion($DBversion) ) {
7161
    $dbh->do("INSERT IGNORE INTO `systempreferences` (variable,value,explanation,options,type) VALUES('useDischarge','','Allows librarians to discharge borrowers and borrowers to request a discharge','','YesNo');");
7162
    $dbh->do("INSERT IGNORE INTO `systempreferences` (variable,value,explanation,options,type) VALUES('dischargePath','','Sets the upload path for the generated discharges','','');");
7163
    $dbh->do("INSERT IGNORE INTO `systempreferences` (variable,value,explanation,options,type) VALUES('dischargeWebPath','','Sets the upload path starting from documentroot for the generated discharges','','');");
7164
    $dbh->do("INSERT INTO `letter` (module, code, name, title, content) VALUES('members', 'DISCHARGE', 'Discharge', 'Discharge for <<borrowers.firstname>> <<borrowers.surname>>', '<h1>Discharge</h1>\r\n\r\nThe library <<borrowers.branchcode>> certifies that the following borrower :\r\n\r\n    <<borrowers.firstname>> <<borrowers.surname>>\r\n   Cardnumber : <<borrowers.cardnumber>>\r\n\r\nreturned all his documents.\r\n\r\n<<today>>');");
7165
    print "Upgrade to $DBversion done (Bug 8007 - Add System Preferences useDischarge, dischargePath, dischargeWebpath and discharge notice)\n";
7166
    SetVersion($DBversion);
7167
}
7168
7158
=head1 FUNCTIONS
7169
=head1 FUNCTIONS
7159
7170
7160
=head2 TableExists($table)
7171
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc (+3 lines)
Lines 83-88 Link Here
83
    [% IF EnableBorrowerFiles %]
83
    [% IF EnableBorrowerFiles %]
84
        [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrowernumber %]">Files</a></li>
84
        [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrowernumber %]">Files</a></li>
85
    [% END %]
85
    [% END %]
86
    [% IF CAN_user_borrowers && useDischarge %]
87
        [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% borrowernumber %]">Discharge</a></li>
88
    [% END %]
86
</ul></div>
89
</ul></div>
87
[% END %]
90
[% END %]
88
91
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt (+4 lines)
Lines 82-87 in the global namespace %] Link Here
82
    [% IF EnableBorrowerFiles %]
82
    [% IF EnableBorrowerFiles %]
83
        [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrower.borrowernumber %]">Files</a></li>
83
        [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrower.borrowernumber %]">Files</a></li>
84
    [% END %]
84
    [% END %]
85
    [% IF CAN_user_borrowers && useDischarge %]
86
        [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% borrowernumber %]">Discharge</a></li>
87
    [% END %]
88
85
</ul></div>
89
</ul></div>
86
[% END %]
90
[% END %]
87
91
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/members-menu.inc (+3 lines)
Lines 19-24 Link Here
19
    [% IF EnableBorrowerFiles %]
19
    [% IF EnableBorrowerFiles %]
20
        [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrowernumber %]">Files</a></li>
20
        [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrowernumber %]">Files</a></li>
21
    [% END %]
21
    [% END %]
22
    [% IF CAN_user_borrowers && useDischarge %]
23
        [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% borrowernumber %]">Discharge</a></li>
24
    [% END %]
22
  </ul>
25
  </ul>
23
</div>
26
</div>
24
[% END %]
27
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (+14 lines)
Lines 139-141 Patrons: Link Here
139
               yes: Do
139
               yes: Do
140
               no: "Don't"
140
               no: "Don't"
141
         - enable the ability to upload and attach arbitrary files to a borrower record.
141
         - enable the ability to upload and attach arbitrary files to a borrower record.
142
     -
143
         - pref: useDischarge
144
           choices:
145
               yes: Allows
146
               no: "Don't allow"
147
         - librarians to discharge borrowers and borrowers to request a discharge
148
     -
149
         - pref: dischargePath
150
           class: multi
151
         - Sets the upload path for the generated discharges
152
     -
153
         - pref: dischargeWebPath
154
           class: multi
155
         - Sets the upload path starting from documentroot for the generated discharges
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt (+53 lines)
Line 0 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Patrons &rsaquo; [% IF (unknowuser) %]Patron does not exist[% ELSE %]Discharge for [% firstname %] [% surname %] ([% cardnumber %])[% END %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
</head>
5
<body>
6
[% INCLUDE 'header.inc' %]
7
[% INCLUDE 'patron-search.inc' %]
8
9
<div id="breadcrumbs">
10
         <a href="/cgi-bin/koha/mainpage.pl">Home</a>
11
&rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
12
&rsaquo; [% IF (unknowuser) %]Patron does not exist[% ELSE %]Discharge for [% firstname %] [% surname %] ([% cardnumber %])[% END %]
13
</div>
14
15
<div id="doc3" class="yui-t1">
16
   <div id="bd">
17
    <div id="yui-main">
18
    <div class="yui-b">
19
<div class="yui-g">
20
<h3>Discharge</h3>
21
[% IF path_missing %]<p class="warning">The system preferences dischargePath and dischargeWebPath have to be filled.</p>[% END %]
22
[% IF (error) %]<p class="warning">An error has occured while generating the discharge. Please retry later or contact your administrator.</p>[% END %]
23
[% IF (hasissues) %]
24
    <p>Cannot edit discharge: borrower has issues.</p>
25
[% ELSE %]
26
    [% IF (hasreserves) %]
27
        <p>Borrower has reserves: they will be canceled if the discharge is generated.</p>
28
    [% END %]
29
    [% UNLESS path_missing %]
30
        <form method="post">
31
            <input type="Submit" value="Generate discharge" name="generatedischarge" />
32
            <input type="hidden" value="[% borrowernumber %]" name="borrowernumber" />
33
        </form>
34
    [% END %]
35
[% END %]
36
[% IF (dischargeloop) %]
37
    <br /><br /><h3>Generated discharges</h3>
38
    <ul>
39
    [% FOR discharge IN dischargeloop %]
40
        <li><a href="[% discharge.url %]">[% discharge.filename %]</a></li>
41
    [% END %]
42
    </ul>
43
[% END %]
44
</div>
45
46
47
</div>
48
</div>
49
<div class="yui-b">
50
[% INCLUDE 'circ-menu.inc' %]
51
</div>
52
</div>
53
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc (+3 lines)
Lines 32-37 Link Here
32
  [% IF ( virtualshelves ) %] 
32
  [% IF ( virtualshelves ) %] 
33
  [% IF ( listsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">my lists</a></li>
33
  [% IF ( listsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">my lists</a></li>
34
  [% END %]
34
  [% END %]
35
  [% IF useDischarge %]
36
    [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/opac-discharge.pl">Discharge</a></li>
37
  [% END %]
35
38
36
</ul>
39
</ul>
37
</div>
40
</div>
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-discharge.tt (+53 lines)
Line 0 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% IF (LibraryNameTitle) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog
3
[% INCLUDE 'doc-head-close.inc' %]
4
</head>
5
<body id="opac-search-history">
6
[% IF OpacNav or loggedinusername %]
7
  <div id="doc3" class="yui-t1">
8
[% ELSE %]
9
  <div id="doc3" class="yui-t7">
10
[% END %]
11
<div id="bd">
12
[% INCLUDE 'masthead.inc' %]
13
14
<div id="yui-main">
15
  <div class="yui-b">
16
    <div class="yui-g">
17
      <div id="discharge" class="container">
18
        <h1>Discharge</h1>
19
        [% IF generated %]
20
          [% IF success %]
21
            <p>Your discharge request has been sent. Your discharge will be available on this page within a few days.</p>
22
          [% ELSE %]
23
            <p>Your discharge request could not be sent. Please retry later or contact an administrator.</p>
24
          [% END %]
25
        [% ELSE %]
26
          <h2>What is a discharge?</h2>
27
          <p>This document certifies that you have returned all borrowed items. It is sometimes asked during a file transfer from a school to another. The discharge is sent by us to your school. You will also find it available on your reader account.</p>
28
          <p><strong>Warning</strong>: This request is only valid if you are in good standing with the library. Once the application is made, you can not borrow library materials.</p>
29
          <a href="/cgi-bin/koha/opac-discharge.pl?generate=1">Ask for a discharge</a>
30
        [% END %]
31
        [% IF dischargeloop %]
32
          <h3>Generated discharges</h3>
33
          <ul>
34
            [% FOR discharge IN dischargeloop %]
35
              <li><a href="[% discharge.url %]">[% discharge.filename %]</a></li>
36
            [% END %]
37
          </ul>
38
        [% END %]
39
      </div>
40
    </div>
41
  </div>
42
</div>
43
44
[% IF ( OpacNav || loggedinusername ) %]
45
  <div class="yui-b">
46
    <div class="container">
47
      [% INCLUDE 'navigation.inc' %]
48
      [% INCLUDE 'usermenu.inc' %]
49
    </div>
50
  </div>
51
[% END %]
52
</div>
53
[% INCLUDE 'opac-bottom.inc' %]
(-)a/members/discharge.pl (+173 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
# Copyright 2013 BibLibre SARL
4
# This file is part of Koha.
5
#
6
# Koha is free software; you can redistribute it and/or modify it under the
7
# terms of the GNU General Public License as published by the Free Software
8
# Foundation; either version 2 of the License, or (at your option) any later
9
# version.
10
#
11
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
12
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
14
#
15
# You should have received a copy of the GNU General Public License along
16
# with Koha; if not, write to the Free Software Foundation, Inc.,
17
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
19
=head1 NAME
20
21
discharge.pl
22
23
=head1 DESCRIPTION
24
25
Allows librarian to edit and/or manage borrowers' discharges
26
27
=cut
28
29
use Modern::Perl;
30
31
use CGI;
32
use C4::Auth;
33
use C4::Output;
34
use C4::Members;
35
use C4::Reserves;
36
use C4::Letters;
37
use C4::Discharges;
38
39
use Koha::DateUtils;
40
41
my $input = new CGI;
42
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
43
    template_name   => 'members/discharge.tmpl',
44
    query           => $input,
45
    type            => 'intranet',
46
    authnotrequired => 0,
47
    flagsrequired   => { 'borrowers' => '*' },
48
    debug           => 1,
49
} );
50
51
my $dischargePath    = C4::Context->preference('dischargePath');
52
my $dischargeWebPath = C4::Context->preference('dischargeWebPath');
53
54
my $borrowernumber;
55
my $data;
56
if ( $input->param('borrowernumber') ) {
57
    $borrowernumber = $input->param('borrowernumber');
58
59
    # Getting member data
60
    $data = GetMember( borrowernumber => $borrowernumber );
61
62
    # Getting pending issues
63
    my $issues = GetPendingIssues($borrowernumber);
64
    my $hasissues = scalar(@$issues);
65
66
    # Getting reserves
67
    my @reserves = GetReservesFromBorrowernumber($borrowernumber);
68
    my $hasreserves = scalar(@reserves);
69
70
    # Generating discharge if needed
71
    if ($input->param('generatedischarge')) {
72
        # If borrower has pending reserves, we cancel them
73
        foreach (@reserves) {
74
            CancelReserve($_->{'reservenumber'});
75
        }
76
        $hasreserves = 0;
77
78
        # Debarring member
79
        # Getting librarian's name
80
        my $librarian = GetMember('borrowernumber' => $loggedinuser);
81
        my $librarianname = $librarian->{'firstname'} . " " . $librarian->{'surname'};
82
83
        # Getting today's date
84
        my $date = C4::Dates->new()->output();
85
        # (this is quite ugly, but this is how borrowers seems to be permanently debarred)
86
        # FIXME: Perl strings are not translatable atm, so comment is written in english
87
        C4::Members::DebarMember($borrowernumber, '9999-12-31', "Discharge generated by $librarianname on $date");
88
89
        # Creating message
90
        my $letter = C4::Letters::GetPreparedLetter(
91
            module      => 'members',
92
            letter_code => 'DISCHARGE',
93
            tables      => {
94
                borrowers => $borrowernumber,
95
                branches => $data->{branchcode},
96
            },
97
        );
98
        my $today = output_pref(dt_from_string());
99
        $letter->{'title'}   =~ s/<<today>>/$today/g;
100
        $letter->{'content'} =~ s/<<today>>/$today/g;
101
102
        C4::Letters::EnqueueLetter(
103
            {   letter                 => $letter,
104
                borrowernumber         => $borrowernumber,
105
                message_transport_type => 'print',
106
            }
107
        );
108
109
        # Calling gather_print_notices.pl with borrowernumber and css to create html from letter
110
        # We place the generated html in a per-user directory
111
        # We create the per-user directory if it doesn't exist
112
        mkdir "$dischargePath/$borrowernumber" unless -d "$dischargePath/$borrowernumber";
113
        qx{../misc/cronjobs/gather_print_notices.pl -f discharge -l DISCHARGE -b $borrowernumber $dischargePath/$borrowernumber};
114
115
        # Calling printoverdues.pl in this same user directory
116
        qx{../misc/cronjobs/printoverdues.sh $dischargePath/$borrowernumber};
117
118
        # Error handling:
119
        # Check if we really got our discharge as a pdf file
120
        my $todayiso = output_pref(dt_from_string(), 'iso', 1);
121
        # If we don't, then
122
        unless (-e "$dischargePath/$borrowernumber/discharge-$todayiso.pdf") {
123
            # Show an error message to the librarian
124
            $template->param(error => 1);
125
126
            # Remove the possibly generated html file
127
            unlink "$dischargePath/$borrowernumber/discharge-$todayiso.html";
128
129
            # Remove the unprocessed message from message_queue
130
            removeUnprocessedDischarges($borrowernumber);
131
132
        }
133
134
    }
135
136
    # Getting already generated discharges
137
    my @list = GetDischarges($borrowernumber);
138
    my @loop = map {{ url => $dischargeWebPath . "/" . $borrowernumber . "/" . $_, filename => $_ }} @list;
139
    $template->param("dischargeloop" => \@loop) if (@list);
140
141
142
    $template->param(
143
        borrowernumber    => $borrowernumber,
144
        biblionumber      => $data->{'biblionumber'},
145
        title             => $data->{'title'},
146
        initials          => $data->{'initials'},
147
        surname           => $data->{'surname'},
148
        borrowernumber    => $borrowernumber,
149
        firstname         => $data->{'firstname'},
150
        cardnumber        => $data->{'cardnumber'},
151
        categorycode      => $data->{'categorycode'},
152
        category_type     => $data->{'category_type'},
153
        categoryname      => $data->{'description'},
154
        address           => $data->{'address'},
155
        address2          => $data->{'address2'},
156
        city              => $data->{'city'},
157
        zipcode           => $data->{'zipcode'},
158
        country           => $data->{'country'},
159
        phone             => $data->{'phone'},
160
        email             => $data->{'email'},
161
        branchcode        => $data->{'branchcode'},
162
        hasissues         => $hasissues,
163
        hasreserves       => $hasreserves,
164
    );
165
166
}
167
# Send parameters to template
168
$template->param(
169
    dischargeview => 1,
170
    path_missing  => ( $dischargePath and $dischargeWebPath ) ? 0 : 1,
171
);
172
173
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/misc/cronjobs/gather_print_notices.pl (-8 / +14 lines)
Lines 39-45 use Getopt::Long; Link Here
39
39
40
sub usage {
40
sub usage {
41
    print STDERR <<USAGE;
41
    print STDERR <<USAGE;
42
Usage: $0 OUTPUT_DIRECTORY
42
Usage: $0 [ -b borrowernumber ] [ -l letter_code ] [ -f filename] OUTPUT_DIRECTORY
43
  Will print all waiting print notices to
43
  Will print all waiting print notices to
44
  OUTPUT_DIRECTORY/notices-CURRENT_DATE.html .
44
  OUTPUT_DIRECTORY/notices-CURRENT_DATE.html .
45
45
Lines 48-58 USAGE Link Here
48
    exit $_[0];
48
    exit $_[0];
49
}
49
}
50
50
51
my ( $stylesheet, $help, $split );
51
my ( $stylesheet, $help, $split, $borrowernumber, $letter_code, $filename );
52
52
53
GetOptions(
53
GetOptions(
54
    'h|help'  => \$help,
54
    'h|help'  => \$help,
55
    's|split' => \$split,
55
    's|split' => \$split,
56
    'b:i'     => \$borrowernumber,
57
    'l:s'     => \$letter_code,
58
    'f:s'     => \$filename,
56
) || usage(1);
59
) || usage(1);
57
60
58
usage(0) if ($help);
61
usage(0) if ($help);
Lines 65-72 if ( !$output_directory || !-d $output_directory ) { Link Here
65
    usage(1);
68
    usage(1);
66
}
69
}
67
70
71
my $params = {};
72
$params->{'borrowernumber'} = $borrowernumber if ($borrowernumber);
73
$params->{'letter_code'}    = $letter_code    if ($letter_code);
68
my $today        = C4::Dates->new();
74
my $today        = C4::Dates->new();
69
my @all_messages = @{ GetPrintMessages() };
75
my @all_messages = @{ GetPrintMessages( $params ) };
70
exit unless (@all_messages);
76
exit unless (@all_messages);
71
77
72
## carriage return replaced by <br/> as output is html
78
## carriage return replaced by <br/> as output is html
Lines 112-120 if ($split) { Link Here
112
    }
118
    }
113
}
119
}
114
else {
120
else {
115
    open $OUTPUT, '>',
121
    my $fn = $filename || "holdnotices";
116
      File::Spec->catdir( $output_directory,
122
    my $file=File::Spec->catdir( $output_directory, $fn . "-" . $today->output('iso') . ".html");
117
        "holdnotices-" . $today->output('iso') . ".html" );
123
    open my $fh, '>', $file or die "Can't open file $file : $!";
118
124
119
    my $template =
125
    my $template =
120
      C4::Templates::gettemplate( 'batch/print-notices.tmpl', 'intranet',
126
      C4::Templates::gettemplate( 'batch/print-notices.tmpl', 'intranet',
Lines 126-138 else { Link Here
126
        messages   => \@all_messages,
132
        messages   => \@all_messages,
127
    );
133
    );
128
134
129
    print $OUTPUT $template->output;
135
    print $fh $template->output;
130
136
131
    foreach my $message (@all_messages) {
137
    foreach my $message (@all_messages) {
132
        C4::Letters::_set_message_status(
138
        C4::Letters::_set_message_status(
133
            { message_id => $message->{'message_id'}, status => 'sent' } );
139
            { message_id => $message->{'message_id'}, status => 'sent' } );
134
    }
140
    }
135
141
136
    close $OUTPUT;
142
    close $fh;
137
143
138
}
144
}
(-)a/opac/opac-discharge.pl (-1 / +81 lines)
Line 0 Link Here
0
- 
1
#!/usr/bin/perl
2
3
# Copyright 2013 BibLibre SARL
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it under the
8
# terms of the GNU General Public License as published by the Free Software
9
# Foundation; either version 2 of the License, or (at your option) any later
10
# version.
11
#
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License along
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20
use Modern::Perl;
21
22
use C4::Auth qw(:DEFAULT get_session);
23
use CGI;
24
use C4::Context;
25
use C4::Output;
26
use C4::Log;
27
use C4::Debug;
28
use C4::Branch;
29
use C4::Members;
30
use C4::Discharges;
31
use Mail::Sendmail;
32
33
my $cgi = new CGI;
34
35
my $dischargePath    = C4::Context->preference('dischargePath');
36
my $dischargeWebPath = C4::Context->preference('dischargeWebPath');
37
38
# Getting the template and auth
39
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
40
    {   template_name   => "opac-discharge.tmpl",
41
        query           => $cgi,
42
        type            => "opac",
43
        debug           => 1,
44
    }
45
);
46
47
# Getting already generated discharges
48
my @list = GetDischarges($loggedinuser);
49
my @loop = map {{ url => $dischargeWebPath . "/" . $loggedinuser . "/" . $_, filename => $_ }} @list;
50
$template->param("dischargeloop" => \@loop) if (@list);
51
52
my $generate = $cgi->param('generate');
53
# Sending an email to the librarian if user requested a discharge
54
if ($generate) {
55
    my $title = "Discharge request";
56
    my $member = GetMember('borrowernumber' => $loggedinuser);
57
    my $membername = $member->{firstname} . " " . $member->{surname} . " (" . $member->{cardnumber} . ")";
58
    my $content = "Discharge request from $membername";
59
    my $branch = GetBranchDetail($member->{'branchcode'});
60
    my $sender_email_address = GetFirstValidEmailAddress($loggedinuser);
61
    $sender_email_address = $branch->{branchemail} unless ($sender_email_address);
62
63
    # Note : perhaps we should use C4::Messages here?
64
    my %mail    = (
65
          To             => $branch->{branchemail},
66
          From           => $sender_email_address,
67
          Subject        => "Discharge request",
68
          Message        => $content,
69
          'Content-Type' => 'text/plain; charset="utf8"',
70
    );
71
72
    my $result = sendmail(%mail);
73
    $template->param(
74
        success   => $result,
75
        generated => 1,
76
    );
77
}
78
79
$template->param( dischargeview => 1 );
80
81
output_html_with_http_headers $cgi, $cookie, $template->output;

Return to bug 8007