+ if (($input->param('op') eq 'export_barcodes') and ($today eq $issue->{'returndate'})) {
+ push( @barcodes, $issue->{'barcode'} );
+ }
+}
+
+if ($input->param('op') eq 'export_barcodes') {
+ my $borrowercardnumber = GetMember( borrowernumber => $borrowernumber )->{'cardnumber'} ;
+ my $delimiter = "\n";
+ binmode( STDOUT, ":encoding(UTF-8)");
+ print $input->header(
+ -type => 'application/octet-stream',
+ -charset => 'utf-8',
+ -attachment => "$today-$borrowercardnumber-checkinexport.txt"
+ );
+ my $content = join($delimiter, uniq(@barcodes));
+ print $content;
+ exit;