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

(-)a/t/db_dependent/Circulation.t (-4 / +16 lines)
Lines 2837-2842 subtest 'AddRenewal and AddIssuingCharge tests' => sub { Link Here
2837
2837
2838
    $schema->storage->txn_begin;
2838
    $schema->storage->txn_begin;
2839
2839
2840
    t::lib::Mocks::mock_preference('item-level_itypes', 1);
2841
2840
    my $issuing_charges = 15;
2842
    my $issuing_charges = 15;
2841
    my $title   = 'A title';
2843
    my $title   = 'A title';
2842
    my $author  = 'Author, An';
2844
    my $author  = 'Author, An';
Lines 2851-2857 subtest 'AddRenewal and AddIssuingCharge tests' => sub { Link Here
2851
    );
2853
    );
2852
2854
2853
    my $library  = $builder->build_object({ class => 'Koha::Libraries' });
2855
    my $library  = $builder->build_object({ class => 'Koha::Libraries' });
2854
    my $itemtype = $builder->build_object({ class => 'Koha::ItemTypes' });
2856
    my $itemtype = $builder->build_object({ class => 'Koha::ItemTypes', value => { rental_charge_daily => 0.00 }});
2855
    my $patron   = $builder->build_object({
2857
    my $patron   = $builder->build_object({
2856
        class => 'Koha::Patrons',
2858
        class => 'Koha::Patrons',
2857
        value => { branchcode => $library->id }
2859
        value => { branchcode => $library->id }
Lines 2991-2998 sub test_debarment_on_checkout { Link Here
2991
        { borrowernumber => $patron->{borrowernumber}, type => 'SUSPENSION' } );
2993
        { borrowernumber => $patron->{borrowernumber}, type => 'SUSPENSION' } );
2992
};
2994
};
2993
2995
2994
subtest 'Koha::ItemType::calc_rental_charge_daily tests' => sub {
2996
subtest 'Incremented fee tests' => sub {
2995
    plan tests => 8;
2997
    plan tests => 11;
2996
2998
2997
    t::lib::Mocks::mock_preference('item-level_itypes', 1);
2999
    t::lib::Mocks::mock_preference('item-level_itypes', 1);
2998
3000
Lines 3081-3084 subtest 'Koha::ItemType::calc_rental_charge_daily tests' => sub { Link Here
3081
    $accountline->delete();
3083
    $accountline->delete();
3082
    $issue->delete();
3084
    $issue->delete();
3083
3085
3086
    $itemtype->rentalcharge('2.000000')->store;
3087
    is( $itemtype->rentalcharge, '2.000000', 'Rental charge updated and retreived correctly' );
3088
    $issue = AddIssue( $patron->unblessed, $item->barcode, $dt_to, undef, $dt_from);
3089
    my $accountlines = Koha::Account::Lines->search({ itemnumber => $item->id });
3090
    is( $accountlines->count, '2', "Fixed charge and accrued charge recorded distinctly");
3091
    $accountlines->delete();
3092
    AddRenewal( $patron->id, $item->id, $library->id, $dt_to_renew, $dt_to );
3093
    $accountlines = Koha::Account::Lines->search({ itemnumber => $item->id });
3094
    is( $accountlines->count, '2', "Fixed charge and accrued charge recorded distinctly, for renewal");
3095
    $accountlines->delete();
3096
    $issue->delete();
3084
};
3097
};
3085
- 

Return to bug 20912