https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20912

Tomás Cohen Arazi <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #25 from Tomás Cohen Arazi <[email protected]> ---
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.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to