sub _get_chargeable_units {
my ($unit, $dt1, $dt2, $branchcode) = @_;
# If the due date is later than the return date
return 0 if ( $dt1 > $dt2 );
## FIXME: Add unit test
my $charge_units = 0;
my $charge_duration;
if ($unit eq 'hours') {
-