Commit graph

21 commits

Author SHA1 Message Date
Donovan Jones
cf7926889b Bug 2505 - remove unnecessary -w and replace with use warnings;
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-07 13:27:07 -04:00
Lars Wirzenius
87d845969e Fix FSF address in directory misc/
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:17:54 -04:00
J. David Bavousett
68bbe0d596 Modified to use dirspec only
This commit modifies overdue_notices so that the -html parameter
only requires a directory specification.
2010-02-22 10:51:36 -05:00
Kyle M Hall
af5ad339f7 Bug 3482 Print Notices via HTML
Modified overdue_notices.pl to support output of html for printing.
The -html option will e-mail notices to those with e-mail, and output
html to print for borrowers without e-mail.

When system preference PrintNoticesMaxLines is set to a positive
integer, it will limit the number of items on the notice to that
number, and append a message to the end telling the borrower to
check his or her account for the full listing of items.  This only
affects print notices, not emailed ones.

Mandatory SQL:

INSERT INTO `systempreferences`
  ( `variable` , `value` , `options` , `explanation` , `type` ) i
  VALUES ( 'PrintNoticesMaxLines', '0', '', i
  'If greater than 0, sets the maximum number of lines an overdue notice will print. If the number of items is greater than this number, the notice will end with a warning asking the borrower to check their online account for a full list of overdue items.',
  'Integer' );

Conflicts:

	installer/data/mysql/en/mandatory/sysprefs.sql
	installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
	misc/cronjobs/overdue_notices.pl
2010-02-22 10:51:26 -05:00
Chris Nighswonger
599887a185 Bugfix: [1/3] overdue_notices.pl does not process all advertised fields
Note: overdue_notices.pl really needs to be completely re-written.

The script does not process all fields advertised in tools/letter.pl
This patch adds code to process all fields advertised as well as any
from the items table.

It also adds two additional tags for use in the letter templates:

<item></item> which should enclose all fields from the biblio, biblioitems,
and items tables.

<fine></fine> which should be enclosed by the item tag and should
enclose a currency identifier per ISO 4217. If this tag is present with
a proper identifier, the fine for that item will be displayed in the
proper currency format. Note: ISO 4217 changes from time to time therefore
all currencies may not be supported. If you find one that is not
supported, please file a bug with the Locale::Currency::Format author
Tan D Nguyen <tnguyen at cpan doe org>.

An example of the implimentation of these two tags in a notice template
might be like:

The following item(s) is/are currently overdue:

<item>"<<biblio.title>>" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> Fine: <fine>GBP</fine></item>

Which, assuming two items were overdue, would result in a notice like:

The following item(s) is/are currently overdue:

"A Short History of Western Civilization" by Harrison, John B, 909.09821 H2451, Barcode: 08030003 Fine: £3.50
"History of Western Civilization" by Hayes, Carlton Joseph Huntley, 909.09821 H3261 v.1, Barcode: 08030004 Fine: £3.50

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-17 06:36:01 -05:00
afcfb0e8bd overdue_notices.pl send no email directly to patron
Something prevents overdue_notices.pl to send message directly to patron
email.
2010-01-15 09:59:32 +01:00
f1bc7f4094 overdue_notices.pl various bugs in HEAD 3.2
Those bugs must have been introduced by merge?

- Overdue to all libraries with overdue rules doesn't work
- Overdue to a specific library doesn't work also
2010-01-15 09:59:19 +01:00
Henri-Damien LAURENT
213b78174b (bug #3695) allow to limit overdues by categorycode
This add two new options to overdue_notices.pl to select only overdues for few categorycodes, or to exclude few categorycodes.

Conflicts solved misc/cronjobs/overdue_notices.pl
2009-10-07 11:49:01 +02:00
Matthias Meusburger
daae4090e3 0001097: relances par bib 2009-10-06 11:36:21 +02:00
Nahuel ANGELINETTI
7e9c50ecda (bug #3573) use delimiter syspref generating overdues csv
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-09-30 11:30:13 +02:00
Sébastien Hinderer
f1f833c965 bug 3464: Takes columns country and B_country of table borrowers into account in related operations.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2009-08-23 18:19:20 -04:00
Nahuel ANGELINETTI
aea15bca2a (bug #3011) csv export doesn't fill all the fields
This patch just fix the script which export to csv the overdue, and field the missing fields

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 08:00:15 -06:00
Joe Atzberger
4a3fcbbe0d Comment out unused variable.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-03 09:17:41 -06:00
Ryan Higgins
4104c69757 Bug 2660: Add command-line options to overdue notice script.
This commit adds two options to the overdue_notices.pl script.
The notices are now generated in one of two modes: default or triggered.
In default mode, every time the script runs, a notice is generated if an item
is overdue within a notice date range.  This mode is suitable for a weekly cron
(or manual run), but the notice triggers should be syncronized with the cron script such that
the script is run once per notice date range.  Otherwise, duplicate messages will
be generated ( or no notice generated if a notice date range passes without the script being run).
Triggered mode is suitable for a nightly cron job: a notice is generated only on those
days that an overdue item enters a notice date range.  This mode is susceptible to message
loss when the cron script fails to run, or when notice triggers are edited.

A second flag is added: --list-all, which causes items.content to list all currently overdue items.
Without this flag, only items that are overdue within the given notice's date range are listed on
that notice.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-21 10:35:34 -05:00
Pianohacker
861069e269 fix date formatting in overdue_notices.pl
This makes overdue_notices.pl format dates in fields that both start and end with 'date'.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-01 12:46:16 -05:00
720b31e0b4 Bugfix #2633
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-09-26 09:12:29 -05:00
Joshua Ferraro
482a87eaf9 Revert "Add missing to and from email addresses to user and admin EnqueueLetter calls, respectively. Add extra level to verbosity."
This reverts commit 67f229cba7.
2008-08-08 10:51:45 -05:00
Southeastern University
67f229cba7 Add missing to and from email addresses to user and admin EnqueueLetter calls, respectively. Add extra level to verbosity.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-08-08 06:10:31 -05:00
Galen Charlton
6e1869abcf bug 2473: correct display of items.content
Correct bug in output of overdue notices that has
items.content displaying only the number of columns
in each items.content structure (currently, 4).

Patch inspired by patch submitted by Paul Poulain.

[LL bug 31]

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-08-05 15:12:02 -05:00
Andrew Moore
cd6d0c5d60 bug 2386: adding newline between items in overdue notices
The lines for each item in the overdue notices were not separated by newlines. This cause them to
all be smashed together. I'm putting a newline between them.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-24 11:22:03 -05:00
Andrew Moore
8ae66932cd Bug 2274 [3/5]: consolidating overdue notice cronjobs into one
This patch adds the misc/cronjobs/overdue_notices.pl script that is intended to replace
overduenotices.pl, overduenotices-30.pl and overduenotices-csv.pl. It adds messages to
the message_queue to be sent later (by process_message_queue.pl). It also marks borrowers
as debarred if their issues become too overdue.

It is intended to be run from cron nightly with usage something like:
0 2 * * * misc/cronjobs/overdue_notices.pl

C4::Members:
 - improved documentation on ModMember
 - made ModMember return a useful value (the return value of the database call)
 - added a DebarMember method
 - adding t/lib/KohaTest/Members/DebarMember.pm to test ModMember

misc/cronjobs/overdue_notices.pl
 - designed to replace overduenotices.pl, overduenotices-30.pl, and overduenotice-csv

Changes to C4::Letters:
 - EnqueueLetter now lets you pass in to_address and from_address which can override defaults
 - _send_message_by_email pays attention to these defaults.
 - now handles attachments with MIME::Lite

C4::Overdues
 - added GetBranchcodesWithOverdueRules
   - added t/lib/KohaTest/Overdues/GerBranchcodesWithOverdueRules.pm to test that.

circ/overdue.pl
 - replaced call to obsolete overduenotices-csv.pl with call to overdue_notices.pl

KohaTest:
 - added three helper methods: random_phone, random_email, random_ip
   - these can be used to populate example records
 - you can now pass an optional lengh to random_string

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-10 09:10:46 -05:00