[Koha-bugs] [Bug 20912] Rental fees based on time period
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Nov 8 10:22:06 CET 2018
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20912
Tomás Cohen Arazi <tomascohen at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tomascohen at gmail.com
--- Comment #25 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
I have a few remarks:
my ($rentalCharge) = GetIssuingCharges( $item->{'itemnumber'},
$patron->borrowernumber );
+ my $itemtype = Koha::ItemTypes->find( $item->{itype} ); # GetItem sets
effective itemtype
+ $rentalCharge += $itemtype->calc_rental_charge_daily( { from =>
dt_from_string(), to => $duedate } );
This doesn't look right, shouldn't it be either a fixed charge or the daily
calculated one but not both?? If it was two different charges, we might better
have separate offsets for them, right?
I would remove any fee calculation from Koha::ItemType (same for using
userenv). It should only return the 'daily' charge and let some other class
handle the calculation. I've been thinking of
my $fee = Koha::Fee->new({ library => $library, patron => $patron, item =>
$item, datetime_due => $dt });
This is of course out of the scope of this bug, but with that in mind, I concur
on Martin's proposal of having GetIssuingCharges do it on this bug. The only
concern I have is offsets.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list