Bug 22530

Summary: Koha::Charges::Fees-?accumulate_rentalcharge dies if no issuingrule is found
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: Architecture, internals, and plumbingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: jonathan.druart
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

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)