[OPEN-ILS-DEV] [RFC] Price (or percent thereof) as max fine amount.

Mike Rylander mrylander at gmail.com
Sun Jul 27 11:21:34 EDT 2008


On Sun, Jul 27, 2008 at 8:52 AM, Bill Erickson <erickson at esilibrary.com> wrote:
> On Saturday 26 July 2008 10:52 Mike Rylander wrote:
[snip]
>>
>> * The config.rule_max_fine table gets a new boolean column called
>> is_percent which defaults to false
>> * The IDL (and, for good measure, the storage server's ancient
>> equivelant) is taught about this new field
>> * OpenILS::Circ::Circulate::build_checkout_circ_object inspects this
>> field on the chosen rule for truthiness, and finding a positive
>> result:
>>   - gets the item price from the copy and
>>   - if that's null (not allowed yet, but will be in 1.4) attempts to
>> find an org_unit-appropriate default item price (also used for LOST
>> fee)
>>   - or, if price == 0 and the "charge default on 0-price" org unit
>> setting is true, attempts to find an org_unit-appropriate default item
>> price (also used for LOST fee)
>>   - and now, having found an appropriate full price for the item,
>> interprets the max fine amount as a percentage value, scaling the full
>> price as specified
>>   - and finally, uses that amount as the max fine amount, instead of a
>> specific value
>>
[snip]
>
>
> I think it's a great addition.  I eyeballed the patch and it looks good.
> (comment:  instead of redefining isTrue, we can use $U->isTrue).
>
> One addition to consider is adding an org-setting cache (just a local data
> structure) for default item price and charge-on-0 to reduce network calls.
> That can come later, though.
>

Next question is ... how far back do we backport this.  I would lobby
for 1.2.3.0, but not to strongly.

-- 
Mike Rylander
 | VP, Research and Design
 | Equinox Software, Inc. / The Evergreen Experts
 | phone: 1-877-OPEN-ILS (673-6457)
 | email: miker at esilibrary.com
 | web: http://www.esilibrary.com


More information about the Open-ils-dev mailing list