Bug 13018 : Static fine should be charged only once
authorSophie Meynieux <sophie.meynieux@biblibre.com>
Wed, 1 Oct 2014 12:16:48 +0000 (14:16 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Tue, 11 Nov 2014 12:44:01 +0000 (09:44 -0300)
commit40ece625bba3ac1733bef69ac33871d16aa5834a
treee956290defcd87827fc8826f3c3eb8960c621a66
parent561b474bc98e6c60d808ccdcb68a96c9c817dc48
Bug 13018 : Static fine should be charged only once

Test plan (see Bug 6858 for using staticfine.pl) :

For a user (of a given category and library) with several overdues, launch the script :

staticfines.pl --category CAT,AMOUNT --library LIB --delay DELAY

Then, check that the user has been charged of AMOUNT if the due date of the most late item plus the delay is *before* today.

One day later, re-execute the script with the same parameters and check that the fine has not been charged twice.

Without patch, the fine is charged twice, with patch the user already charged is skipped (see output in debug mode)

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Without the patch, the fine will be applied every time the script is run.
With the patch the fine will only be applied once.
Passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
C4/Overdues.pm
misc/cronjobs/staticfines.pl