[Koha-bugs] [Bug 8007] Discharge management

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Sep 29 23:14:41 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8007

Bernardo Gonzalez Kriegel <bgkriegel at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bgkriegel at gmail.com

--- Comment #25 from Bernardo Gonzalez Kriegel <bgkriegel at gmail.com> ---
Testing this.

It's a good feature. Our university students need to get a 'discharge'
certificate (we call it "libre deuda"). The best we can do with Koha is print a
circulation slip that shows no items on loan.

Test
1) Patches applied, a few touchs on updatedatabase.pl 
(using CheckVersion($DBversion) instead of C4::Context->preference("Version") <
TransformToNum($DBversion), add Bug number to update message)

2) Enabled sysprefs, created dir, etc.
3) OPAC, patron view Discarged tab (I think it could be "my discharge" or
"discharges" with lower case for consistency)
4) OPAC, patron with an issue can't generate discharge, but the message do not
state that fact, only tells that can´t be generated
5) OPAC, patron without issue can request discharge, mail to library sent
6) STAFF, Discharge tab is Upercase, in sync with others
7) STAFF, trying to generate discharge for patron with issue states that fact.
8) STAFF, patron without issue...

This is when I run into problems. Staff interface only tells "An error has ..."

Files are created!!
(
kohaclone$ ls -l ../kohadev/discharges/52
total 8
-rw-r--r-- 1 www-data www-data  668 sep 29 16:50 discharge-2013-09-29.html
-rw-r--r-- 1 www-data www-data 2801 sep 29 16:50 discharge-2013-09-29.pdf
)

Log shows this:
discharge.pl: readline() on unopened filehandle at
/home/bgkriegel/kohaclone/C4/Discharges.pm line 68., referer:
http://staffdev.koha-community.org.ar/cgi-bin/koha/members/discharge.pl?borrowernumber=52

Looking into the code (line 68) I fund that you read files in user dir like

my $pdf_path = qq{$dischargePath/$borrowernumber/*.pdf};
my @files = <$pdf_path>;

I can replicate the error message using

perl -e 'use Modern::Perl; my $p = qq{52/*.pdf}; my @f = <$p>;'
readline() on unopened filehandle at -e line 1.
[with or without files]

So, all stops trying to read files.

I think this is a bug, or perhaps I'm doing something wrong.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list