Bugzilla – Attachment 14490 Details for
Bug 8007
Discharge management
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8007: Discharge management
Bug-8007-Discharge-management.patch (text/plain), 64.48 KB, created by
Jonathan Druart
on 2013-01-09 14:03:37 UTC
(
hide
)
Description:
Bug 8007: Discharge management
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-01-09 14:03:37 UTC
Size:
64.48 KB
patch
obsolete
>From 14720218247efb0398d238d21d04400d2a90c53c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 9 Jan 2013 11:06:29 +0100 >Subject: [PATCH] Bug 8007: Discharge management > >At the intranet, it is now possible to generate a >discharge for a patron. >At the opac, a patron can request a discharge and download discharges >already generated. > >Requirements: > aptitude install python-pisa > >New sysprefs: > - useDischarge: Allows librarians to discharge borrowers and borrowers > to request a discharge > - dischargePath: Sets the upload path for the generated discharges > - dischargeWebPath: Sets the upload path starting from documentroot for the generated > discharges > >New letter with a letter_code DISCHARGE. > >Test plan: >- Switch on the syspref useDischarge. >- Fill the syspref dischargePath (e.g. /home/koha/src/koha-tmpl/discharges) >- Fill the syspref dischargeWebPath (e.g. /discharges) >- For a security reason create a .htaccess in your dischargePath with > the following content: > Options -Indexes > and change the rights: > sudo chown www-data:www-data /home/koha/src/koha-tmpl/discharges >- Check that a new tab appears in the patron page (intranet and opac) >- Check that the discharge cannot be generated if the patron has issues. >- Check that the patron can request a discharge from it's opac area. >- The request is a mail sent via the sendmail command >- Generate the discharge from the intranet >- Try to download it (from the opac and the intranet) > >Sponsored-by: SCD Limoges >--- > C4/Auth.pm | 2 + > C4/Discharges.pm | 100 +++++++++++ > C4/Letters.pm | 20 ++- > C4/Members.pm | 10 +- > .../data/mysql/de-DE/mandatory/sample_notices.sql | 3 +- > .../data/mysql/en/mandatory/sample_notices.sql | 3 +- > .../data/mysql/es-ES/mandatory/sample_notices.sql | 3 +- > .../mysql/fr-FR/1-Obligatoire/sample_notices.sql | 3 +- > installer/data/mysql/it-IT/necessari/notices.sql | 5 +- > .../mysql/nb-NO/1-Obligatorisk/sample_notices.sql | 3 +- > .../data/mysql/pl-PL/mandatory/sample_notices.sql | 3 +- > .../data/mysql/ru-RU/mandatory/sample_notices.sql | 3 +- > installer/data/mysql/sysprefs.sql | 3 + > .../data/mysql/uk-UA/mandatory/sample_notices.sql | 3 +- > installer/data/mysql/updatedatabase.pl | 10 ++ > .../intranet-tmpl/prog/en/includes/circ-menu.inc | 3 + > .../intranet-tmpl/prog/en/includes/circ-menu.tt | 4 + > .../prog/en/includes/members-menu.inc | 3 + > .../prog/en/modules/admin/preferences/patrons.pref | 14 ++ > .../prog/en/modules/members/discharge.tt | 53 ++++++ > koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc | 3 + > .../opac-tmpl/prog/en/modules/opac-discharge.tt | 54 ++++++ > members/discharge.pl | 173 ++++++++++++++++++++ > misc/cronjobs/gather_print_notices.pl | 22 ++- > opac/opac-discharge.pl | 81 +++++++++ > 25 files changed, 555 insertions(+), 29 deletions(-) > create mode 100644 C4/Discharges.pm > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt > create mode 100644 koha-tmpl/opac-tmpl/prog/en/modules/opac-discharge.tt > create mode 100755 members/discharge.pl > create mode 100755 opac/opac-discharge.pl > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 2eb63f5..47f8159 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -364,6 +364,7 @@ sub get_template_and_user { > OPACLocalCoverImages => C4::Context->preference('OPACLocalCoverImages'), > AllowMultipleCovers => C4::Context->preference('AllowMultipleCovers'), > EnableBorrowerFiles => C4::Context->preference('EnableBorrowerFiles'), >+ useDischarge => C4::Context->preference('useDischarge'), > ); > } > else { >@@ -464,6 +465,7 @@ sub get_template_and_user { > OPACLocalCoverImages => C4::Context->preference("OPACLocalCoverImages"), > PatronSelfRegistration => C4::Context->preference("PatronSelfRegistration"), > PatronSelfRegistrationDefaultCategory => C4::Context->preference("PatronSelfRegistrationDefaultCategory"), >+ useDischarge => C4::Context->preference('useDischarge'), > ); > > $template->param(OpacPublic => '1') if ($user || C4::Context->preference("OpacPublic")); >diff --git a/C4/Discharges.pm b/C4/Discharges.pm >new file mode 100644 >index 0000000..8656c06 >--- /dev/null >+++ b/C4/Discharges.pm >@@ -0,0 +1,100 @@ >+package C4::Discharges; >+ >+# Copyright 2013 BibLibre >+# >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it under the >+# terms of the GNU General Public License as published by the Free Software >+# Foundation; either version 2 of the License, or (at your option) any later >+# version. >+# >+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY >+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR >+# A PARTICULAR PURPOSE. See the GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License along >+# with Koha; if not, write to the Free Software Foundation, Inc., >+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. >+ >+=head1 NAME >+ >+C4::Discharges - functions for discharges >+ >+=head1 DESCRIPTION >+ >+This modules allows to retrieve informations about generated discharges >+ >+=cut >+ >+use Modern::Perl; >+use File::Basename; >+ >+our $debug; >+use vars qw(@ISA @EXPORT); >+BEGIN { >+ $debug = $ENV{DEBUG} || 0; >+ require Exporter; >+ @ISA = qw( Exporter ); >+ >+ push @EXPORT, qw( >+ &GetDischarges >+ &removeUnprocessedDischarges >+ ); >+ >+ >+} >+ >+ >+=head1 METHODS >+ >+=head2 GetDischarges($borrowernumber) >+ >+ my @list = GetDischarges($borrowernumber); >+ >+ returns the discharges list for a given borrower. >+ >+=cut >+ >+sub GetDischarges { >+ my $borrowernumber = shift; >+ return unless $borrowernumber; >+ >+ my $dischargePath = C4::Context->preference('dischargePath'); >+ my $dischargeWebPath = C4::Context->preference('dischargeWebPath'); >+ my @return; >+ >+ my $pdf_path = qq{$dischargePath/$borrowernumber/*.pdf}; >+ my @files = <$pdf_path>; >+ foreach (@files) { >+ my ($file, $dir, $ext) = fileparse("$_"); >+ push @return, $file; >+ } >+ >+ return @return; >+} >+ >+=head2 removeUnprocessedDischarges($borrowernumber) >+ >+ removeUnprocessedDischarges($borrowernumber); >+ >+ Removes all discharges with a pending status, because if the process had been complete, the status would be 'sent' >+ >+=cut >+ >+sub removeUnprocessedDischarges { >+ my $borrowernumber = shift; >+ return unless $borrowernumber; >+ >+ my $dbh = C4::Context->dbh; >+ my $query = q{ >+ DELETE FROM message_queue >+ WHERE borrowernumber=? >+ AND letter_code='DISCHARGE' >+ AND status='pending' >+ }; >+ my $sth = $dbh->prepare($query); >+ return $sth->execute($borrowernumber); >+} >+ >+1; >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 36e6213..adc819e 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -777,7 +777,7 @@ sub GetRSSMessages { > > =head2 GetPrintMessages > >- my $message_list = GetPrintMessages( { borrowernumber => $borrowernumber } ) >+ my $message_list = GetPrintMessages( { borrowernumber => $borrowernumber [, letter_code => $letter_code] } ) > > Returns a arrayref of all queued print messages (optionally, for a particular > person). >@@ -786,10 +786,14 @@ person). > > sub GetPrintMessages { > my $params = shift || {}; >- >- return _get_unsent_messages( { message_transport_type => 'print', >- borrowernumber => $params->{'borrowernumber'}, >- } ); >+ >+ return _get_unsent_messages( >+ { >+ message_transport_type => 'print', >+ borrowernumber => $params->{borrowernumber}, >+ letter_code => $params->{letter_code}, >+ } >+ ); > } > > =head2 GetQueuedMessages ([$hashref]) >@@ -897,9 +901,13 @@ ENDSQL > push @query_params, $params->{'message_transport_type'}; > } > if ( $params->{'borrowernumber'} ) { >- $statement .= ' AND borrowernumber = ? '; >+ $statement .= ' AND b.borrowernumber = ? '; > push @query_params, $params->{'borrowernumber'}; > } >+ if ( $params->{letter_code} ) { >+ $statement .= ' AND letter_code = ? '; >+ push @query_params, $params->{letter_code}; >+ } > if ( $params->{'limit'} ) { > $statement .= ' limit ? '; > push @query_params, $params->{'limit'}; >diff --git a/C4/Members.pm b/C4/Members.pm >index 6388a0f..247ba89 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -2132,7 +2132,7 @@ sub GetBorrowersNamesAndLatestIssue { > > =head2 DebarMember > >-my $success = DebarMember( $borrowernumber, $todate ); >+my $success = DebarMember( $borrowernumber, $todate, $comment ); > > marks a Member as debarred, and therefore unable to checkout any more > items. >@@ -2143,15 +2143,15 @@ true on success, false on failure > =cut > > sub DebarMember { >- my $borrowernumber = shift; >- my $todate = shift; >+ my ( $borrowernumber, $todate, $comment ) = @_; > > return unless defined $borrowernumber; > return unless $borrowernumber =~ /^\d+$/; > > return ModMember( >- borrowernumber => $borrowernumber, >- debarred => $todate >+ borrowernumber => $borrowernumber, >+ debarred => $todate, >+ debarredcomment => $comment, > ); > > } >diff --git a/installer/data/mysql/de-DE/mandatory/sample_notices.sql b/installer/data/mysql/de-DE/mandatory/sample_notices.sql >index 7a1a9a3..d7dfdd0 100644 >--- a/installer/data/mysql/de-DE/mandatory/sample_notices.sql >+++ b/installer/data/mysql/de-DE/mandatory/sample_notices.sql >@@ -15,7 +15,8 @@ VALUES ('circulation','ODUE','Mahnung','Mahnung','Liebe/r <<borrowers.firstname> > ('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>>'), > ('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>>'), > ('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>>'), >-('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>>'); >+('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>>'), >+('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>>'); > > INSERT INTO `letter` (module, code, name, title, content, is_html) > VALUES ('circulation','ISSUESLIP','Ausleihquittung (Quittungsdruck)','Ausleihquittung (Quittungsdruck)', '<h3><<branches.branchname>></h3> >diff --git a/installer/data/mysql/en/mandatory/sample_notices.sql b/installer/data/mysql/en/mandatory/sample_notices.sql >index 77fb501..a6e9504 100644 >--- a/installer/data/mysql/en/mandatory/sample_notices.sql >+++ b/installer/data/mysql/en/mandatory/sample_notices.sql >@@ -16,7 +16,8 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f > ('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>>'), > ('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>>'), > ('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>>'), >-('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>>'); >+('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>>'), >+('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>>'); > INSERT INTO `letter` (module, code, name, title, content, is_html) > VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '<h3><<branches.branchname>></h3> > Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >diff --git a/installer/data/mysql/es-ES/mandatory/sample_notices.sql b/installer/data/mysql/es-ES/mandatory/sample_notices.sql >index 26a7c81..cd61c69 100644 >--- a/installer/data/mysql/es-ES/mandatory/sample_notices.sql >+++ b/installer/data/mysql/es-ES/mandatory/sample_notices.sql >@@ -15,5 +15,6 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f > ('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>>'), > ('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>>'), > ('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>>'), >-('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>>'); >+('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>>'), >+('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>>'); > 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>>.'); >diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql >index ad91561..c278794 100644 >--- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql >+++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql >@@ -17,5 +17,6 @@ VALUES > ('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>>'), > ('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>>'), > ('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>>'), >-('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>>'); >+('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>>'), >+('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>>'); > 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>>.'); >diff --git a/installer/data/mysql/it-IT/necessari/notices.sql b/installer/data/mysql/it-IT/necessari/notices.sql >index 5b45d32..1f22e23 100644 >--- a/installer/data/mysql/it-IT/necessari/notices.sql >+++ b/installer/data/mysql/it-IT/necessari/notices.sql >@@ -15,7 +15,8 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f > ('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>>'), > ('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>>'), > ('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>>'), >-('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>>'); >+('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>>'), >+('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>>'); > INSERT INTO letter (module, code, name, title, content, is_html) > VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '<h3><<branches.branchname>></h3> > Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br /> >@@ -104,4 +105,4 @@ Date due: <<issues.date_due>><br /> > <ul> > <li><<items.barcode>></li> > <li><<items.itemcallnumber>></li> >-</ul>', 1); >\ No newline at end of file >+</ul>', 1); >diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql >index 9c3e5e2..db6c08b 100644 >--- a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql >+++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql >@@ -36,5 +36,6 @@ VALUES ('circulation','ODUE','Purring','Purring pÃ¥ dokument','<<borrowers.first > ('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>>'), > ('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>>'), > ('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>>'), >-('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>>'); >+('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>>'), >+('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>>'); > 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>>.'); >diff --git a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql >index 69812fd..c8c3ee6 100644 >--- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql >+++ b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql >@@ -17,5 +17,6 @@ VALUES > ('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>>'), > ('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>>'), > ('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>>'), >-('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>>'); >+('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>>'), >+('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>>'); > 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>>.'); >diff --git a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql >index 358783e..def6ea9 100644 >--- a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql >+++ b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql >@@ -15,5 +15,6 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f > ('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>>'), > ('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>>'), > ('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>>'), >-('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>>'); >+('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>>'), >+('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>>'); > 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>>.'); >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index d5d15d7..4608941 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -406,3 +406,6 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('NotesBlacklist','','List of notes fields that should not appear in the title notes/description separator of details',NULL,'free'); > INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('SCOUserCSS', '', NULL, 'Add CSS to be included in the SCO module in an embedded <style> tag.', 'free'); > INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('SCOUserJS', '', NULL, 'Define custom javascript for inclusion in the SCO module', 'free'); >+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('useDischarge','','Allows librarians to discharge borrowers and borrowers to request a discharge','','YesNo'); >+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('dischargePath','','Sets the upload path for the generated discharges','',''); >+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('dischargeWebPath','','Set the upload path starting from document root for the generated discharges','',''); >diff --git a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql >index b7e67c5..1a86668 100644 >--- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql >+++ b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql >@@ -14,5 +14,6 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f > ('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>>'), > ('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>>'), > ('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>>'), >-('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>>'); >+('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>>'), >+('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>>'); > 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>>.'); >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 77265f4..b0948ff 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -6339,6 +6339,16 @@ if ( CheckVersion($DBversion) ) { > SetVersion ($DBversion); > } > >+$DBversion = "3.11.00.XXX"; >+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { >+ $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');"); >+ $dbh->do("INSERT IGNORE INTO `systempreferences` (variable,value,explanation,options,type) VALUES('dischargePath','','Sets the upload path for the generated discharges','','');"); >+ $dbh->do("INSERT IGNORE INTO `systempreferences` (variable,value,explanation,options,type) VALUES('dischargeWebPath','','Sets the upload path starting from documentroot for the generated discharges','','');"); >+ $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>>');"); >+ print "Upgrade to $DBversion done (Add System Preferences useDischarge, dischargePath, dischargeWebpath and discharge notice)\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >index f2cd877..f7df526 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >@@ -83,6 +83,9 @@ > [% IF EnableBorrowerFiles %] > [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrowernumber %]">Files</a></li> > [% END %] >+ [% IF CAN_user_borrowers && useDischarge %] >+ [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% borrowernumber %]">Discharge</a></li> >+ [% END %] > </ul></div> > [% END %] > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt >index ced2858..d02b093 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt >@@ -78,6 +78,10 @@ in the global namespace %] > [% END %] > [% IF ( sentnotices ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/notices.pl?borrowernumber=[% borrower.borrowernumber %]">Notices</a></li> > [% IF ( statisticsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/statistics.pl?borrowernumber=[% borrowernumber %]">Statistics</a></li> >+ [% IF CAN_user_borrowers && useDischarge %] >+ [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% borrowernumber %]">Discharge</a></li> >+ [% END %] >+ > </ul></div> > [% END %] > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-menu.inc >index 9bd5285..e7e8772 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-menu.inc >@@ -19,6 +19,9 @@ > [% IF EnableBorrowerFiles %] > [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrowernumber %]">Files</a></li> > [% END %] >+ [% IF CAN_user_borrowers && useDischarge %] >+ [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% borrowernumber %]">Discharge</a></li> >+ [% END %] > </ul> > </div> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >index 74d14af..f4728b7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >@@ -139,3 +139,17 @@ Patrons: > yes: Do > no: "Don't" > - enable the ability to upload and attach arbitrary files to a borrower record. >+ - >+ - pref: useDischarge >+ choices: >+ yes: Allows >+ no: "Don't allow" >+ - librarians to discharge borrowers and borrowers to request a discharge >+ - >+ - pref: dischargePath >+ class: multi >+ - Sets the upload path for the generated discharges >+ - >+ - pref: dischargeWebPath >+ class: multi >+ - Sets the upload path starting from documentroot for the generated discharges >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt >new file mode 100644 >index 0000000..2eb236f >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt >@@ -0,0 +1,53 @@ >+[% INCLUDE 'doc-head-open.inc' %] >+<title>Koha › Patrons › [% IF (unknowuser) %]Patron does not exist[% ELSE %]Discharge for [% firstname %] [% surname %] ([% cardnumber %])[% END %]</title> >+[% INCLUDE 'doc-head-close.inc' %] >+</head> >+<body> >+[% INCLUDE 'header.inc' %] >+[% INCLUDE 'patron-search.inc' %] >+ >+<div id="breadcrumbs"> >+ <a href="/cgi-bin/koha/mainpage.pl">Home</a> >+› <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> >+› [% IF (unknowuser) %]Patron does not exist[% ELSE %]Discharge for [% firstname %] [% surname %] ([% cardnumber %])[% END %] >+</div> >+ >+<div id="doc3" class="yui-t1"> >+ <div id="bd"> >+ <div id="yui-main"> >+ <div class="yui-b"> >+<div class="yui-g"> >+<h3>Discharge</h3> >+[% IF path_missing %]<p class="warning">The system preferences dischargePath and dischargeWebPath have to be filled.</p>[% END %] >+[% IF (error) %]<p class="warning">An error has occured while generating the discharge. Please retry later or contact your administrator.</p>[% END %] >+[% IF (hasissues) %] >+ <p>Cannot edit discharge: borrower has issues.</p> >+[% ELSE %] >+ [% IF (hasreserves) %] >+ <p>Borrower has reserves: they will be canceled if the discharge is generated.</p> >+ [% END %] >+ [% UNLESS path_missing %] >+ <form method="post"> >+ <input type="Submit" value="Generate discharge" name="generatedischarge" /> >+ <input type="hidden" value="[% borrowernumber %]" name="borrowernumber" /> >+ </form> >+ [% END %] >+[% END %] >+[% IF (dischargeloop) %] >+ <br /><br /><h3>Generated discharges</h3> >+ <ul> >+ [% FOR discharge IN dischargeloop %] >+ <li><a href="[% discharge.url %]">[% discharge.filename %]</a></li> >+ [% END %] >+ </ul> >+[% END %] >+</div> >+ >+ >+</div> >+</div> >+<div class="yui-b"> >+[% INCLUDE 'circ-menu.inc' %] >+</div> >+</div> >+[% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc >index 5a07d95..53509ca 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc >+++ b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc >@@ -32,6 +32,9 @@ > [% IF ( virtualshelves ) %] > [% IF ( listsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">my lists</a></li> > [% END %] >+ [% IF useDischarge %] >+ [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/opac-discharge.pl">Discharge</a></li> >+ [% END %] > > </ul> > </div> >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-discharge.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-discharge.tt >new file mode 100644 >index 0000000..f059fde >--- /dev/null >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-discharge.tt >@@ -0,0 +1,54 @@ >+[% INCLUDE 'doc-head-open.inc' %] >+[% IF (LibraryNameTitle) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog >+[% INCLUDE 'doc-head-close.inc' %] >+</head> >+<body id="opac-search-history"> >+[% IF OpacNav or loggedinusername %] >+ <div id="doc3" class="yui-t1"> >+[% ELSE %] >+ <div id="doc3" class="yui-t7"> >+[% END %] >+<div id="bd"> >+[% INCLUDE 'masthead.inc' %] >+ >+<div id="yui-main"> >+ <div class="yui-b"> >+ <div class="yui-g"> >+ <div id="discharge" class="container"> >+ <h1>Discharge</h1> >+ [% IF generated %] >+ [% IF success %] >+ <p>Your discharge request has been sent. Your discharge will be available on this page within a few days.</p> >+ [% ELSE %] >+ <p>Your discharge request could not be sent. Please retry later or contact an administrator.</p> >+ [% END %] >+ [% ELSE %] >+ <h2>What is a discharge?</h2> >+ <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> >+ <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> >+ <a href="/cgi-bin/koha/opac-discharge.pl?generate=1">Ask for a discharge</a> >+ [% END %] >+ [% IF dischargeloop %] >+ <h3>Generated discharges</h3> >+ <ul> >+ [% FOR discharge IN dischargeloop %] >+ <li><a href="[% discharge.url %]">[% discharge.filename %]</a></li> >+ [% END %] >+ </ul> >+ [% END %] >+ </div> >+ </div> >+ </div> >+</div> >+ >+[% IF ( OpacNav || loggedinusername ) %] >+ <div class="yui-b"> >+ <div class="container"> >+ [% INCLUDE 'navigation.inc' %] >+ [% INCLUDE 'usermenu.inc' %] >+ </div> >+ </div> >+[% END %] >+</div> >+[% INCLUDE 'opac-bottom.inc' %] >+ >diff --git a/members/discharge.pl b/members/discharge.pl >new file mode 100755 >index 0000000..ef6cdb8 >--- /dev/null >+++ b/members/discharge.pl >@@ -0,0 +1,173 @@ >+#!/usr/bin/perl >+ >+# Copyright 2013 BibLibre SARL >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it under the >+# terms of the GNU General Public License as published by the Free Software >+# Foundation; either version 2 of the License, or (at your option) any later >+# version. >+# >+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY >+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR >+# A PARTICULAR PURPOSE. See the GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License along >+# with Koha; if not, write to the Free Software Foundation, Inc., >+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. >+ >+=head1 NAME >+ >+discharge.pl >+ >+=head1 DESCRIPTION >+ >+Allows librarian to edit and/or manage borrowers' discharges >+ >+=cut >+ >+use Modern::Perl; >+ >+use CGI; >+use C4::Auth; >+use C4::Output; >+use C4::Members; >+use C4::Reserves; >+use C4::Letters; >+use C4::Discharges; >+ >+use Koha::DateUtils; >+ >+my $input = new CGI; >+my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( { >+ template_name => 'members/discharge.tmpl', >+ query => $input, >+ type => 'intranet', >+ authnotrequired => 0, >+ flagsrequired => { 'borrowers' => '*' }, >+ debug => 1, >+} ); >+ >+my $dischargePath = C4::Context->preference('dischargePath'); >+my $dischargeWebPath = C4::Context->preference('dischargeWebPath'); >+ >+my $borrowernumber; >+my $data; >+if ( $input->param('borrowernumber') ) { >+ $borrowernumber = $input->param('borrowernumber'); >+ >+ # Getting member data >+ $data = GetMember( borrowernumber => $borrowernumber ); >+ >+ # Getting pending issues >+ my $issues = GetPendingIssues($borrowernumber); >+ my $hasissues = scalar(@$issues); >+ >+ # Getting reserves >+ my @reserves = GetReservesFromBorrowernumber($borrowernumber); >+ my $hasreserves = scalar(@reserves); >+ >+ # Generating discharge if needed >+ if ($input->param('generatedischarge')) { >+ # If borrower has pending reserves, we cancel them >+ foreach (@reserves) { >+ CancelReserve($_->{'reservenumber'}); >+ } >+ $hasreserves = 0; >+ >+ # Debarring member >+ # Getting librarian's name >+ my $librarian = GetMember('borrowernumber' => $loggedinuser); >+ my $librarianname = $librarian->{'firstname'} . " " . $librarian->{'surname'}; >+ >+ # Getting today's date >+ my $date = C4::Dates->new()->output(); >+ # (this is quite ugly, but this is how borrowers seems to be permanently debarred) >+ # FIXME: Perl strings are not translatable atm, so comment is written in english >+ C4::Members::DebarMember($borrowernumber, '9999-12-31', "Discharge generated by $librarianname on $date"); >+ >+ # Creating message >+ my $letter = C4::Letters::GetPreparedLetter( >+ module => 'members', >+ letter_code => 'DISCHARGE', >+ tables => { >+ borrowers => $borrowernumber, >+ branches => $data->{branchcode}, >+ }, >+ ); >+ my $today = output_pref(dt_from_string()); >+ $letter->{'title'} =~ s/<<today>>/$today/g; >+ $letter->{'content'} =~ s/<<today>>/$today/g; >+ >+ C4::Letters::EnqueueLetter( >+ { letter => $letter, >+ borrowernumber => $borrowernumber, >+ message_transport_type => 'print', >+ } >+ ); >+ >+ # Calling gather_print_notices.pl with borrowernumber and css to create html from letter >+ # We place the generated html in a per-user directory >+ # We create the per-user directory if it doesn't exist >+ mkdir "$dischargePath/$borrowernumber" unless -d "$dischargePath/$borrowernumber"; >+ qx{../misc/cronjobs/gather_print_notices.pl -f discharge -l DISCHARGE -b $borrowernumber $dischargePath/$borrowernumber}; >+ >+ # Calling printoverdues.pl in this same user directory >+ qx{../misc/cronjobs/printoverdues.sh $dischargePath/$borrowernumber}; >+ >+ # Error handling: >+ # Check if we really got our discharge as a pdf file >+ my $todayiso = output_pref(dt_from_string(), 'iso', 1); >+ # If we don't, then >+ unless (-e "$dischargePath/$borrowernumber/discharge-$todayiso.pdf") { >+ # Show an error message to the librarian >+ $template->param(error => 1); >+ >+ # Remove the possibly generated html file >+ unlink "$dischargePath/$borrowernumber/discharge-$todayiso.html"; >+ >+ # Remove the unprocessed message from message_queue >+ removeUnprocessedDischarges($borrowernumber); >+ >+ } >+ >+ } >+ >+ # Getting already generated discharges >+ my @list = GetDischarges($borrowernumber); >+ my @loop = map {{ url => $dischargeWebPath . "/" . $borrowernumber . "/" . $_, filename => $_ }} @list; >+ $template->param("dischargeloop" => \@loop) if (@list); >+ >+ >+ $template->param( >+ borrowernumber => $borrowernumber, >+ biblionumber => $data->{'biblionumber'}, >+ title => $data->{'title'}, >+ initials => $data->{'initials'}, >+ surname => $data->{'surname'}, >+ borrowernumber => $borrowernumber, >+ firstname => $data->{'firstname'}, >+ cardnumber => $data->{'cardnumber'}, >+ categorycode => $data->{'categorycode'}, >+ category_type => $data->{'category_type'}, >+ categoryname => $data->{'description'}, >+ address => $data->{'address'}, >+ address2 => $data->{'address2'}, >+ city => $data->{'city'}, >+ zipcode => $data->{'zipcode'}, >+ country => $data->{'country'}, >+ phone => $data->{'phone'}, >+ email => $data->{'email'}, >+ branchcode => $data->{'branchcode'}, >+ hasissues => $hasissues, >+ hasreserves => $hasreserves, >+ ); >+ >+} >+# Send parameters to template >+$template->param( >+ dischargeview => 1, >+ path_missing => ( $dischargePath and $dischargeWebPath ) ? 0 : 1, >+); >+ >+output_html_with_http_headers $input, $cookie, $template->output; >diff --git a/misc/cronjobs/gather_print_notices.pl b/misc/cronjobs/gather_print_notices.pl >index 286b035..fe7e940 100755 >--- a/misc/cronjobs/gather_print_notices.pl >+++ b/misc/cronjobs/gather_print_notices.pl >@@ -39,7 +39,7 @@ use Getopt::Long; > > sub usage { > print STDERR <<USAGE; >-Usage: $0 OUTPUT_DIRECTORY >+Usage: $0 [ -b borrowernumber ] [ -l letter_code ] [ -f filename] OUTPUT_DIRECTORY > Will print all waiting print notices to > OUTPUT_DIRECTORY/notices-CURRENT_DATE.html . > >@@ -48,11 +48,14 @@ USAGE > exit $_[0]; > } > >-my ( $stylesheet, $help, $split ); >+my ( $stylesheet, $help, $split, $borrowernumber, $letter_code, $filename ); > > GetOptions( > 'h|help' => \$help, > 's|split' => \$split, >+ 'b:i' => \$borrowernumber, >+ 'l:s' => \$letter_code, >+ 'f:s' => \$filename, > ) || usage(1); > > usage(0) if ($help); >@@ -65,8 +68,11 @@ if ( !$output_directory || !-d $output_directory ) { > usage(1); > } > >+my $params = {}; >+$params->{'borrowernumber'} = $borrowernumber if ($borrowernumber); >+$params->{'letter_code'} = $letter_code if ($letter_code); > my $today = C4::Dates->new(); >-my @all_messages = @{ GetPrintMessages() }; >+my @all_messages = @{ GetPrintMessages( $params ) }; > exit unless (@all_messages); > > my $OUTPUT; >@@ -104,9 +110,9 @@ if ($split) { > } > } > else { >- open $OUTPUT, '>', >- File::Spec->catdir( $output_directory, >- "holdnotices-" . $today->output('iso') . ".html" ); >+ my $fn = $filename || "holdnotices"; >+ my $file=File::Spec->catdir( $output_directory, $fn . "-" . $today->output('iso') . ".html"); >+ open my $fh, '>', $file or die "Can't open file $file : $!"; > > my $template = > C4::Templates::gettemplate( 'batch/print-notices.tmpl', 'intranet', >@@ -118,13 +124,13 @@ else { > messages => \@all_messages, > ); > >- print $OUTPUT $template->output; >+ print $fh $template->output; > > foreach my $message (@all_messages) { > C4::Letters::_set_message_status( > { message_id => $message->{'message_id'}, status => 'sent' } ); > } > >- close $OUTPUT; >+ close $fh; > > } >diff --git a/opac/opac-discharge.pl b/opac/opac-discharge.pl >new file mode 100755 >index 0000000..ce4473a >--- /dev/null >+++ b/opac/opac-discharge.pl >@@ -0,0 +1,81 @@ >+#!/usr/bin/perl >+ >+# Copyright 2013 BibLibre SARL >+# >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it under the >+# terms of the GNU General Public License as published by the Free Software >+# Foundation; either version 2 of the License, or (at your option) any later >+# version. >+# >+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY >+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR >+# A PARTICULAR PURPOSE. See the GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License along >+# with Koha; if not, write to the Free Software Foundation, Inc., >+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. >+ >+use Modern::Perl; >+ >+use C4::Auth qw(:DEFAULT get_session); >+use CGI; >+use C4::Context; >+use C4::Output; >+use C4::Log; >+use C4::Debug; >+use C4::Branch; >+use C4::Members; >+use C4::Discharges; >+use Mail::Sendmail; >+ >+my $cgi = new CGI; >+ >+my $dischargePath = C4::Context->preference('dischargePath'); >+my $dischargeWebPath = C4::Context->preference('dischargeWebPath'); >+ >+# Getting the template and auth >+my ( $template, $loggedinuser, $cookie ) = get_template_and_user( >+ { template_name => "opac-discharge.tmpl", >+ query => $cgi, >+ type => "opac", >+ debug => 1, >+ } >+); >+ >+# Getting already generated discharges >+my @list = GetDischarges($loggedinuser); >+my @loop = map {{ url => $dischargeWebPath . "/" . $loggedinuser . "/" . $_, filename => $_ }} @list; >+$template->param("dischargeloop" => \@loop) if (@list); >+ >+my $generate = $cgi->param('generate'); >+# Sending an email to the librarian if user requested a discharge >+if ($generate) { >+ my $title = "Discharge request"; >+ my $member = GetMember('borrowernumber' => $loggedinuser); >+ my $membername = $member->{firstname} . " " . $member->{surname} . " (" . $member->{cardnumber} . ")"; >+ my $content = "Discharge request from $membername"; >+ my $branch = GetBranchDetail($member->{'branchcode'}); >+ my $sender_email_address = GetFirstValidEmailAddress($loggedinuser); >+ $sender_email_address = $branch->{branchemail} unless ($sender_email_address); >+ >+ # Note : perhaps we should use C4::Messages here? >+ my %mail = ( >+ To => $branch->{branchemail}, >+ From => $sender_email_address, >+ Subject => "Discharge request", >+ Message => $content, >+ 'Content-Type' => 'text/plain; charset="utf8"', >+ ); >+ >+ my $result = sendmail(%mail); >+ $template->param( >+ success => $result, >+ generated => 1, >+ ); >+} >+ >+$template->param( dischargeview => 1 ); >+ >+output_html_with_http_headers $cgi, $cookie, $template->output; >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8007
:
14490
|
16622
|
16935
|
17484
|
17485
|
21394
|
21395
|
21396
|
21660
|
21674
|
21675
|
21676
|
21677
|
21678
|
24023
|
24024
|
24025
|
24026
|
24027
|
30531
|
30532
|
30533
|
30534
|
30535
|
31007
|
34034
|
34035
|
34036
|
34037
|
34038
|
34039
|
34668
|
34669
|
34670
|
34671
|
34672
|
34673
|
34674
|
34675
|
36180
|
36181
|
36182
|
36183
|
36184
|
36185
|
36186
|
36187
|
36394
|
36395
|
36396
|
36397
|
36398
|
36399
|
36400
|
36401
|
37029
|
37030
|
37031
|
37032
|
37033
|
37034
|
37035
|
37036
|
37037
|
38596
|
38597