]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1198465 Move fine generation into CircCommon
authorDan Wells <dbw2@calvin.edu>
Mon, 24 Nov 2014 22:10:31 +0000 (17:10 -0500)
committerBill Erickson <berickxx@gmail.com>
Fri, 20 Feb 2015 21:20:43 +0000 (16:20 -0500)
commit38fab9211ed8c830b511ba5e4f8c262c1253a9f3
tree25f860bdcddb11605150901ff25ada5eb2426a10
parent1d2a885426d74841bbc912e868b62e08bd65baec
LP#1198465 Move fine generation into CircCommon

Allows circulation code to generate fines within the main circulation
database transaction.

Squahed commits:

LP#1198465 Initial copy of generate_fines to CircCommon.pm

Copy over generate_fines, including the necessary 'ceil' and $parser
bits, and the seconds_to_interval_hash helper function.

LP#1198465 First pass at generate_fines cstore conversion

Broadly speaking, this commit does two things:

1) Rewrite bits of the generate_fines copy in CircCommon.pm to use
cstore in place of the DBI code bits.
2) Gut the old generate_fines in Publisher/action.pm, including helper
bits, then make it a wrapper for the CircCommon verison.

This is a rough pass, but works in basic testing.

LP#1198465 Make generate_fines() chattiness optional

The old storage generate_fines() was really chatty with it's client. We
generally won't want that, so make it optional.

Also, remove one response which I added earlier while debugging.

LP#1198465 Stop using storage wrapper for generate_fines()

With pieces now in place, let's stop using the storage wrapper for
generate_fines() and call the code directly.

Also, to avoid potential confusion, rename the calling function in
Circulate.pm from generate_fines() to handle_fines().  This function
may also be taking on more than just fine generation in the near future.

Finally, since the new generate_fines() expects one or more pre-filtered
circ objects, add the requisite stop_fines check to handle_fines().

LP#1198465 Put penalty generation in the same xact

The penalties need to "see" any fines we may have just added, so they
need to happen in the same transaction.  Passing in the optional editor
makes this an easy fix.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm