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 465-475 subtest 'store' => sub { Link Here
465
                    notforloan         => 0,
465
                    notforloan         => 0,
466
                    rentalcharge       => 0,
466
                    rentalcharge       => 0,
467
                    defaultreplacecost => undef,
467
                    defaultreplacecost => undef,
468
                    processfee         => $processfee_amount,
469
                    rentalcharge_daily => 0,
468
                    rentalcharge_daily => 0,
470
                }
469
                }
471
            }
470
            }
472
        );
471
        );
472
        Koha::CirculationRules->set_rule(
473
            {
474
                itemtype  => $item_type->itemtype, branchcode => undef, rule_value => $processfee_amount,
475
                rule_name => 'lost_item_processing_fee'
476
            }
477
        );
473
        my $library = $builder->build_object( { class => 'Koha::Libraries' } );
478
        my $library = $builder->build_object( { class => 'Koha::Libraries' } );
474
479
475
        $biblio = $builder->build_sample_biblio( { author => 'Hall, Daria' } );
480
        $biblio = $builder->build_sample_biblio( { author => 'Hall, Daria' } );
Lines 1048-1054 subtest 'store' => sub { Link Here
1048
                        notforloan         => 0,
1053
                        notforloan         => 0,
1049
                        rentalcharge       => 0,
1054
                        rentalcharge       => 0,
1050
                        defaultreplacecost => undef,
1055
                        defaultreplacecost => undef,
1051
                        processfee         => 0,
1052
                        rentalcharge_daily => 0,
1056
                        rentalcharge_daily => 0,
1053
                    }
1057
                    }
1054
                }
1058
                }
Lines 1166-1172 subtest 'store' => sub { Link Here
1166
            my $patron             = $builder->build_object( { class => 'Koha::Patrons' } );
1170
            my $patron             = $builder->build_object( { class => 'Koha::Patrons' } );
1167
            my $barcode            = 'KD123456794';
1171
            my $barcode            = 'KD123456794';
1168
            my $replacement_amount = 100;
1172
            my $replacement_amount = 100;
1169
            my $processfee_amount  = 20;
1170
1173
1171
            my $item_type = $builder->build_object(
1174
            my $item_type = $builder->build_object(
1172
                {
1175
                {
Lines 1175-1181 subtest 'store' => sub { Link Here
1175
                        notforloan         => 0,
1178
                        notforloan         => 0,
1176
                        rentalcharge       => 0,
1179
                        rentalcharge       => 0,
1177
                        defaultreplacecost => undef,
1180
                        defaultreplacecost => undef,
1178
                        processfee         => 0,
1179
                        rentalcharge_daily => 0,
1181
                        rentalcharge_daily => 0,
1180
                    }
1182
                    }
1181
                }
1183
                }
Lines 1579-1585 subtest 'store' => sub { Link Here
1579
            my $patron             = $builder->build_object( { class => 'Koha::Patrons' } );
1581
            my $patron             = $builder->build_object( { class => 'Koha::Patrons' } );
1580
            my $barcode            = 'KD123456795';
1582
            my $barcode            = 'KD123456795';
1581
            my $replacement_amount = 100;
1583
            my $replacement_amount = 100;
1582
            my $processfee_amount  = 20;
1583
1584
1584
            my $item_type = $builder->build_object(
1585
            my $item_type = $builder->build_object(
1585
                {
1586
                {
Lines 1588-1594 subtest 'store' => sub { Link Here
1588
                        notforloan         => 0,
1589
                        notforloan         => 0,
1589
                        rentalcharge       => 0,
1590
                        rentalcharge       => 0,
1590
                        defaultreplacecost => undef,
1591
                        defaultreplacecost => undef,
1591
                        processfee         => 0,
1592
                        rentalcharge_daily => 0,
1592
                        rentalcharge_daily => 0,
1593
                    }
1593
                    }
1594
                }
1594
                }
(-)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 682-688 sub _gen_default_values { Link Here
682
            rentalcharge_daily  => 0,
682
            rentalcharge_daily  => 0,
683
            rentalcharge_hourly => 0,
683
            rentalcharge_hourly => 0,
684
            defaultreplacecost  => 0,
684
            defaultreplacecost  => 0,
685
            processfee          => 0,
686
            notforloan          => 0,
685
            notforloan          => 0,
687
            bookable            => 0,
686
            bookable            => 0,
688
        },
687
        },
689
- 

Return to bug 36506