From 49766828ff314bdbc4aa228da1eedc5947c65230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9rick?= Date: Thu, 27 Feb 2014 15:54:01 -0500 Subject: [PATCH] [PASSED QA] Bug 11869 - Add more informations to the account printing page This patch adds additional informations to the "Print summary" and the "Print receipt" templates. Additional information in "Print summary": * Registration date * Expiration date * Library * Category * Fines and payments TEST PLAN --------- 1) Go to a patron. 2) Make sure they have something checked out. 3) Manually add a fine. 4) Under the 'Print' button click 'Print summary' -- the resulting preview should: a) have the first for things listed above, and b) have a new fines and payments section. Signed-off-by: Mark Tompsett NOTE: The due date of the check out is not part of this patch, and so I signed off. Similarly, anything required for slips is configurable elsewhere now and thus comment 1 does not accurately reflect the intent of this patch. Signed-off-by: Katrin Fischer This works as described and passes all tests and the QA script. --- .../prog/en/modules/members/moremember-print.tt | 35 ++++++++++++++++++++++ members/moremember.pl | 13 ++++++++ 2 files changed, 48 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt index 4642628..c9f4c85 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt @@ -1,3 +1,4 @@ +[% USE KohaDates %] [% INCLUDE 'doc-head-open.inc' %] Summary for [% firstname %] [% surname %] ([% cardnumber %]) @@ -22,6 +23,10 @@
  • [% IF ( phone ) %][% phone %][% ELSE %](no phone number on file)[% END %]
  • [% IF ( email ) %][% email %][% ELSE %](no primary email on file)[% END %]
  • [% IF ( emailpro ) %]
  • [% emailpro %]
  • [% END %] +
  • Registration date: [% dateenrolled %]
  • +
  • Expiration date: [% dateexpiry %]
  • +
  • Library: [% branchname %]
  • +
  • Category: [% description %]
  • [% IF ( issueloop ) %] @@ -86,4 +91,34 @@ [% END %] +[% IF ( accounts ) %] + + + + + + + + + [% FOREACH account IN accounts %] + + + + + + + [% END %] + + + + + + +
    Account fines and payments
    Description of chargesDateAmountOutstanding
    + [% IF ( account.itemnumber ) %][% END %] + [% account.description %] [% IF ( account.printtitle ) %] [% account.title |html %][% END %] + [% IF ( account.itemnumber ) %][% END %] + [% account.date | $KohaDates %][% account.amount %][% account.amountoutstanding %]
    Total due[% totaldue %]
    +[% END %] + [% INCLUDE 'intranet-bottom.inc' %] diff --git a/members/moremember.pl b/members/moremember.pl index 40f6d43..d78cc1f 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -232,6 +232,19 @@ my $lib2 = &GetSortDetails( "Bsort2", $data->{'sort2'} ); $template->param( lib1 => $lib1 ) if ($lib1); $template->param( lib2 => $lib2 ) if ($lib2); +# If printing a page, send the account informations to the template +if ($print eq "page") { + foreach my $accountline (@$accts) { + $accountline->{amount} = sprintf '%.2f', $accountline->{amount}; + $accountline->{amountoutstanding} = sprintf '%.2f', $accountline->{amountoutstanding}; + + if ($accountline->{accounttype} ne 'F' && $accountline->{accounttype} ne 'FU'){ + $accountline->{printtitle} = 1; + } + } + $template->param( accounts => $accts ); +} + # Show OPAC privacy preference is system preference is set if ( C4::Context->preference('OPACPrivacy') ) { $template->param( OPACPrivacy => 1); -- 1.8.3.2