Bug 24259: Handle non existing default circ rule in Charges::Fees
Can't call method "lengthunit" on an undefined value at /usr/share/koha/lib/Koha/Charges/Fees.pm line 101. Test plan: 1 - Remove all/all rule form circulation rules 2 - Define a rental fee per day for an itemtype 3 - Checkout an item of this type ot patron 4 - Should get note of no circ rule defined 5 - Confirm the checkout => item is checked out Signed-off-by: hc <hc@interleaf.ie> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
5b58cee945
commit
5432cbd92a
|
|
@ -98,6 +98,8 @@ sub accumulate_rentalcharge {
|
|||
branchcode => $self->library->id
|
||||
}
|
||||
);
|
||||
return 0 unless $issuing_rule;
|
||||
|
||||
my $units = $issuing_rule->lengthunit;
|
||||
my $rentalcharge_increment =
|
||||
( $units eq 'days' )
|
||||
|
|
|
|||
Loading…
Reference in New Issue