Lines 29-35
use C4::Auth;
Link Here
|
29 |
use C4::Output; |
29 |
use C4::Output; |
30 |
use C4::Members; |
30 |
use C4::Members; |
31 |
use C4::Branch; |
31 |
use C4::Branch; |
32 |
use List::MoreUtils qw/any/; |
32 |
use List::MoreUtils qw/any uniq/; |
33 |
|
33 |
|
34 |
use C4::Dates qw/format_date/; |
34 |
use C4::Dates qw/format_date/; |
35 |
|
35 |
|
Lines 63-68
my $limit = 0;
Link Here
|
63 |
my ( $issues ) = GetAllIssues($borrowernumber,$order,$limit); |
63 |
my ( $issues ) = GetAllIssues($borrowernumber,$order,$limit); |
64 |
|
64 |
|
65 |
my @loop_reading; |
65 |
my @loop_reading; |
|
|
66 |
my @barcodes; |
67 |
my $today = C4::Dates->new(); |
68 |
$today = $today->output("iso"); |
66 |
|
69 |
|
67 |
foreach my $issue (@{$issues}){ |
70 |
foreach my $issue (@{$issues}){ |
68 |
my %line; |
71 |
my %line; |
Lines 79-84
foreach my $issue (@{$issues}){
Link Here
|
79 |
$line{barcode} = $issue->{'barcode'}; |
82 |
$line{barcode} = $issue->{'barcode'}; |
80 |
$line{volumeddesc} = $issue->{'volumeddesc'}; |
83 |
$line{volumeddesc} = $issue->{'volumeddesc'}; |
81 |
push(@loop_reading,\%line); |
84 |
push(@loop_reading,\%line); |
|
|
85 |
if (($input->param('op') eq 'export_barcodes') and ($today eq $issue->{'returndate'})) { |
86 |
push( @barcodes, $issue->{'barcode'} ); |
87 |
} |
88 |
} |
89 |
|
90 |
if ($input->param('op') eq 'export_barcodes') { |
91 |
my $borrowercardnumber = GetMember( borrowernumber => $borrowernumber )->{'cardnumber'} ; |
92 |
my $delimiter = ":"; |
93 |
$delimiter = "\n"; |
94 |
binmode( STDOUT, ":utf8" ); |
95 |
print $input->header( |
96 |
-type => 'application/octet-stream', |
97 |
-charset => 'utf-8', |
98 |
-attachment => "$today-$borrowercardnumber-checkinexport.txt" |
99 |
); |
100 |
my $content = join($delimiter, uniq(@barcodes)); |
101 |
print $content; |
102 |
exit; |
82 |
} |
103 |
} |
83 |
|
104 |
|
84 |
if ( $data->{'category_type'} eq 'C') { |
105 |
if ( $data->{'category_type'} eq 'C') { |
85 |
- |
|
|