=cut
sub CalcFine {
- my ( $item, $bortype, $branchcode, $start_date, $end_date ) = @_;
+ my ( $item, $bortype, $branchcode, $due_dt, $end_date ) = @_;
+ my $start_date = $due_dt->clone();
my $dbh = C4::Context->dbh;
my $amount = 0;
my $charge_duration;
$chargeable_units = $charge_duration->hours(); # TODO closed times???
}
else {
- $chargeable_units = $charge_duration->day;
+ $chargeable_units = $charge_duration->days;
}
my $days_minus_grace = $chargeable_units - $data->{firstremind};
if ($data->{'chargeperiod'} && $days_minus_grace ) {