Bug 22530 - Koha::Charges::Fees-?accumulate_rentalcharge dies if no issuingrule is found
Summary: Koha::Charges::Fees-?accumulate_rentalcharge dies if no issuingrule is found
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-18 13:34 UTC by Nick Clemens (kidclamp)
Modified: 2019-03-18 13:34 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2019-03-18 13:34:32 UTC
We are checking to see the rental fee for an item, but assume that a rule was found

101     my $units = $issuing_rule->lengthunit;
102     my $rentalcharge_increment = ( $units eq 'days' ) ? $itemtype->rentalcharge_daily : $itemtype->rentalcharge_hourly;

we should set the unit to 'days' if no rule found or simply return 0 (no charge if you aren't allowed to issue)