Lines 408-418
subtest 'accumulate_rentalcharge tests' => sub {
Link Here
|
408 |
} |
408 |
} |
409 |
); |
409 |
); |
410 |
|
410 |
|
411 |
t::lib::Mocks::mock_preference( 'finesCalendar', 'ignoreCalendar' ); |
411 |
$itemtype->rentalcharge_hourly_calendar(0)->store(); |
412 |
$charge = $fees->accumulate_rentalcharge(); |
412 |
$charge = $fees->accumulate_rentalcharge(); |
413 |
is( $charge, 24.00, 'Hourly rental charge calculated correctly (96h * 0.25u)' ); |
413 |
is( $charge, 24.00, 'Hourly rental charge calculated correctly (96h * 0.25u)' ); |
414 |
|
414 |
|
415 |
t::lib::Mocks::mock_preference( 'finesCalendar', 'noFinesWhenClosed' ); |
415 |
$itemtype->rentalcharge_hourly_calendar(1)->store(); |
416 |
$charge = $fees->accumulate_rentalcharge(); |
416 |
$charge = $fees->accumulate_rentalcharge(); |
417 |
is( $charge, 18.00, |
417 |
is( $charge, 18.00, |
418 |
"Hourly rental charge calculated correctly with finesCalendar = noFinesWhenClosed and closed $dayname (96h - 24h * 0.25u)" |
418 |
"Hourly rental charge calculated correctly with finesCalendar = noFinesWhenClosed and closed $dayname (96h - 24h * 0.25u)" |
Lines 423-430
subtest 'accumulate_rentalcharge tests' => sub {
Link Here
|
423 |
is( $charge, 24.00, |
423 |
is( $charge, 24.00, |
424 |
"Hourly rental charge calculated correctly with finesCalendar = noFinesWhenClosed and closed $dayname (96h - 24h * 0.25u) and rentalcharge_hourly_calendar = 0" |
424 |
"Hourly rental charge calculated correctly with finesCalendar = noFinesWhenClosed and closed $dayname (96h - 24h * 0.25u) and rentalcharge_hourly_calendar = 0" |
425 |
); |
425 |
); |
426 |
$itemtype->rentalcharge_hourly_calendar(1)->store(); |
|
|
427 |
|
426 |
|
|
|
427 |
$itemtype->rentalcharge_hourly_calendar(1)->store(); |
428 |
$calendar->delete_holiday( weekday => $closed_day ); |
428 |
$calendar->delete_holiday( weekday => $closed_day ); |
429 |
$charge = $fees->accumulate_rentalcharge(); |
429 |
$charge = $fees->accumulate_rentalcharge(); |
430 |
is( $charge, 24.00, 'Hourly rental charge calculated correctly with finesCalendar = noFinesWhenClosed (96h - 0h * 0.25u)' ); |
430 |
is( $charge, 24.00, 'Hourly rental charge calculated correctly with finesCalendar = noFinesWhenClosed (96h - 0h * 0.25u)' ); |
431 |
- |
|
|