Bugzilla – Attachment 140872 Details for
Bug 24381
ACCOUNT_CREDIT and ACCOUNT_DEBIT slip not printing information about paid fines/fees
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24381: Convert printfeercpt to use GetPreparedLetter
Bug-24381-Convert-printfeercpt-to-use-GetPreparedL.patch (text/plain), 2.94 KB, created by
Nick Clemens (kidclamp)
on 2022-09-22 21:32:06 UTC
(
hide
)
Description:
Bug 24381: Convert printfeercpt to use GetPreparedLetter
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-09-22 21:32:06 UTC
Size:
2.94 KB
patch
obsolete
>From 54c4cc5410cae3ee8273b370ce2a1ca6f043ea6c Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 14 Oct 2020 11:58:26 +0100 >Subject: [PATCH] Bug 24381: Convert printfeercpt to use GetPreparedLetter > >This patch updates C4::Letters to allow use of existing koha template >includes from notices, then updates the printfeercpt slip print option >to use GetPreparedLetter rather than calling getletter directly. > >As part of this work, we also add credits and debits handling to the >_parseletter_sth and _get_tt_params routines in C4::Letters to allow for >recognisable variable names in the notice template. >--- > C4/Letters.pm | 9 +++++++++ > members/printfeercpt.pl | 21 ++------------------- > 2 files changed, 11 insertions(+), 19 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index bde0d2b0dc..2a9dc8c7c5 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -29,6 +29,7 @@ use C4::Members; > use C4::Log qw( logaction ); > use C4::SMS; > use C4::Templates; >+use Koha::DateUtils; > use Koha::SMS::Providers; > > use Koha::Email; >@@ -1591,6 +1592,14 @@ sub _process_tt { > push @includes, "$htdocs/$_/en/includes" unless $lang eq 'en'; > } > >+ my $htdocs = C4::Context->config('intrahtdocs'); >+ my ($theme, $lang, $activethemes)= C4::Templates::themelanguage( $htdocs, 'about.tt', 'intranet'); >+ my @includes; >+ foreach (@$activethemes) { >+ push @includes, "$htdocs/$_/$lang/includes"; >+ push @includes, "$htdocs/$_/en/includes" unless $lang eq 'en'; >+ } >+ > my $use_template_cache = C4::Context->config('template_cache_dir') && defined $ENV{GATEWAY_INTERFACE}; > my $template = Template->new( > { >diff --git a/members/printfeercpt.pl b/members/printfeercpt.pl >index 6c695e469a..de6c8731b2 100755 >--- a/members/printfeercpt.pl >+++ b/members/printfeercpt.pl >@@ -56,22 +56,6 @@ output_and_exit_if_error( > ); > > my $letter = C4::Letters::GetPreparedLetter( >- module => 'circulation', >- letter_code => 'CREDIT_' . $credit->credit_type_code, >- branchcode => C4::Context::mybranch, >- message_transport_type => 'print', >- lang => $patron->lang, >- tables => { >- credits => $credit_id, >- borrowers => $patron->borrowernumber >- }, >- substitute => { >- tendered => scalar $input->param('tendered'), >- change => scalar $input->param('change') >- } >-); >- >-$letter //= C4::Letters::GetPreparedLetter( > module => 'circulation', > letter_code => 'ACCOUNT_CREDIT', > branchcode => C4::Context::mybranch, >@@ -88,9 +72,8 @@ $letter //= C4::Letters::GetPreparedLetter( > ); > > $template->param( >- slip => $letter->{content}, >- plain => !$letter->{is_html}, >- patron => $patron, >+ slip => $letter->{content}, >+ plain => !$letter->{is_html} > ); > > output_html_with_http_headers $input, $cookie, $template->output; >-- >2.30.2
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 24381
:
106946
|
106947
|
106950
|
106951
|
106952
|
106953
|
106956
|
106957
|
106958
|
106959
|
106960
|
106974
|
106975
|
106976
|
106977
|
110210
|
110211
|
110212
|
110213
|
110461
|
110462
|
110463
|
110464
|
111530
|
111531
|
111532
|
111533
|
111534
|
111590
|
111591
|
111592
|
111593
|
111594
|
111595
|
116394
|
140868
|
140869
|
140870
|
140871
|
140872
|
140873
|
141619
|
141620
|
141621
|
141622
|
141623
|
142386
|
142387
|
142388
|
142389
|
142390