View | Details | Raw Unified | Return to bug 6751
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc (-2 / +7 lines)
Lines 33-38 function update_child() { Link Here
33
[% END %]
33
[% END %]
34
}
34
}
35
35
36
function export_barcodes() {
37
    window.open('/cgi-bin/koha/members/readingrec.pl?borrowernumber=[% borrowernumber %]&op=export_barcodes');
38
}
39
36
	// prepare DOM for YUI Toolbar
40
	// prepare DOM for YUI Toolbar
37
41
38
	 $(document).ready(function() {
42
	 $(document).ready(function() {
Lines 67-74 function update_child() { Link Here
67
			{ text: _("Renew Patron"),  onclick: { fn: confirm_reregistration } },
71
			{ text: _("Renew Patron"),  onclick: { fn: confirm_reregistration } },
68
			{ text: _("Set Permissions"), url: "/cgi-bin/koha/members/member-flags.pl?member=[% borrowernumber %]"[% UNLESS CAN_user_permissions %], disabled: true[% END %]},
72
			{ text: _("Set Permissions"), url: "/cgi-bin/koha/members/member-flags.pl?member=[% borrowernumber %]"[% UNLESS CAN_user_permissions %], disabled: true[% END %]},
69
            { text: _("Delete"), [% UNLESS CAN_user_borrowers %]disabled: true, [% END %] onclick: { fn: confirm_deletion } },
73
            { text: _("Delete"), [% UNLESS CAN_user_borrowers %]disabled: true, [% END %] onclick: { fn: confirm_deletion } },
70
			{ text: _("Update Child to Adult Patron") , onclick: { fn: update_child }[% UNLESS is_child %], disabled: true[% END %]}
74
            { text: _("Update Child to Adult Patron") , onclick: { fn: update_child }[% UNLESS is_child %], disabled: true[% END %]},
71
		];
75
            { text: _("Export today's checked in barcodes"), onclick: { fn: export_barcodes }}
76
        ];
72
77
73
	    new YAHOO.widget.Button({
78
	    new YAHOO.widget.Button({
74
	        type: "menu",
79
	        type: "menu",
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/help/members/readingrec.tt (-1 / +3 lines)
Lines 4-9 Link Here
4
4
5
<p>The circulation history tab will appear if you have set the intranetreadinghistory preference to allow it to appear. If you have the OPACPrivacy system preference set to 'Allow' and the patron has decided that the library cannot keep this information this tab will only show currently checked out items.</p>
5
<p>The circulation history tab will appear if you have set the intranetreadinghistory preference to allow it to appear. If you have the OPACPrivacy system preference set to 'Allow' and the patron has decided that the library cannot keep this information this tab will only show currently checked out items.</p>
6
6
7
<p>You can export today's checked in barcodes by clicking on the link above the table. It simply generates a list of barcodes.</p>
8
7
<p><strong>See the full documentation for Circulation History in the <a href="http://manual.koha-community.org/3.6/en/patroninformation.html#circhistory">manual</a> (online).</strong></p>
9
<p><strong>See the full documentation for Circulation History in the <a href="http://manual.koha-community.org/3.6/en/patroninformation.html#circhistory">manual</a> (online).</strong></p>
8
10
9
[% INCLUDE 'help-bottom.inc' %]
11
[% INCLUDE 'help-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt (+4 lines)
Lines 29-34 Link Here
29
[% IF ( loop_reading ) %]
29
[% IF ( loop_reading ) %]
30
<form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" /></form>
30
<form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" /></form>
31
31
32
<div id="pagertable_readingrec">
33
[% INCLUDE 'table-pager.inc' perpage='20' %]
34
</div>
35
32
<table id="table_readingrec">
36
<table id="table_readingrec">
33
<thead>
37
<thead>
34
    <th>Date</th>
38
    <th>Date</th>
(-)a/members/readingrec.pl (-2 / +21 lines)
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 = "\n";
94
    binmode( STDOUT, ":encoding(UTF-8)");
95
    print $input->header(
96
        -type       => 'application/octet-stream',
97
        -charset    => 'utf-8',
98
        -attachment => "$today-$borrowercardnumber-checkinexport.txt"
99
    );
100
    my $content = join($delimiter, uniq(@barcodes));
101
    print $content;
102
    exit;
83
}
103
}
84
104
85
if ( $data->{'category_type'} eq 'C') {
105
if ( $data->{'category_type'} eq 'C') {
86
- 

Return to bug 6751