Bugzilla – Attachment 5056 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]
Proposed patch
0001-Bug-6751-Adds-a-link-Export-checkin-barcodes-in-read.patch (text/plain), 2.77 KB, created by
Jonathan Druart
on 2011-08-19 09:55:03 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2011-08-19 09:55:03 UTC
Size:
2.77 KB
patch
obsolete
>From fd2297aafb42c92592be7b6c4814e76e794224e6 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. >--- > .../prog/en/modules/members/readingrec.tt | 2 +- > members/readingrec.pl | 23 +++++++++++++++++++- > 2 files changed, 23 insertions(+), 2 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 c61006b..45ba1da 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >@@ -31,7 +31,7 @@ > [% INCLUDE 'circ-toolbar.inc' %] > <h1>Circulation History</h1> > <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> > <span id="pagertable_readingrec" class="pager"> > <form class="formpager"> <strong>page(s)</strong> : > <img src="[% interface %]/prog/img/first.png" class="first"/> >diff --git a/members/readingrec.pl b/members/readingrec.pl >index e7586a0..532d285 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/; > >@@ -63,6 +63,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; >@@ -79,6 +82,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.1 >
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