|
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 |
- |
|
|