Bugzilla – Attachment 7561 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]
Rebased and Squashed version
0001-Bug-6751-Adds-a-link-Export-checkin-barcodes-in-read.patch (text/plain), 2.84 KB, created by
Jonathan Druart
on 2012-02-10 10:20:14 UTC
(
hide
)
Description:
Rebased and Squashed version
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2012-02-10 10:20:14 UTC
Size:
2.84 KB
patch
obsolete
>From 50dd0e656a3aece2c160dbd1636c5d5623179d2e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 10 Feb 2012 11:18:48 +0100 >Subject: [PATCH 1/1] 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 | 5 ++++ > members/readingrec.pl | 23 +++++++++++++++++++- > 2 files changed, 27 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 36f8937..245dece 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >@@ -29,6 +29,11 @@ > [% 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> >+ > <table id="table_readingrec"> > <thead> > <th>Date</th> >diff --git a/members/readingrec.pl b/members/readingrec.pl >index c4a8237..d285850 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, ":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; > } > > if ( $data->{'category_type'} eq 'C') { >-- >1.7.7.3 >
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