Bugzilla – Attachment 39935 Details for
Bug 14280
Add branches fields to discharges letters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 14280: Add branches fields to discharges letters
PASSED-QA-Bug-14280-Add-branches-fields-to-dischar.patch (text/plain), 2.84 KB, created by
Katrin Fischer
on 2015-06-06 12:47:14 UTC
(
hide
)
Description:
[PASSED QA] Bug 14280: Add branches fields to discharges letters
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2015-06-06 12:47:14 UTC
Size:
2.84 KB
patch
obsolete
>From b2c34563cc23b98df8a2a5e1f90b51048cc41d8d Mon Sep 17 00:00:00 2001 >From: Matthias Meusburger <matthias.meusburger@biblibre.com> >Date: Wed, 27 May 2015 11:52:10 +0200 >Subject: [PATCH] [PASSED QA] Bug 14280: Add branches fields to discharges > letters >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Currently, when generating a discharge letter, branches fields are not translated in the letter (<<branches.branchname>>, <<branches.branchaddress1>>, etc.) >This patch fixes that. > >How I tested: >- Set syspref 'useDischarge' to 'allow' >- Go to Home > Tools > Notices & Slips >- Edit DISCHARGE, add to 'Email message': ><p><<branches.branchname>><br /> ><<branches.branchaddress1>><br /> ><<branches.branchaddress2>><br /> ><<branches.branchaddress3>><br /> ><<branches.zip>> <<branches.city>><br /> ></p> >- Go to detail page of a patron > discharge >- Click 'Generate discharge' >- Verify that the PDF contains the information above. > >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > Koha/Borrower/Discharge.pm | 2 +- > members/discharge.pl | 2 +- > opac/opac-discharge.pl | 6 +++++- > 3 files changed, 7 insertions(+), 3 deletions(-) > >diff --git a/Koha/Borrower/Discharge.pm b/Koha/Borrower/Discharge.pm >index f39475b..ba0216d 100644 >--- a/Koha/Borrower/Discharge.pm >+++ b/Koha/Borrower/Discharge.pm >@@ -95,7 +95,7 @@ sub generate_as_pdf { > my $letter = C4::Letters::GetPreparedLetter( > module => 'members', > letter_code => 'DISCHARGE', >- tables => { borrowers => $params->{borrowernumber}, }, >+ tables => { borrowers => $params->{borrowernumber}, branches => $params->{'branchcode'}, }, > ); > > my $today = output_pref( dt_from_string() ); >diff --git a/members/discharge.pl b/members/discharge.pl >index 2144af9..7c73af9 100755 >--- a/members/discharge.pl >+++ b/members/discharge.pl >@@ -78,7 +78,7 @@ if ( $input->param('borrowernumber') ) { > } > eval { > my $pdf_path = Koha::Borrower::Discharge::generate_as_pdf( >- { borrowernumber => $borrowernumber, } ); >+ { borrowernumber => $borrowernumber, branchcode => $data->{'branchcode'} } ); > > binmode(STDOUT); > print $input->header( >diff --git a/opac/opac-discharge.pl b/opac/opac-discharge.pl >index 800222c..5955a3e 100755 >--- a/opac/opac-discharge.pl >+++ b/opac/opac-discharge.pl >@@ -57,8 +57,12 @@ if ( $op eq 'request' ) { > } > elsif ( $op eq 'get' ) { > eval { >+ >+ # Getting member data >+ my $data = GetMember( borrowernumber => $loggedinuser ); > my $pdf_path = Koha::Borrower::Discharge::generate_as_pdf({ >- borrowernumber => $loggedinuser >+ borrowernumber => $loggedinuser, >+ branchcode => $data->{'branchcode'}, > }); > > binmode(STDOUT); >-- >1.9.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 14280
:
39571
|
39896
| 39935