Bugzilla – Attachment 7130 Details for
Bug 6751
Link in readingrec.pl to export a barcode file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6751: Adds a link "Export checkin barcodes" in readingrec
Bug-6751-Adds-a-link-Export-checkin-barcodes-in-re.patch (text/plain), 2.76 KB, created by
Chris Cormack
on 2012-01-13 07:54:19 UTC
(
hide
)
Description:
Bug 6751: Adds a link "Export checkin barcodes" in readingrec
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2012-01-13 07:54:19 UTC
Size:
2.76 KB
patch
obsolete
>From 57f9eebf5a8d0209744d6a0d5a6342fe92005a3d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 19 Aug 2011 11:50:13 +0200 >Subject: [PATCH] Bug 6751: Adds a link "Export checkin barcodes" in > readingrec > >to export a file containing a list of checkin barcode for the current day. > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >--- > .../prog/en/modules/members/readingrec.tt | 1 + > members/readingrec.pl | 23 +++++++++++++++++++- > 2 files changed, 23 insertions(+), 1 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >index f1554f0..be62076 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >@@ -34,6 +34,7 @@ > [% IF ( loop_reading ) %] > <form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" /></form> > >+<p><a href="readingrec.pl?borrowernumber=[% borrowernumber %]&op=export_barcodes">Export checkin barcodes</a></p> > <div id="pagertable_readingrec"> > [% INCLUDE 'table-pager.inc' perpage='20' %] > </div> >diff --git a/members/readingrec.pl b/members/readingrec.pl >index b4fb8a7..dc0807f 100755 >--- a/members/readingrec.pl >+++ b/members/readingrec.pl >@@ -29,7 +29,7 @@ use C4::Auth; > use C4::Output; > use C4::Members; > use C4::Branch; >-use List::MoreUtils qw/any/; >+use List::MoreUtils qw/any uniq/; > > use C4::Dates qw/format_date/; > use C4::Members::Attributes qw(GetBorrowerAttributes); >@@ -64,6 +64,9 @@ my $limit = 0; > my ( $issues ) = GetAllIssues($borrowernumber,$order,$limit); > > my @loop_reading; >+my @barcodes; >+my $today = C4::Dates->new(); >+$today = $today->output("iso"); > > foreach my $issue (@{$issues}){ > my %line; >@@ -80,6 +83,24 @@ foreach my $issue (@{$issues}){ > $line{barcode} = $issue->{'barcode'}; > $line{volumeddesc} = $issue->{'volumeddesc'}; > push(@loop_reading,\%line); >+ 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 = ":"; >+ $delimiter = "\n"; >+ binmode( STDOUT, ":utf8" ); >+ print $input->header( >+ -type => 'application/octet-stream', >+ -charset => 'utf-8', >+ -attachment => "$today-$borrowercardnumber-checkinexport.txt" >+ ); >+ my $content = join($delimiter, uniq(@barcodes)); >+ print $content; >+ exit; > } > > if ( $data->{'category_type'} eq 'C') { >-- >1.7.5.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6751
:
5056
|
7012
|
7130
|
7211
|
7561
|
7651
|
8001
|
8002
|
8059
|
8124