From f06f07c2cb3267ed9ea1f0c4de575cf2feb09853 Mon Sep 17 00:00:00 2001 From: Yohann Dufour Date: Mon, 4 Aug 2014 16:09:14 +0200 Subject: [PATCH] Bug 8007: Discharge - DB changes This patch adds: - syspref useDischarge - the new table discharges - the discharge notice --- .../data/mysql/en/mandatory/sample_notices.sql | 4 +++- .../data/mysql/es-ES/mandatory/sample_notices.sql | 4 +++- .../mysql/fr-FR/1-Obligatoire/sample_notices.sql | 4 +++- installer/data/mysql/it-IT/necessari/notices.sql | 4 +++- installer/data/mysql/kohastructure.sql | 15 +++++++++++- .../mysql/nb-NO/1-Obligatorisk/sample_notices.sql | 5 +++- .../data/mysql/pl-PL/mandatory/sample_notices.sql | 7 +++--- .../data/mysql/ru-RU/mandatory/sample_notices.sql | 4 +++- installer/data/mysql/sysprefs.sql | 1 + .../data/mysql/uk-UA/mandatory/sample_notices.sql | 3 ++- installer/data/mysql/updatedatabase.pl | 27 ++++++++++++++++++++++ 11 files changed, 67 insertions(+), 11 deletions(-) diff --git a/installer/data/mysql/en/mandatory/sample_notices.sql b/installer/data/mysql/en/mandatory/sample_notices.sql index 2281739..2b69671 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.sql +++ b/installer/data/mysql/en/mandatory/sample_notices.sql @@ -16,7 +16,9 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\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 <>.\n\nThank you,\n\n<>', 'email'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\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 <>.\n\nThank you,\n\n<>', 'email'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\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 <>\n\nThank you,\n\n<>', 'email'), -('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <>\n\nIf you have any questions, please email us at <>.\n\nThank you,\n\n<>', 'email'); +('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <>\n\nIf you have any questions, please email us at <>.\n\nThank you,\n\n<>', 'email'), +('members', 'DISCHARGE', 'Discharge', 'Discharge for <> <>', '

Discharge

\r\n\r\nThe library <> certifies that the following borrower :\r\n\r\n <> <>\r\n Cardnumber : <>\r\n\r\nreturned all his documents.', 'email'); + INSERT INTO `letter` (module, code, name, title, content, is_html) VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '

<>

Checked out to <> <> <> <>
diff --git a/installer/data/mysql/es-ES/mandatory/sample_notices.sql b/installer/data/mysql/es-ES/mandatory/sample_notices.sql index 25f12a3..da4f8f1 100644 --- a/installer/data/mysql/es-ES/mandatory/sample_notices.sql +++ b/installer/data/mysql/es-ES/mandatory/sample_notices.sql @@ -15,7 +15,9 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\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 <>.\n\nThank you,\n\n<>', 'email'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\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 <>.\n\nThank you,\n\n<>', 'email'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\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 <>\n\nThank you,\n\n<>', 'email'), -('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <>\n\nIf you have any questions, please email us at <>.\n\nThank you,\n\n<>', 'email'); +('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <>\n\nIf you have any questions, please email us at <>.\n\nThank you,\n\n<>', 'email'), +('members', 'DISCHARGE', 'Discharge', 'Discharge for <> <>', '

Discharge

\r\n\r\nThe library <> certifies that the following borrower :\r\n\r\n <> <>\r\n Cardnumber : <>\r\n\r\nreturned all his documents.', 'email'); + INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','RENEWAL','Item Renewal','Renewals','The following items have been renew:\r\n----\r\n<>\r\n----\r\nThank you for visiting <>.'); INSERT INTO letter (module, code, branchcode, name, is_html, title, content) 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 625dfd2..fbdee6f 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql @@ -17,7 +17,9 @@ VALUES ('suggestions','ACCEPTED','Suggestion accceptée', 'Suggestion acceptée','Cher(e) <> <>,\n\nVous avez crée une suggestion d\'achat au sujet du document <> de <>.\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 <>.\n\nMerci,\n\n<>', 'email'), ('suggestions','AVAILABLE','Suggestion disponible', 'Suggestion d\'achat disponible','cher(e) <> <>,\n\nVous avez effectué une suggestion d\'achat pour le docuement <> de <>.\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 <>.\n\nMerci,\n\n<>', 'email'), ('suggestions','ORDERED','Suggestion commandée', 'Suggestion commandée','Cher(e) <> <>,\n\nVous avez effectué une demande de suggestion d\'achat sur le docuement <> de <>.\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 <>\n\nMerci,\n\n<>', 'email'), -('suggestions','REJECTED','Suggestion rejetée', 'Suggestion d\'achat rejeté','Cher(e) <> <>,\n\nVous avez fait la demande du document <> de <>.\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: <>\n\nSi vous avez des questions, merci de nous contacter à l\'adresse <>.\n\nMerci,\n\n<>', 'email'); +('suggestions','REJECTED','Suggestion rejetée', 'Suggestion d\'achat rejeté','Cher(e) <> <>,\n\nVous avez fait la demande du document <> de <>.\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: <>\n\nSi vous avez des questions, merci de nous contacter à l\'adresse <>.\n\nMerci,\n\n<>', 'email'), +('members', 'DISCHARGE', 'Quitus', 'Quitus pour <> <>', '

Quitus

\r\n\r\nLa librairie <> certifies que lecteur suivant :\r\n\r\n <> <>\r\n Numéro de carte : <>\r\n\r\na bien retourné tous ses documents.', 'email'); + 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<>\r\n----\r\nMerci, <>.'); INSERT INTO letter (module, code, branchcode, name, is_html, title, content) diff --git a/installer/data/mysql/it-IT/necessari/notices.sql b/installer/data/mysql/it-IT/necessari/notices.sql index 0b34e89..be97d4b 100644 --- a/installer/data/mysql/it-IT/necessari/notices.sql +++ b/installer/data/mysql/it-IT/necessari/notices.sql @@ -15,7 +15,9 @@ VALUES ('circulation','ODUE','Avviso per i ritardi','Avviso per i ritardi','Salv ('suggestions','ACCEPTED','Suggerimento d\'acquisto accettato', 'Suggerimento d\'acquisto accettato','Salve <> <>,\n\nHai suggerito di acquistare <> di <>.\n\nLa biblioteca ha revisionato il suggerimento oggi. La copia verrà ordinato il più presto possibile. Riceverai un\'email quando l\'ordine sarà completato e una altra mail quanto arriverà in biblioteca.\n\nSe hai domande, scrivici pure all\' email <>.\n\nGrazie di tutto,\n\n<>', 'email'), ('suggestions','AVAILABLE','Suggerimento d\'acquisto disponibile', 'Suggerimento d\'acquisto disponibile','Salve <> <>,\n\nHai suggerito di acquistare <> di <>.\n\nTi informiamo che la copia è arrivata in biblioteca.\n\nSe hai domande, scrivici pure all\' email <>.\n\nGrazie di tutto,\n\n<>', 'email'), ('suggestions','ORDERED','Suggerimento d\'acquisto ordinato', 'Suggerimento d\'acquisto ordinato','Salve <> <>,\n\nHai suggerito di acquistare <> di <>.\n\nTi informiamo che l\'ordine è stata inviato al fornitore della biblioteca. Dovrebbe arrivare in poco tempo, poi verrà aggiunto alla collezione della biblioteca.\n\nRiceverai un\'altra email quando sarà disponibile.\n\nSe hai domande, scrivici pure all\' email <>\n\nGrazie di tutto,\n\n<>', 'email'), -('suggestions','REJECTED','Suggerimento d\'acquisto rifiutato', 'Suggerimento d\'acquisto rifiutato','Salve <> <>,\n\nHai suggerito di acquistare <> di <>.\n\na biblioteca ha revisionato il suggerimento oggi e ha deciso di non seguire il suggerimento.\n\nLa motivazione è: <>\n\nSe hai domande, scrivici pure all\' email <>.\n\nGrazie di tuttp,\n\n<>', 'email'); +('suggestions','REJECTED','Suggerimento d\'acquisto rifiutato', 'Suggerimento d\'acquisto rifiutato','Salve <> <>,\n\nHai suggerito di acquistare <> di <>.\n\na biblioteca ha revisionato il suggerimento oggi e ha deciso di non seguire il suggerimento.\n\nLa motivazione è: <>\n\nSe hai domande, scrivici pure all\' email <>.\n\nGrazie di tuttp,\n\n<>', 'email'), +('members', 'DISCHARGE', 'Discharge', 'Discharge for <> <>', '

Discharge

\r\n\r\nThe library <> certifies that the following borrower :\r\n\r\n <> <>\r\n Cardnumber : <>\r\n\r\nreturned all his documents.', 'email'); + INSERT INTO letter (module, code, name, title, content, is_html) VALUES ('circulation','ISSUESLIP','Ricevuta di prestito','Ricevuta di prestito', '

<>

Prestito a <> <> <> <>
diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index b46dc6a..2b541c4 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -326,7 +326,7 @@ CREATE TABLE borrower_debarments ( borrower_debarment_id int(11) NOT NULL AUTO_INCREMENT, borrowernumber int(11) NOT NULL, expiration date DEFAULT NULL, - `type` enum('SUSPENSION','OVERDUES','MANUAL') NOT NULL DEFAULT 'MANUAL', + `type` enum('SUSPENSION','OVERDUES','MANUAL','DISCHARGE') NOT NULL DEFAULT 'MANUAL', `comment` text, manager_id int(11) DEFAULT NULL, created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, @@ -3422,6 +3422,19 @@ CREATE TABLE IF NOT EXISTS `misc_files` ( -- miscellaneous files attached to rec KEY `record_id` (`record_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- +-- Table structure for table 'discharges' +-- + +CREATE TABLE discharges ( + borrower int(11) DEFAULT NULL, + needed timestamp NULL DEFAULT NULL, + validated timestamp NULL DEFAULT NULL, + KEY borrower_discharges_ibfk1 (borrower), + CONSTRAINT borrower_discharges_ibfk1 FOREIGN KEY (borrower) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + + /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 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 f1e8fb0..0a92e8f 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql @@ -19,6 +19,7 @@ -- with Koha; if not, write to the Free Software Foundation, Inc., -- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation','ODUE','Purring','Purring på dokument','<> <>,\n\nDu har lån som skulle vært levert. Biblioteket krever ikke inn gebyrer, men vennligst lever eller forny lånet/lånene ved biblioteket.\n\n<>\n<>\n<> <>\nTelefon: <>\nFax: <>\nE-post: <>\n\nDersom du har et passord og lånet/lånene kan fornyes kan du gjøre dette på nettet. Dersom du overskrider lånetiden med mer enn 30 dager vil lånekortet bli sperret.\n\nFølgende lån har gått over tiden:\n\n"<>" av <>, <>, Strekkode: <> Gebyr: <>\n\nPå forhånd takk.\n\n<>\n', 'email'), ('claimacquisition','ACQCLAIM','Periodikapurring','Eksemplar ikke mottatt','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nBestillingsnummer <> (<>) (<> ordered) ($<> each) har ikke blitt mottatt.', 'email'), @@ -37,7 +38,9 @@ VALUES ('circulation','ODUE','Purring','Purring på dokument','<> <>,\n\nDu har foreslått at biblioteket kjøper inn <> av <>.\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å <>.\n\nVennlig hilsen,\n\n<>', 'email'), ('suggestions','AVAILABLE','Foreslått dokument tilgjengelig', 'Foreslått dokument tilgjengelig','<> <>,\n\nDu har foreslått at biblioteket kjøper inn <> av <>.\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å <>.\n\nVennlig hilsen,\n\n<>', 'email'), ('suggestions','ORDERED','Innkjøpsforslag i bestilling', 'Innkjøpsforslag i bestilling','Dear <> <>,\n\nDu har foreslått at biblioteket kjøper inn <> av <>.\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å <>.\n\nVennlig hilsen,\n\n<>', 'email'), -('suggestions','REJECTED','Innkjøpsforslag avslått', 'Innkjøpsforslag avslått','<> <>,\n\nDu har foreslått at biblioteket kjøper inn <> av <>.\n\nBiblioteket har vurdert innkjøpsforslaget ditt i dag, og bestemt seg for å ikke ta det til følge.\n\nBegrunnelse: <>\n\nEr det noe du lurer på, vennligst kontakt oss på <>.\n\nVennlig hilsen,\n\n<>', 'email'); +('suggestions','REJECTED','Innkjøpsforslag avslått', 'Innkjøpsforslag avslått','<> <>,\n\nDu har foreslått at biblioteket kjøper inn <> av <>.\n\nBiblioteket har vurdert innkjøpsforslaget ditt i dag, og bestemt seg for å ikke ta det til følge.\n\nBegrunnelse: <>\n\nEr det noe du lurer på, vennligst kontakt oss på <>.\n\nVennlig hilsen,\n\n<>', 'email'), +('members', 'DISCHARGE', 'Discharge', 'Discharge for <> <>', '

Discharge

\r\n\r\nThe library <> certifies that the following borrower :\r\n\r\n <> <>\r\n Cardnumber : <>\r\n\r\nreturned all his documents.', 'email'); + INSERT INTO `letter` (module, code, name, title, content, is_html) VALUES ('circulation','ISSUESLIP','Utlån','Utlån', '

<>

Utlånt til <> <> <> <>
diff --git a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql index d053e3d..4f753f3 100644 --- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql +++ b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql @@ -1,7 +1,6 @@ INSERT INTO letter (module, code, name, title, content, message_transport_type) VALUES -('circulation','ODUE','Overdue Notice', -'Item Overdue','Dear <> <>,\n\nAccording to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible.\n\n<>\n<>\n<> <>\nPhone: <>\nFax: <>\nEmail: <>\n\nIf you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned.\n\nThe following item(s) is/are currently overdue:\n\n"<>" by <>, <>, Barcode: <> Fine: <>\n\nThank-you for your prompt attention to this matter.\n\n<> Staff\n', 'email'), +('circulation','ODUE','Overdue Notice','Item Overdue','Dear <> <>,\n\nAccording to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible.\n\n<>\n<>\n<> <>\nPhone: <>\nFax: <>\nEmail: <>\n\nIf you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned.\n\nThe following item(s) is/are currently overdue:\n\n"<>" by <>, <>, Barcode: <> Fine: <>\n\nThank-you for your prompt attention to this matter.\n\n<> Staff\n', 'email'), ('claimacquisition','ACQCLAIM','Acquisition Claim','Item Not Received','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nOrdernumber <> (<>) (<> ordered) ($<> each) has not been received.', 'email'), ('serial','RLIST','Routing List','Serial is now available','<> <>,\r\n\r\nThe following issue is now available:\r\n\r\n<>, <> (<>)\r\n\r\nPlease pick it up at your convenience.', 'email'), ('members','ACCTDETAILS','Account Details Template - DEFAULT','Your new Koha account details.','Hello <> <> <>.\r\n\r\nYour new Koha account details are:\r\n\r\nUser: <>\r\nPassword: <>\r\n\r\nIf you have any problems or questions regarding your account, please contact your Koha Administrator.\r\n\r\nThank you,\r\nKoha Administrator\r\nkohaadmin@yoursite.org', 'email'), @@ -17,7 +16,9 @@ VALUES ('suggestions','ACCEPTED','Suggestion accepted', 'Purchase suggestion accepted','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\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 <>.\n\nThank you,\n\n<>', 'email'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\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 <>.\n\nThank you,\n\n<>', 'email'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\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 <>\n\nThank you,\n\n<>', 'email'), -('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <>\n\nIf you have any questions, please email us at <>.\n\nThank you,\n\n<>', 'email'); +('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <>\n\nIf you have any questions, please email us at <>.\n\nThank you,\n\n<>', 'email'), +('members', 'DISCHARGE', 'Discharge', 'Discharge for <> <>', '

Discharge

\r\n\r\nThe library <> certifies that the following borrower :\r\n\r\n <> <>\r\n Cardnumber : <>\r\n\r\nreturned all his documents.', 'email'); + INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','RENEWAL','Item Renewal','Renewals','The following items have been renew:\r\n----\r\n<>\r\n----\r\nThank you for visiting <>.'); INSERT INTO letter (module, code, branchcode, name, is_html, title, content) diff --git a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql index 4b9328e..3082782 100644 --- a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql +++ b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql @@ -15,7 +15,9 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\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 <>.\n\nThank you,\n\n<>', 'email'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\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 <>.\n\nThank you,\n\n<>', 'email'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\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 <>\n\nThank you,\n\n<>', 'email'), -('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <>\n\nIf you have any questions, please email us at <>.\n\nThank you,\n\n<>', 'email'); +('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <>\n\nIf you have any questions, please email us at <>.\n\nThank you,\n\n<>', 'email'), +('members', 'DISCHARGE', 'Discharge', 'Discharge for <> <>', '

Discharge

\r\n\r\nThe library <> certifies that the following borrower :\r\n\r\n <> <>\r\n Cardnumber : <>\r\n\r\nreturned all his documents.', 'email'); + INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','RENEWAL','Item Renewal','Renewals','The following items have been renew:\r\n----\r\n<>\r\n----\r\nThank you for visiting <>.'); INSERT INTO letter (module, code, branchcode, name, is_html, title, content) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index d820b94..c4717bb 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -424,6 +424,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('UseControlNumber','0','','If ON, record control number (w subfields) and control number (001) are used for linking of bibliographic records.','YesNo'), ('UseCourseReserves','0',NULL,'Enable the course reserves feature.','YesNo'), ('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'), +('useDischarge','','','Allows librarians to discharge borrowers and borrowers to request a discharge','YesNo'), ('UseICU','0','1','Tell Koha if ICU indexing is in use for Zebra or not.','YesNo'), ('UseKohaPlugins','0','','Enable or disable the ability to use Koha Plugins.','YesNo'), ('UseQueryParser','0',NULL,'If enabled, try to use QueryParser for queries.','YesNo'), diff --git a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql index 4d3ed4f..4832c8b 100644 --- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql +++ b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql @@ -14,7 +14,8 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\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 <>.\n\nThank you,\n\n<>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\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 <>.\n\nThank you,\n\n<>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\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 <>\n\nThank you,\n\n<>'), -('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <>\n\nIf you have any questions, please email us at <>.\n\nThank you,\n\n<>'); +('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <>\n\nIf you have any questions, please email us at <>.\n\nThank you,\n\n<>'), +('members', 'DISCHARGE', 'Discharge', 'Discharge for <> <>', '

Discharge

\r\n\r\nThe library <> certifies that the following borrower :\r\n\r\n <> <>\r\n Cardnumber : <>\r\n\r\nreturned all his documents.'); INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','RENEWAL','Item Renewal','Renewals','The following items have been renew:\r\n----\r\n<>\r\n----\r\nThank you for visiting <>.'); INSERT INTO letter (module, code, branchcode, name, is_html, title, content) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 94bb4ff..ce8e8b4 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8577,6 +8577,33 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } +$DBversion = "3.17.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q| + 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(q| + INSERT INTO `letter` (module, code, name, title, content) VALUES('members', 'DISCHARGE', 'Discharge', 'Discharge for <> <>', '

Discharge

\r\n\r\nThe library <> certifies that the following borrower :\r\n\r\n <> <>\r\n Cardnumber : <>\r\n\r\nreturned all his documents.') + |); + + $dbh->do(q| + ALTER TABLE borrower_debarments CHANGE type type ENUM('SUSPENSION','OVERDUES','MANUAL','DISCHARGE') NOT NULL DEFAULT 'MANUAL' + |); + + $dbh->do(q| + CREATE TABLE discharges ( + borrower int(11) DEFAULT NULL, + needed timestamp NULL DEFAULT NULL, + validated timestamp NULL DEFAULT NULL, + KEY borrower_discharges_ibfk1 (borrower), + CONSTRAINT borrower_discharges_ibfk1 FOREIGN KEY (borrower) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE + ) + |); + + print "Upgrade to $DBversion done (Bug 8007 - Add System Preferences useDischarge, the discharge notice and the new table discharges)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) -- 1.9.1