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

(-)a/admin/branch_transfer_limits.pl (+1 lines)
Lines 65-70 if ( $input->param('updateLimits') && $op eq 'cud-update' ) { Link Here
65
65
66
    foreach my $code (@codes) {
66
    foreach my $code (@codes) {
67
        foreach my $toBranch (@branchcodes) {
67
        foreach my $toBranch (@branchcodes) {
68
            next if $toBranch eq $branchcode;
68
            my $isSet = not $input->param( $code . "_" . $toBranch );
69
            my $isSet = not $input->param( $code . "_" . $toBranch );
69
            if ($isSet) {
70
            if ($isSet) {
70
                CreateBranchTransferLimit( $toBranch, $branchcode, $code );
71
                CreateBranchTransferLimit( $toBranch, $branchcode, $code );
(-)a/installer/data/mysql/atomicupdate/bug_41131.pl (+19 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_success say_info);
3
4
return {
5
    bug_number  => "41131",
6
    description => "Delete transfer limits that are from a branch to the same branch",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        # Do you stuffs here
12
        $dbh->do(
13
            q{
14
            DELETE FROM branch_transfer_limits WHERE toBranch = fromBranch;
15
        }
16
        );
17
        say $out "Removed nonsensical transfer limits that prevent a branch transferring to itself";
18
    },
19
};
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt (-2 / +3 lines)
Lines 96-102 Link Here
96
                                            ></td
96
                                            ></td
97
                                        >
97
                                        >
98
                                        <td>
98
                                        <td>
99
                                            [% IF ( to_branch_loo.isChecked ) %]
99
                                            [% IF ( to_branch_loo.toBranch == branchcode ) %]
100
                                                <input type="checkbox" checked="checked" disabled="disabled" />
101
                                            [% ELSIF ( to_branch_loo.isChecked ) %]
100
                                                <input
102
                                                <input
101
                                                    type="checkbox"
103
                                                    type="checkbox"
102
                                                    class="cb cb[% codes_loo.code | html %]"
104
                                                    class="cb cb[% codes_loo.code | html %]"
103
- 

Return to bug 41131