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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_extend_due_dates.tt (+10 lines)
Lines 71-76 Link Here
71
                                        </select>
71
                                        </select>
72
                                    </li>
72
                                    </li>
73
73
74
                                    <li>
75
                                        <label for="itemtypescodes">Item types: </label>
76
                                        [% SET itemtypes = ItemTypes.Get() %]
77
                                        <select id="itemtypecodes" name="itemtypecodes" multiple="multiple">
78
                                            [% FOREACH itemtype IN itemtypes %]
79
                                                <option value="[% itemtype.itemtype | html %]">[% itemtype.description | html%]</option>
80
                                            [% END %]
81
                                        </select>
82
                                    </li>
83
74
                                    <li>
84
                                    <li>
75
                                        <label for="branchcodes">Libraries: </label>
85
                                        <label for="branchcodes">Libraries: </label>
76
                                        <select name="branchcodes" id="branchcodes" multiple="multiple">
86
                                        <select name="branchcodes" id="branchcodes" multiple="multiple">
(-)a/tools/batch_extend_due_dates.pl (-1 / +10 lines)
Lines 26-31 use C4::Auth qw( get_template_and_user ); Link Here
26
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
27
use Koha::Checkouts;
27
use Koha::Checkouts;
28
use Koha::DateUtils qw( dt_from_string );
28
use Koha::DateUtils qw( dt_from_string );
29
use Koha::Items;
30
29
31
30
my $input = CGI->new;
32
my $input = CGI->new;
31
my $op = $input->param('op') // q|form|;
33
my $op = $input->param('op') // q|form|;
Lines 48-53 if ( $op eq 'form' ) { Link Here
48
elsif ( $op eq 'list' ) {
50
elsif ( $op eq 'list' ) {
49
51
50
    my @categorycodes     = $input->multi_param('categorycodes');
52
    my @categorycodes     = $input->multi_param('categorycodes');
53
    my @itemtypecodes     = $input->multi_param('itemtypecodes');
51
    my @branchcodes       = $input->multi_param('branchcodes');
54
    my @branchcodes       = $input->multi_param('branchcodes');
52
    my $from_due_date     = $input->param('from_due_date');
55
    my $from_due_date     = $input->param('from_due_date');
53
    my $to_due_date       = $input->param('to_due_date');
56
    my $to_due_date       = $input->param('to_due_date');
Lines 61-69 elsif ( $op eq 'list' ) { Link Here
61
    if (@categorycodes) {
64
    if (@categorycodes) {
62
        $search_params->{'patron.categorycode'} = { -in => \@categorycodes };
65
        $search_params->{'patron.categorycode'} = { -in => \@categorycodes };
63
    }
66
    }
67
    if (@itemtypecodes) {
68
        my $search_items->{'itype'} = { -in => \@itemtypecodes };
69
        my @itemnumbers = Koha::Items->search($search_items)->get_column('itemnumber');
70
71
        $search_params->{'itemnumber'} = { -in => \@itemnumbers };
72
    }
64
    if (@branchcodes) {
73
    if (@branchcodes) {
65
        $search_params->{'me.branchcode'} = { -in => \@branchcodes };
74
        $search_params->{'me.branchcode'} = { -in => \@branchcodes };
66
    }
75
    }
76
67
    if ( $from_due_date and $to_due_date ) {
77
    if ( $from_due_date and $to_due_date ) {
68
        my $to_due_date_endday = dt_from_string($to_due_date);
78
        my $to_due_date_endday = dt_from_string($to_due_date);
69
        $to_due_date_endday
79
        $to_due_date_endday
70
- 

Return to bug 26978