View | Details | Raw Unified | Return to bug 20912
Collapse All | Expand All

(-)a/C4/Circulation.pm (-11 / +11 lines)
Lines 1004-1010 sub CanBookBeIssued { Link Here
1004
    if ( $rentalConfirmation ){
1004
    if ( $rentalConfirmation ){
1005
        my ($rentalCharge) = GetIssuingCharges( $item->itemnumber, $patron->borrowernumber );
1005
        my ($rentalCharge) = GetIssuingCharges( $item->itemnumber, $patron->borrowernumber );
1006
        my $itemtype = Koha::ItemTypes->find( $item->itype ); # GetItem sets effective itemtype
1006
        my $itemtype = Koha::ItemTypes->find( $item->itype ); # GetItem sets effective itemtype
1007
        $rentalCharge += $itemtype->calc_rental_charge_daily( { from => dt_from_string(), to => $duedate } );
1007
        $rentalCharge += $fees->accumulate_rentalcharge({ from => dt_from_string(), to => $duedate });
1008
        if ( $rentalCharge > 0 ){
1008
        if ( $rentalCharge > 0 ){
1009
            $needsconfirmation{RENTALCHARGE} = $rentalCharge;
1009
            $needsconfirmation{RENTALCHARGE} = $rentalCharge;
1010
        }
1010
        }
Lines 1464-1470 sub AddIssue { Link Here
1464
            );
1464
            );
1465
            ModDateLastSeen( $item->itemnumber );
1465
            ModDateLastSeen( $item->itemnumber );
1466
1466
1467
           # If it costs to borrow this book, charge it to the patron's account.
1467
            # If it costs to borrow this book, charge it to the patron's account.
1468
            my ( $charge, $itemtype ) = GetIssuingCharges( $item->itemnumber, $borrower->{'borrowernumber'} );
1468
            my ( $charge, $itemtype ) = GetIssuingCharges( $item->itemnumber, $borrower->{'borrowernumber'} );
1469
            if ( $charge > 0 ) {
1469
            if ( $charge > 0 ) {
1470
                my $description = "Rental";
1470
                my $description = "Rental";
Lines 1473-1482 sub AddIssue { Link Here
1473
1473
1474
            my $itemtype = Koha::ItemTypes->find( $item_object->effective_itemtype );
1474
            my $itemtype = Koha::ItemTypes->find( $item_object->effective_itemtype );
1475
            if ( $itemtype ) {
1475
            if ( $itemtype ) {
1476
                my $daily_charge = $fees->rental_charge_daily();
1476
                my $accumulate_charge = $fees->accumulate_rentalcharge();
1477
                if ( $daily_charge > 0 ) {
1477
                if ( $accumulate_charge > 0 ) {
1478
                    AddIssuingCharge( $issue, $daily_charge, 'Daily rental' ) if $daily_charge > 0;
1478
                    AddIssuingCharge( $issue, $accumulate_charge, 'Daily rental' ) if $accumulate_charge > 0;
1479
                    $charge += $daily_charge;
1479
                    $charge += $accumulate_charge;
1480
                    $item->{charge} = $charge;
1480
                    $item->{charge} = $charge;
1481
                }
1481
                }
1482
            }
1482
            }
Lines 2923-2937 sub AddRenewal { Link Here
2923
        AddIssuingCharge($issue, $charge, $description);
2923
        AddIssuingCharge($issue, $charge, $description);
2924
    }
2924
    }
2925
2925
2926
    # Charge a new daily rental fee, if applicable
2926
    # Charge a new accumulate rental fee, if applicable
2927
    my $itemtype = Koha::ItemTypes->find( $item_object->effective_itemtype );
2927
    my $itemtype = Koha::ItemTypes->find( $item_object->effective_itemtype );
2928
    if ( $itemtype ) {
2928
    if ( $itemtype ) {
2929
        my $daily_charge = $fees->rental_charge_daily();
2929
        my $accumulate_charge = $fees->accumulate_rentalcharge();
2930
        if ( $daily_charge > 0 ) {
2930
        if ( $accumulate_charge > 0 ) {
2931
            my $type_desc = "Renewal of Daily Rental Item " . $biblio->title . " $item->{'barcode'}";
2931
            my $type_desc = "Renewal of Daily Rental Item " . $biblio->title . " $item->{'barcode'}";
2932
            AddIssuingCharge( $issue, $daily_charge, $type_desc )
2932
            AddIssuingCharge( $issue, $accumulate_charge, $type_desc )
2933
        }
2933
        }
2934
        $charge += $daily_charge;
2934
        $charge += $accumulate_charge;
2935
    }
2935
    }
2936
2936
2937
    # Send a renewal slip according to checkout alert preferencei
2937
    # Send a renewal slip according to checkout alert preferencei
(-)a/Koha/Charges/Fees.pm (-6 / +6 lines)
Lines 75-96 sub new { Link Here
75
    return bless( $params, $class );
75
    return bless( $params, $class );
76
}
76
}
77
77
78
=head3 rental_charge_daily
78
=head3 accumulate_rentalcharge
79
79
80
    my $fee = $self->rental_charge_daily();
80
    my $fee = $self->accumulate_rentalcharge();
81
81
82
    This method calculates the daily rental fee for a given itemtype for a given
82
    This method calculates the daily rental fee for a given itemtype for a given
83
    period of time passed in as a pair of DateTime objects.
83
    period of time passed in as a pair of DateTime objects.
84
84
85
=cut
85
=cut
86
86
87
sub rental_charge_daily {
87
sub accumulate_rentalcharge {
88
    my ( $self, $params ) = @_;
88
    my ( $self, $params ) = @_;
89
89
90
    my $itemtype = Koha::ItemTypes->find( $self->item->effective_itemtype );
90
    my $itemtype = Koha::ItemTypes->find( $self->item->effective_itemtype );
91
    my $rental_charge_daily = $itemtype->rental_charge_daily;
91
    my $rentalcharge_daily = $itemtype->rentalcharge_daily;
92
92
93
    return undef unless $rental_charge_daily && $rental_charge_daily > 0;
93
    return undef unless $rentalcharge_daily && $rentalcharge_daily > 0;
94
94
95
    my $duration;
95
    my $duration;
96
    if ( C4::Context->preference('finesCalendar') eq 'noFinesWhenClosed' ) {
96
    if ( C4::Context->preference('finesCalendar') eq 'noFinesWhenClosed' ) {
Lines 102-108 sub rental_charge_daily { Link Here
102
    }
102
    }
103
    my $days = $duration->in_units('days');
103
    my $days = $duration->in_units('days');
104
104
105
    my $charge = $rental_charge_daily * $days;
105
    my $charge = $rentalcharge_daily * $days;
106
106
107
    return $charge;
107
    return $charge;
108
}
108
}
(-)a/Koha/Schema/Result/Itemtype.pm (-2 / +2 lines)
Lines 41-47 __PACKAGE__->table("itemtypes"); Link Here
41
  is_nullable: 1
41
  is_nullable: 1
42
  size: [28,6]
42
  size: [28,6]
43
43
44
=head2 rental_charge_daily
44
=head2 rentalcharge_daily
45
45
46
  data_type: 'decimal'
46
  data_type: 'decimal'
47
  is_nullable: 1
47
  is_nullable: 1
Lines 115-121 __PACKAGE__->add_columns( Link Here
115
  { data_type => "longtext", is_nullable => 1 },
115
  { data_type => "longtext", is_nullable => 1 },
116
  "rentalcharge",
116
  "rentalcharge",
117
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
117
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
118
  "rental_charge_daily",
118
  "rentalcharge_daily",
119
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
119
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
120
  "defaultreplacecost",
120
  "defaultreplacecost",
121
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
121
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
(-)a/admin/itemtypes.pl (-3 / +3 lines)
Lines 72-78 if ( $op eq 'add_form' ) { Link Here
72
    my $itemtype     = Koha::ItemTypes->find($itemtype_code);
72
    my $itemtype     = Koha::ItemTypes->find($itemtype_code);
73
    my $description  = $input->param('description');
73
    my $description  = $input->param('description');
74
    my $rentalcharge = $input->param('rentalcharge');
74
    my $rentalcharge = $input->param('rentalcharge');
75
    my $rental_charge_daily = $input->param('rental_charge_daily');
75
    my $rentalcharge_daily = $input->param('rentalcharge_daily');
76
    my $defaultreplacecost = $input->param('defaultreplacecost');
76
    my $defaultreplacecost = $input->param('defaultreplacecost');
77
    my $processfee = $input->param('processfee');
77
    my $processfee = $input->param('processfee');
78
    my $image = $input->param('image') || q||;
78
    my $image = $input->param('image') || q||;
Lines 93-99 if ( $op eq 'add_form' ) { Link Here
93
    if ( $itemtype and $is_a_modif ) {    # it's a modification
93
    if ( $itemtype and $is_a_modif ) {    # it's a modification
94
        $itemtype->description($description);
94
        $itemtype->description($description);
95
        $itemtype->rentalcharge($rentalcharge);
95
        $itemtype->rentalcharge($rentalcharge);
96
        $itemtype->rental_charge_daily($rental_charge_daily);
96
        $itemtype->rentalcharge_daily($rentalcharge_daily);
97
        $itemtype->defaultreplacecost($defaultreplacecost);
97
        $itemtype->defaultreplacecost($defaultreplacecost);
98
        $itemtype->processfee($processfee);
98
        $itemtype->processfee($processfee);
99
        $itemtype->notforloan($notforloan);
99
        $itemtype->notforloan($notforloan);
Lines 118-124 if ( $op eq 'add_form' ) { Link Here
118
                itemtype            => $itemtype_code,
118
                itemtype            => $itemtype_code,
119
                description         => $description,
119
                description         => $description,
120
                rentalcharge        => $rentalcharge,
120
                rentalcharge        => $rentalcharge,
121
                rental_charge_daily => $rental_charge_daily,
121
                rentalcharge_daily => $rentalcharge_daily,
122
                defaultreplacecost  => $defaultreplacecost,
122
                defaultreplacecost  => $defaultreplacecost,
123
                processfee          => $processfee,
123
                processfee          => $processfee,
124
                notforloan          => $notforloan,
124
                notforloan          => $notforloan,
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 951-957 CREATE TABLE `itemtypes` ( -- defines the item types Link Here
951
  itemtype varchar(10) NOT NULL default '', -- unique key, a code associated with the item type
951
  itemtype varchar(10) NOT NULL default '', -- unique key, a code associated with the item type
952
  description LONGTEXT, -- a plain text explanation of the item type
952
  description LONGTEXT, -- a plain text explanation of the item type
953
  rentalcharge decimal(28,6) default NULL, -- the amount charged when this item is checked out/issued
953
  rentalcharge decimal(28,6) default NULL, -- the amount charged when this item is checked out/issued
954
  rental_charge_daily decimal(28,6) default NULL, -- the amount charged for each day between checkout date and due date
954
  rentalcharge_daily decimal(28,6) default NULL, -- the amount charged for each increment (day/hour) between checkout date and due date
955
  defaultreplacecost decimal(28,6) default NULL, -- default replacement cost
955
  defaultreplacecost decimal(28,6) default NULL, -- default replacement cost
956
  processfee decimal(28,6) default NULL, -- default text be recorded in the column note when the processing fee is applied
956
  processfee decimal(28,6) default NULL, -- default text be recorded in the column note when the processing fee is applied
957
  notforloan smallint(6) default NULL, -- 1 if the item is not for loan, 0 if the item is available for loan
957
  notforloan smallint(6) default NULL, -- 1 if the item is not for loan, 0 if the item is available for loan
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt (-3 / +3 lines)
Lines 234-241 Item types administration Link Here
234
                    <span class="hint">This fee is charged once per checkout/renewal per item</span>
234
                    <span class="hint">This fee is charged once per checkout/renewal per item</span>
235
                </li>
235
                </li>
236
                <li>
236
                <li>
237
                    <label for="rental_charge_daily">Daily rental charge: </label>
237
                    <label for="rentalcharge_daily">Daily rental charge: </label>
238
                    <input type="text" id="rental_charge_daily" name="rental_charge_daily" size="10" value="[% itemtype.rental_charge_daily | $Price %]" />
238
                    <input type="text" id="rentalcharge_daily" name="rentalcharge_daily" size="10" value="[% itemtype.rentalcharge_daily | $Price %]" />
239
                    <span class="hint">This fee is charged a checkout/renewal time for each day between the checkout/renewal date and due date.</span>
239
                    <span class="hint">This fee is charged a checkout/renewal time for each day between the checkout/renewal date and due date.</span>
240
                </li>
240
                </li>
241
                <li>
241
                <li>
Lines 380-386 Item types administration Link Here
380
            </td>
380
            </td>
381
            <td>
381
            <td>
382
            [% UNLESS ( itemtype.notforloan ) %]
382
            [% UNLESS ( itemtype.notforloan ) %]
383
              [% itemtype.rental_charge_daily | $Price %]
383
              [% itemtype.rentalcharge_daily | $Price %]
384
            [% END %]
384
            [% END %]
385
            </td>
385
            </td>
386
            <td>[% itemtype.defaultreplacecost | $Price %]</td>
386
            <td>[% itemtype.defaultreplacecost | $Price %]</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt (-1 / +1 lines)
Lines 35-41 Link Here
35
        <li><span class="label">Item type:</span> [% itemtypename | html %]&nbsp;</li>
35
        <li><span class="label">Item type:</span> [% itemtypename | html %]&nbsp;</li>
36
        [% END %]
36
        [% END %]
37
        [% IF ( rentalcharge ) %]<li><span class="label">Rental charge:</span>[% rentalcharge | $Price %]&nbsp;</li>[% END %]
37
        [% IF ( rentalcharge ) %]<li><span class="label">Rental charge:</span>[% rentalcharge | $Price %]&nbsp;</li>[% END %]
38
        [% IF ( rental_charge_daily ) %]<li><span class="label">Daily rental charge:</span>[% rental_charge_daily | $Price %]&nbsp;</li>[% END %]
38
        [% IF ( rentalcharge_daily ) %]<li><span class="label">Daily rental charge:</span>[% rentalcharge_daily | $Price %]&nbsp;</li>[% END %]
39
        <li><span class="label">ISBN:</span> [% isbn | html %]&nbsp;</li>
39
        <li><span class="label">ISBN:</span> [% isbn | html %]&nbsp;</li>
40
        <li><span class="label">Publisher:</span>[% place | html %] [% publishercode | html %] [% publicationyear | html %]&nbsp;</li>
40
        <li><span class="label">Publisher:</span>[% place | html %] [% publishercode | html %] [% publicationyear | html %]&nbsp;</li>
41
        [% IF ( volumeddesc ) %]<li><span class="label">Volume:</span> [% volumeddesc | html %]</li>[% END %]
41
        [% IF ( volumeddesc ) %]<li><span class="label">Volume:</span> [% volumeddesc | html %]</li>[% END %]
(-)a/t/db_dependent/Circulation.t (-7 / +64 lines)
Lines 18-24 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
use utf8;
19
use utf8;
20
20
21
use Test::More tests => 125;
21
use Test::More tests => 126;
22
use Test::MockModule;
22
use Test::MockModule;
23
23
24
use Data::Dumper;
24
use Data::Dumper;
Lines 75-81 my $itemtype = $builder->build( Link Here
75
        value  => {
75
        value  => {
76
            notforloan          => undef,
76
            notforloan          => undef,
77
            rentalcharge        => 0,
77
            rentalcharge        => 0,
78
            rental_charge_daily => 0,
78
            rentalcharge_daily => 0,
79
            defaultreplacecost  => undef,
79
            defaultreplacecost  => undef,
80
            processfee          => undef
80
            processfee          => undef
81
        }
81
        }
Lines 1962-1968 subtest '_FixAccountForLostAndReturned' => sub { Link Here
1962
                rentalcharge       => 0,
1962
                rentalcharge       => 0,
1963
                defaultreplacecost => undef,
1963
                defaultreplacecost => undef,
1964
                processfee         => $processfee_amount,
1964
                processfee         => $processfee_amount,
1965
                rental_charge_daily => 0,
1965
                rentalcharge_daily => 0,
1966
            }
1966
            }
1967
        }
1967
        }
1968
    );
1968
    );
Lines 2260-2266 subtest '_FixAccountForLostAndReturned' => sub { Link Here
2260
                    rentalcharge       => 0,
2260
                    rentalcharge       => 0,
2261
                    defaultreplacecost => undef,
2261
                    defaultreplacecost => undef,
2262
                    processfee         => 0,
2262
                    processfee         => 0,
2263
                    rental_charge_daily => 0,
2263
                    rentalcharge_daily => 0,
2264
                }
2264
                }
2265
            }
2265
            }
2266
        );
2266
        );
Lines 2864-2870 subtest 'AddRenewal and AddIssuingCharge tests' => sub { Link Here
2864
    );
2864
    );
2865
2865
2866
    my $library  = $builder->build_object({ class => 'Koha::Libraries' });
2866
    my $library  = $builder->build_object({ class => 'Koha::Libraries' });
2867
    my $itemtype = $builder->build_object({ class => 'Koha::ItemTypes', value => { rental_charge_daily => 0.00 }});
2867
    my $itemtype = $builder->build_object({ class => 'Koha::ItemTypes', value => { rentalcharge_daily => 0.00 }});
2868
    my $patron   = $builder->build_object({
2868
    my $patron   = $builder->build_object({
2869
        class => 'Koha::Patrons',
2869
        class => 'Koha::Patrons',
2870
        value => { branchcode => $library->id }
2870
        value => { branchcode => $library->id }
Lines 3029-3035 subtest 'Incremented fee tests' => sub { Link Here
3029
            value  => {
3029
            value  => {
3030
                notforloan          => undef,
3030
                notforloan          => undef,
3031
                rentalcharge        => 0,
3031
                rentalcharge        => 0,
3032
                rental_charge_daily => 1.000000
3032
                rentalcharge_daily => 1.000000
3033
            }
3033
            }
3034
        }
3034
        }
3035
    )->store;
3035
    )->store;
Lines 3051-3057 subtest 'Incremented fee tests' => sub { Link Here
3051
        }
3051
        }
3052
    )->store;
3052
    )->store;
3053
3053
3054
    is( $itemtype->rental_charge_daily, '1.000000', 'Daily rental charge stored and retreived correctly' );
3054
    is( $itemtype->rentalcharge_daily, '1.000000', 'Daily rental charge stored and retreived correctly' );
3055
    is( $item->effective_itemtype, $itemtype->id, "Itemtype set correctly for item");
3055
    is( $item->effective_itemtype, $itemtype->id, "Itemtype set correctly for item");
3056
3056
3057
    my $dt_from = dt_from_string();
3057
    my $dt_from = dt_from_string();
Lines 3108-3110 subtest 'Incremented fee tests' => sub { Link Here
3108
    $accountlines->delete();
3108
    $accountlines->delete();
3109
    $issue->delete();
3109
    $issue->delete();
3110
};
3110
};
3111
3112
subtest 'CanBookBeIssued & RentalFeesCheckoutConfirmation' => sub {
3113
    plan tests => 2;
3114
3115
    t::lib::Mocks::mock_preference('RentalFeesCheckoutConfirmation', 1);
3116
    t::lib::Mocks::mock_preference('item-level_itypes', 1);
3117
3118
    my $library =
3119
      $builder->build_object( { class => 'Koha::Libraries' } )->store;
3120
    my $patron = $builder->build_object(
3121
        {
3122
            class => 'Koha::Patrons',
3123
            value => { categorycode => $patron_category->{categorycode} }
3124
        }
3125
    )->store;
3126
3127
    my $itemtype = $builder->build_object(
3128
        {
3129
            class => 'Koha::ItemTypes',
3130
            value => {
3131
                notforloan             => 0,
3132
                rentalcharge           => 0,
3133
                rentalcharge_daily => 0
3134
            }
3135
        }
3136
    );
3137
3138
    my $biblioitem = $builder->build( { source => 'Biblioitem' } );
3139
    my $item = $builder->build_object(
3140
        {
3141
            class => 'Koha::Items',
3142
            value  => {
3143
                homebranch    => $library->id,
3144
                holdingbranch => $library->id,
3145
                notforloan    => 0,
3146
                itemlost      => 0,
3147
                withdrawn     => 0,
3148
                itype         => $itemtype->id,
3149
                biblionumber  => $biblioitem->{biblionumber},
3150
                biblioitemnumber => $biblioitem->{biblioitemnumber},
3151
            }
3152
        }
3153
    )->store;
3154
3155
    my ( $issuingimpossible, $needsconfirmation );
3156
    my $dt_from = dt_from_string();
3157
    my $dt_due = dt_from_string()->add( days => 3 );
3158
3159
    $itemtype->rentalcharge('1.000000')->store;
3160
    ( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $patron, $item->barcode, $dt_due, undef, undef, undef );
3161
    is_deeply( $needsconfirmation, { RENTALCHARGE => '1' }, 'Item needs rentalcharge confirmation to be issued' );
3162
    $itemtype->rentalcharge('0')->store;
3163
    $itemtype->rentalcharge_daily('1.000000')->store;
3164
    ( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $patron, $item->barcode, $dt_due, undef, undef, undef );
3165
    is_deeply( $needsconfirmation, { RENTALCHARGE => '3' }, 'Item needs rentalcharge confirmation to be issued, increment' );
3166
    $itemtype->rentalcharge_daily('0')->store;
3167
};
(-)a/t/db_dependent/Koha/Charges/Fees.t (-8 / +7 lines)
Lines 58-64 my $itemtype = $builder->build_object( Link Here
58
    {
58
    {
59
        class => 'Koha::ItemTypes',
59
        class => 'Koha::ItemTypes',
60
        value => {
60
        value => {
61
            rental_charge_daily => '0.00',
61
            rentalcharge_daily => '0.00',
62
            rentalcharge        => '0.00',
62
            rentalcharge        => '0.00',
63
            processfee          => '0.00',
63
            processfee          => '0.00',
64
            defaultreplacecost  => '0.00',
64
            defaultreplacecost  => '0.00',
Lines 99-118 my $fees = Koha::Charges::Fees->new( Link Here
99
    }
99
    }
100
);
100
);
101
101
102
subtest 'Koha::ItemType::rental_charge_daily tests' => sub {
102
subtest 'accumulate_rentalcharge tests' => sub {
103
    plan tests => 4;
103
    plan tests => 4;
104
104
105
    $itemtype->rental_charge_daily(1.00);
105
    $itemtype->rentalcharge_daily(1.00);
106
    $itemtype->store();
106
    $itemtype->store();
107
    is( $itemtype->rental_charge_daily,
107
    is( $itemtype->rentalcharge_daily,
108
        1.00, 'Daily return charge stored correctly' );
108
        1.00, 'Daily return charge stored correctly' );
109
109
110
    t::lib::Mocks::mock_preference( 'finesCalendar', 'ignoreCalendar' );
110
    t::lib::Mocks::mock_preference( 'finesCalendar', 'ignoreCalendar' );
111
    my $charge = $fees->rental_charge_daily();
111
    my $charge = $fees->accumulate_rentalcharge();
112
    is( $charge, 6.00, 'Daily rental charge calculated correctly with finesCalendar = ignoreCalendar' );
112
    is( $charge, 6.00, 'Daily rental charge calculated correctly with finesCalendar = ignoreCalendar' );
113
113
114
    t::lib::Mocks::mock_preference( 'finesCalendar', 'noFinesWhenClosed' );
114
    t::lib::Mocks::mock_preference( 'finesCalendar', 'noFinesWhenClosed' );
115
    $charge = $fees->rental_charge_daily();
115
    $charge = $fees->accumulate_rentalcharge();
116
    is( $charge, 6.00, 'Daily rental charge calculated correctly with finesCalendar = noFinesWhenClosed' );
116
    is( $charge, 6.00, 'Daily rental charge calculated correctly with finesCalendar = noFinesWhenClosed' );
117
117
118
    my $calendar = C4::Calendar->new( branchcode => $library->id );
118
    my $calendar = C4::Calendar->new( branchcode => $library->id );
Lines 121-126 subtest 'Koha::ItemType::rental_charge_daily tests' => sub { Link Here
121
        title       => 'Test holiday',
121
        title       => 'Test holiday',
122
        description => 'Test holiday'
122
        description => 'Test holiday'
123
    );
123
    );
124
    $charge = $fees->rental_charge_daily();
124
    $charge = $fees->accumulate_rentalcharge();
125
    is( $charge, 5.00, 'Daily rental charge calculated correctly with finesCalendar = noFinesWhenClosed and closed Wednesdays' );
125
    is( $charge, 5.00, 'Daily rental charge calculated correctly with finesCalendar = noFinesWhenClosed and closed Wednesdays' );
126
};
126
};
127
- 

Return to bug 20912