From bugzilla-daemon@bugs.koha-community.org Fri Mar 21 11:47:28 2014 From: bugzilla-daemon@bugs.koha-community.org To: koha-bugs@lists.koha-community.org Subject: [Koha-bugs] [Bug 3050] Add an option to upload scanned invoices. Date: Fri, 21 Mar 2014 10:47:17 +0000 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3951101394719437141==" --===============3951101394719437141== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=3D3050 --- Comment #5 from Jonathan Druart --- Comment on attachment 25306 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3D25306 [SIGNED-OFF] Bug 3050 - Add an option to upload scanned invoices Review of attachment 25306: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=3Dsplinter.html&bu= g=3D3050&attachment=3D25306) ----------------------------------------------------------------- QA comments: 1/ A couple of errors are raised by the qa script: FAIL Koha/Misc/Files.pm FAIL pod *** WARNING: Verbatim paragraph in NAME section in file Koha/Misc/Files.pm *** ERROR: =3Ditem without previous =3Dover in file Koha/Misc/Files.= pm FAIL acqui/invoice-files.pl FAIL forbidden patterns forbidden pattern: trailing space char (line 130) 2/ The new module needs unit tests. 3/ And the following: ::: C4/Auth.pm @@ +358,4 @@ > EnableBorrowerFiles =3D> C4::Context->preference('Enab= leBorrowerFiles'), > UseKohaPlugins =3D> C4::Context->preference('UseK= ohaPlugins'), > UseCourseReserves =3D> C4::Context->preference("Use= CourseReserves"), > + AcqEnableFiles =3D> C4::Context->preference('AcqE= nableFiles'), You should check the syspref value in the templates using Koha.Preference('AcqEnableFiles') ::: Koha/Misc/Files.pm @@ +19,5 @@ > +# You should have received a copy of the GNU General Public License > +# along with Koha; if not, see . > + > +use Modern::Perl; > +use strict; ## not needed if Modern::Perl, but perlcritic complains.. No complain from perlcritic if you define [TestingAndDebugging::RequireUseStrict] equivalent_modules =3D Modern::Perl in your .perlcriticrc Take a look at the perlcriticrc file in the qa-tools. @@ +70,5 @@ > + date_uploaded > + FROM misc_files > + WHERE table_tag =3D ? AND record_id =3D ? > + ORDER BY file_name, date_uploaded > + "; Replace quotes with simple quotes around sql queries. ::: acqui/invoice-files.pl @@ +28,5 @@ > +=3Dcut > + > +use strict; > +use warnings; > + use Modern::Perl; @@ +40,5 @@ > + > +my $input =3D new CGI; > +my ( $template, $loggedinuser, $cookie, $flags ) =3D get_template_and_user( > + { > + template_name =3D> 'acqui/invoice-files.tmpl', s/tmpl/tt @@ +61,5 @@ > + my $file =3D $mf->GetFile( id =3D> $file_id ); > + > + my $fname =3D $file->{'file_name'}; > + my $ftype =3D $file->{'file_type'}; > + if ($input->param('view') && ($ftype =3D~ /^image\//i || $fname =3D~ /= \.pdf/i)) { Maybe m|^image/|i is more readable. @@ +103,5 @@ > + else { > + my $file_content; > + while (<$uploaded_file>) { > + $file_content .=3D $_; > + } I think my $file_content =3D <$uploaded_file>; does the same thing. ::: koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt @@ +27,5 @@ > + > + [% END %] > + > + [% IF ( files ) %] > + Please use Datatable for this table. @@ +64,5 @@ > + Upload New File > +
    > +
  1. > + > + This variable is not retrieve in the pl file. Is it useless? ::: koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt @@ +172,5 @@ > [% END %] > + [% IF ( AcqEnableFiles && files ) %] > +
    > +

    Files attached to invoice

    > +
Please use Datatable for this table. --=20 You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes. --===============3951101394719437141==--