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

(-)a/t/db_dependent/Circulation.t (-4 / +16 lines)
Lines 2848-2853 subtest 'AddRenewal and AddIssuingCharge tests' => sub { Link Here
2848
2848
2849
    $schema->storage->txn_begin;
2849
    $schema->storage->txn_begin;
2850
2850
2851
    t::lib::Mocks::mock_preference('item-level_itypes', 1);
2852
2851
    my $issuing_charges = 15;
2853
    my $issuing_charges = 15;
2852
    my $title   = 'A title';
2854
    my $title   = 'A title';
2853
    my $author  = 'Author, An';
2855
    my $author  = 'Author, An';
Lines 2862-2868 subtest 'AddRenewal and AddIssuingCharge tests' => sub { Link Here
2862
    );
2864
    );
2863
2865
2864
    my $library  = $builder->build_object({ class => 'Koha::Libraries' });
2866
    my $library  = $builder->build_object({ class => 'Koha::Libraries' });
2865
    my $itemtype = $builder->build_object({ class => 'Koha::ItemTypes' });
2867
    my $itemtype = $builder->build_object({ class => 'Koha::ItemTypes', value => { rental_charge_daily => 0.00 }});
2866
    my $patron   = $builder->build_object({
2868
    my $patron   = $builder->build_object({
2867
        class => 'Koha::Patrons',
2869
        class => 'Koha::Patrons',
2868
        value => { branchcode => $library->id }
2870
        value => { branchcode => $library->id }
Lines 3004-3011 sub test_debarment_on_checkout { Link Here
3004
        { borrowernumber => $patron->{borrowernumber}, type => 'SUSPENSION' } );
3006
        { borrowernumber => $patron->{borrowernumber}, type => 'SUSPENSION' } );
3005
};
3007
};
3006
3008
3007
subtest 'Koha::ItemType::calc_rental_charge_daily tests' => sub {
3009
subtest 'Incremented fee tests' => sub {
3008
    plan tests => 8;
3010
    plan tests => 11;
3009
3011
3010
    t::lib::Mocks::mock_preference('item-level_itypes', 1);
3012
    t::lib::Mocks::mock_preference('item-level_itypes', 1);
3011
3013
Lines 3094-3097 subtest 'Koha::ItemType::calc_rental_charge_daily tests' => sub { Link Here
3094
    $accountline->delete();
3096
    $accountline->delete();
3095
    $issue->delete();
3097
    $issue->delete();
3096
3098
3099
    $itemtype->rentalcharge('2.000000')->store;
3100
    is( $itemtype->rentalcharge, '2.000000', 'Rental charge updated and retreived correctly' );
3101
    $issue = AddIssue( $patron->unblessed, $item->barcode, $dt_to, undef, $dt_from);
3102
    my $accountlines = Koha::Account::Lines->search({ itemnumber => $item->id });
3103
    is( $accountlines->count, '2', "Fixed charge and accrued charge recorded distinctly");
3104
    $accountlines->delete();
3105
    AddRenewal( $patron->id, $item->id, $library->id, $dt_to_renew, $dt_to );
3106
    $accountlines = Koha::Account::Lines->search({ itemnumber => $item->id });
3107
    is( $accountlines->count, '2', "Fixed charge and accrued charge recorded distinctly, for renewal");
3108
    $accountlines->delete();
3109
    $issue->delete();
3097
};
3110
};
3098
- 

Return to bug 20912