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

(-)a/t/db_dependent/Accounts.t (-4 / +12 lines)
Lines 607-613 subtest "C4::Accounts::chargelostitem tests" => sub { Link Here
607
            value  => {
607
            value  => {
608
                rentalcharge       => 0,
608
                rentalcharge       => 0,
609
                defaultreplacecost => undef,
609
                defaultreplacecost => undef,
610
                processfee         => undef,
611
            }
610
            }
612
        }
611
        }
613
    );
612
    );
Lines 617-623 subtest "C4::Accounts::chargelostitem tests" => sub { Link Here
617
            value  => {
616
            value  => {
618
                rentalcharge       => 0,
617
                rentalcharge       => 0,
619
                defaultreplacecost => 16.32,
618
                defaultreplacecost => 16.32,
620
                processfee         => undef,
621
            }
619
            }
622
        }
620
        }
623
    );
621
    );
Lines 627-633 subtest "C4::Accounts::chargelostitem tests" => sub { Link Here
627
            value  => {
625
            value  => {
628
                rentalcharge       => 0,
626
                rentalcharge       => 0,
629
                defaultreplacecost => undef,
627
                defaultreplacecost => undef,
630
                processfee         => 8.16,
631
            }
628
            }
632
        }
629
        }
633
    );
630
    );
Lines 637-646 subtest "C4::Accounts::chargelostitem tests" => sub { Link Here
637
            value  => {
634
            value  => {
638
                rentalcharge       => 0,
635
                rentalcharge       => 0,
639
                defaultreplacecost => 4.08,
636
                defaultreplacecost => 4.08,
640
                processfee         => 2.04,
641
            }
637
            }
642
        }
638
        }
643
    );
639
    );
640
    my $one_rule = Koha::CirculationRules->set_rule(
641
        {
642
            itemtype  => $itype_no_replace_fee->{itemtype}, branchcode => undef, rule_value => 8.16,
643
            rule_name => 'lost_item_processing_fee'
644
        }
645
    );
646
    my $two_rule = Koha::CirculationRules->set_rule(
647
        {
648
            itemtype  => $itype_replace_fee->{itemtype}, branchcode => undef, rule_value => 2.04,
649
            rule_name => 'lost_item_processing_fee'
650
        }
651
    );
644
    my $cli_borrowernumber = $builder->build( { source => 'Borrower' } )->{'borrowernumber'};
652
    my $cli_borrowernumber = $builder->build( { source => 'Borrower' } )->{'borrowernumber'};
645
    my $cli_itemnumber1 = $builder->build_sample_item( { itype => $itype_no_replace_no_fee->{itemtype} } )->itemnumber;
653
    my $cli_itemnumber1 = $builder->build_sample_item( { itype => $itype_no_replace_no_fee->{itemtype} } )->itemnumber;
646
    my $cli_itemnumber2 = $builder->build_sample_item( { itype => $itype_replace_no_fee->{itemtype} } )->itemnumber;
654
    my $cli_itemnumber2 = $builder->build_sample_item( { itype => $itype_replace_no_fee->{itemtype} } )->itemnumber;
(-)a/t/db_dependent/Circulation.t (-1 lines)
Lines 156-162 my $itemtype = $builder->build( Link Here
156
            rentalcharge       => 0,
156
            rentalcharge       => 0,
157
            rentalcharge_daily => 0,
157
            rentalcharge_daily => 0,
158
            defaultreplacecost => undef,
158
            defaultreplacecost => undef,
159
            processfee         => undef
160
        }
159
        }
161
    }
160
    }
162
)->{itemtype};
161
)->{itemtype};
(-)a/t/db_dependent/Koha/Charges/Fees.t (-1 lines)
Lines 68-74 my $itemtype = $builder->build_object( Link Here
68
            rentalcharge_hourly          => '0.00',
68
            rentalcharge_hourly          => '0.00',
69
            rentalcharge_hourly_calendar => 1,
69
            rentalcharge_hourly_calendar => 1,
70
            rentalcharge                 => '0.00',
70
            rentalcharge                 => '0.00',
71
            processfee                   => '0.00',
72
            defaultreplacecost           => '0.00',
71
            defaultreplacecost           => '0.00',
73
        },
72
        },
74
    }
73
    }
(-)a/t/db_dependent/Koha/Items.t (-6 / +6 lines)
Lines 461-471 subtest 'store' => sub { Link Here
461
                    notforloan         => 0,
461
                    notforloan         => 0,
462
                    rentalcharge       => 0,
462
                    rentalcharge       => 0,
463
                    defaultreplacecost => undef,
463
                    defaultreplacecost => undef,
464
                    processfee         => $processfee_amount,
465
                    rentalcharge_daily => 0,
464
                    rentalcharge_daily => 0,
466
                }
465
                }
467
            }
466
            }
468
        );
467
        );
468
        Koha::CirculationRules->set_rule(
469
            {
470
                itemtype  => $item_type->itemtype, branchcode => undef, rule_value => $processfee_amount,
471
                rule_name => 'lost_item_processing_fee'
472
            }
473
        );
469
        my $library = $builder->build_object( { class => 'Koha::Libraries' } );
474
        my $library = $builder->build_object( { class => 'Koha::Libraries' } );
470
475
471
        $biblio = $builder->build_sample_biblio( { author => 'Hall, Daria' } );
476
        $biblio = $builder->build_sample_biblio( { author => 'Hall, Daria' } );
Lines 1044-1050 subtest 'store' => sub { Link Here
1044
                        notforloan         => 0,
1049
                        notforloan         => 0,
1045
                        rentalcharge       => 0,
1050
                        rentalcharge       => 0,
1046
                        defaultreplacecost => undef,
1051
                        defaultreplacecost => undef,
1047
                        processfee         => 0,
1048
                        rentalcharge_daily => 0,
1052
                        rentalcharge_daily => 0,
1049
                    }
1053
                    }
1050
                }
1054
                }
Lines 1162-1168 subtest 'store' => sub { Link Here
1162
            my $patron             = $builder->build_object( { class => 'Koha::Patrons' } );
1166
            my $patron             = $builder->build_object( { class => 'Koha::Patrons' } );
1163
            my $barcode            = 'KD123456794';
1167
            my $barcode            = 'KD123456794';
1164
            my $replacement_amount = 100;
1168
            my $replacement_amount = 100;
1165
            my $processfee_amount  = 20;
1166
1169
1167
            my $item_type = $builder->build_object(
1170
            my $item_type = $builder->build_object(
1168
                {
1171
                {
Lines 1171-1177 subtest 'store' => sub { Link Here
1171
                        notforloan         => 0,
1174
                        notforloan         => 0,
1172
                        rentalcharge       => 0,
1175
                        rentalcharge       => 0,
1173
                        defaultreplacecost => undef,
1176
                        defaultreplacecost => undef,
1174
                        processfee         => 0,
1175
                        rentalcharge_daily => 0,
1177
                        rentalcharge_daily => 0,
1176
                    }
1178
                    }
1177
                }
1179
                }
Lines 1575-1581 subtest 'store' => sub { Link Here
1575
            my $patron             = $builder->build_object( { class => 'Koha::Patrons' } );
1577
            my $patron             = $builder->build_object( { class => 'Koha::Patrons' } );
1576
            my $barcode            = 'KD123456795';
1578
            my $barcode            = 'KD123456795';
1577
            my $replacement_amount = 100;
1579
            my $replacement_amount = 100;
1578
            my $processfee_amount  = 20;
1579
1580
1580
            my $item_type = $builder->build_object(
1581
            my $item_type = $builder->build_object(
1581
                {
1582
                {
Lines 1584-1590 subtest 'store' => sub { Link Here
1584
                        notforloan         => 0,
1585
                        notforloan         => 0,
1585
                        rentalcharge       => 0,
1586
                        rentalcharge       => 0,
1586
                        defaultreplacecost => undef,
1587
                        defaultreplacecost => undef,
1587
                        processfee         => 0,
1588
                        rentalcharge_daily => 0,
1588
                        rentalcharge_daily => 0,
1589
                    }
1589
                    }
1590
                }
1590
                }
(-)a/t/db_dependent/api/v1/item_types.t (-1 lines)
Lines 53-59 subtest 'list() tests' => sub { Link Here
53
                rentalcharge_hourly          => 0.60,
53
                rentalcharge_hourly          => 0.60,
54
                rentalcharge_hourly_calendar => 1,
54
                rentalcharge_hourly_calendar => 1,
55
                defaultreplacecost           => 1000.0,
55
                defaultreplacecost           => 1000.0,
56
                processfee                   => 20.0,
57
                notforloan                   => 0,
56
                notforloan                   => 0,
58
                imageurl          => 'https://upload.wikimedia.org/wikipedia/commons/1/1f/202208_test-tube-4.svg',
57
                imageurl          => 'https://upload.wikimedia.org/wikipedia/commons/1/1f/202208_test-tube-4.svg',
59
                summary           => 'An item type for testing',
58
                summary           => 'An item type for testing',
(-)a/t/lib/TestBuilder.pm (-2 lines)
Lines 683-689 sub _gen_default_values { Link Here
683
            rentalcharge_daily  => 0,
683
            rentalcharge_daily  => 0,
684
            rentalcharge_hourly => 0,
684
            rentalcharge_hourly => 0,
685
            defaultreplacecost  => 0,
685
            defaultreplacecost  => 0,
686
            processfee          => 0,
687
            notforloan          => 0,
686
            notforloan          => 0,
688
            bookable            => 0,
687
            bookable            => 0,
689
        },
688
        },
690
- 

Return to bug 36506