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