Bugzilla – Attachment 106192 Details for
Bug 13961
Option to include patron's total amount of fines in notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13961: Option to include patron's total amount of fines in notices
Bug-13961-Option-to-include-patrons-total-amount-o.patch (text/plain), 2.27 KB, created by
ByWater Sandboxes
on 2020-06-23 09:40:07 UTC
(
hide
)
Description:
Bug 13961: Option to include patron's total amount of fines in notices
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2020-06-23 09:40:07 UTC
Size:
2.27 KB
patch
obsolete
>From 65543d127420293e78fc0d69cee8963964daa3d6 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <j.kylmala@gmail.com> >Date: Tue, 25 Aug 2015 06:14:15 +0000 >Subject: [PATCH] Bug 13961: Option to include patron's total amount of fines > in notices >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Possibility to show patrons's total amount of fines in notices. > >Test plan: >1. Apply patch >2. Modify some notice in Tools -> notices & slips >3. See that in the left side of where one can edit message's body is now > also a new attribute that one can include to the text: > borrowers.totalfine >4. Include that to the text and see it showing the patron's total amount > of fines. > >Sponsored-by: Vaara-kirjastot > >Followed test plan, works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> >--- > C4/Letters.pm | 6 ++++++ > tools/letter.pl | 3 ++- > 2 files changed, 8 insertions(+), 1 deletion(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index b6766891c2..4fda2449ba 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -632,6 +632,12 @@ sub GetPreparedLetter { > my $OPACBaseURL = C4::Context->preference('OPACBaseURL'); > $letter->{content} =~ s/<<OPACBaseURL>>/$OPACBaseURL/go; > >+ my $borrowernumber = $tables->{borrowers}; >+ my $lines = Koha::Account::Lines->search({ borrowernumber => $borrowernumber }); >+ my ($totalfine) = $lines->total_outstanding; >+ $totalfine = sprintf("%.2f", $totalfine); >+ $letter->{content} =~ s/<<borrowers.totalfine>>/$totalfine/go; >+ > if ($want_librarian) { > # parsing librarian name > my $userenv = C4::Context->userenv; >diff --git a/tools/letter.pl b/tools/letter.pl >index 6044243c09..bceaa83262 100755 >--- a/tools/letter.pl >+++ b/tools/letter.pl >@@ -246,7 +246,8 @@ sub add_form { > add_fields('items'), > {value => 'items.content', text => 'items.content'}, > {value => 'items.fine', text => 'items.fine'}, >- add_fields('borrowers'); >+ add_fields('borrowers'), >+ {value => 'borrowers.totalfine', text => 'borrowers.totalfine' }; > if ($module eq 'circulation') { > push @{$field_selection}, add_fields('opac_news'); > >-- >2.11.0
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 13961
:
41872
|
42077
|
42089
|
50517
|
98819
|
98820
|
98821
|
106192
|
106193
|
106194
|
106623
|
106624
|
116631
|
116632
|
116633
|
116634
|
116635
|
121854