Bugzilla – Attachment 70346 Details for
Bug 12001
GetMemberAccountRecords slows down display of patron details and checkout pages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12001: Format DEBT correctly
Bug-12001-Format-DEBT-correctly.patch (text/plain), 6.37 KB, created by
Jonathan Druart
on 2018-01-09 14:05:05 UTC
(
hide
)
Description:
Bug 12001: Format DEBT correctly
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-01-09 14:05:05 UTC
Size:
6.37 KB
patch
obsolete
>From 58455ca7b8dab0a3e3f992fc2d7379285b546d9d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Sun, 7 Jan 2018 13:41:07 -0300 >Subject: [PATCH] Bug 12001: Format DEBT correctly > >Before this patchset, DEBT was formatted in the module, now it should be >done template-side. >--- > C4/Circulation.pm | 12 ++++++------ > koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 2 +- > .../prog/en/modules/circ/circulation_batch_checkouts.tt | 2 +- > koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 3 ++- > opac/sco/sco-main.pl | 9 ++------- > 5 files changed, 12 insertions(+), 16 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 706f793f83..b6fe10efef 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -797,20 +797,20 @@ sub CanBookBeIssued { > > if ( C4::Context->preference("IssuingInProcess") ) { > if ( $non_issues_charges > $amountlimit && !$inprocess && !$allowfineoverride) { >- $issuingimpossible{DEBT} = sprintf( "%.2f", $non_issues_charges ); >+ $issuingimpossible{DEBT} = $non_issues_charges; > } elsif ( $non_issues_charges > $amountlimit && !$inprocess && $allowfineoverride) { >- $needsconfirmation{DEBT} = sprintf( "%.2f", $non_issues_charges ); >+ $needsconfirmation{DEBT} = $non_issues_charges; > } elsif ( $allfinesneedoverride && $non_issues_charges > 0 && $non_issues_charges <= $amountlimit && !$inprocess ) { >- $needsconfirmation{DEBT} = sprintf( "%.2f", $non_issues_charges ); >+ $needsconfirmation{DEBT} = $non_issues_charges; > } > } > else { > if ( $non_issues_charges > $amountlimit && $allowfineoverride ) { >- $needsconfirmation{DEBT} = sprintf( "%.2f", $non_issues_charges ); >+ $needsconfirmation{DEBT} = $non_issues_charges; > } elsif ( $non_issues_charges > $amountlimit && !$allowfineoverride) { >- $issuingimpossible{DEBT} = sprintf( "%.2f", $non_issues_charges ); >+ $issuingimpossible{DEBT} = $non_issues_charges; > } elsif ( $non_issues_charges > 0 && $allfinesneedoverride ) { >- $needsconfirmation{DEBT} = sprintf( "%.2f", $non_issues_charges ); >+ $needsconfirmation{DEBT} = $non_issues_charges; > } > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 842e479ee9..7919fe3f9c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -201,7 +201,7 @@ $(document).ready(function() { > [% END %] > > [% IF ( DEBT ) %] >- <li>The patron has a debt of [% DEBT %].</li> >+ <li>The patron has a debt of [% DEBT | $Price %].</li> > [% END %] > > [% IF ( DEBT_GUARANTEES ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >index 5da3352acd..1dfd4fea71 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >@@ -247,7 +247,7 @@ > <li><i class="fa fa-li fa-exclamation"></i>The barcode was not found [% checkout_info.barcode |html %].</li> > [% END %] > [% IF checkout_info.DEBT %] >- <li><i class="fa fa-li fa-exclamation"></i>The patron has a debt of [% checkout_info.DEBT %].</li> <!-- Need debt_confirmed --> >+ <li><i class="fa fa-li fa-exclamation"></i>The patron has a debt of [% checkout_info.DEBT | $Price %].</li> <!-- Need debt_confirmed --> > [% END %] > </p> > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >index 2ab9367288..fe595aceaa 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >@@ -1,6 +1,7 @@ > [% USE Koha %] > [% USE KohaDates %] > [% USE AudioAlerts %] >+[% USE Price %] > [% INCLUDE 'doc-head-open.inc' %] > <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] › Self checkout </title> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> >@@ -53,7 +54,7 @@ > [% ELSIF ( circ_error_NOT_FOR_LOAN ) %] > This item is not for loan. > [% ELSIF ( circ_error_DEBT ) %] >- You owe the library [% amount %] and cannot check out. >+ You owe the library [% DEBT | $Price %] and cannot check out. > [% ELSIF ( circ_error_WTHDRAWN ) %] > This item has been withdrawn from the collection. > [% ELSIF ( circ_error_RESTRICTED ) %] >diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl >index d6e4176170..5b30be05e6 100755 >--- a/opac/sco/sco-main.pl >+++ b/opac/sco/sco-main.pl >@@ -114,11 +114,6 @@ if ( $patronid ) { > $borrower = $borrower->unblessed if $borrower; > } > >-my $currencySymbol = ""; >-if ( my $active_currency = Koha::Acquisition::Currencies->get_active ) { >- $currencySymbol = $active_currency->symbol; >-} >- > my $branch = $issuer->{branchcode}; > my $confirm_required = 0; > my $return_only = 0; >@@ -163,7 +158,7 @@ elsif ( $borrower and $op eq "checkout" ) { > hide_main => 1, > ); > if ($issue_error eq 'DEBT') { >- $template->param(amount => $currencySymbol.$impossible->{DEBT}); >+ $template->param(DEBT => $impossible->{DEBT}); > } > #warn "issue_error: " . $issue_error ; > if ( $issue_error eq "NO_MORE_RENEWALS" ) { >@@ -195,7 +190,7 @@ elsif ( $borrower and $op eq "checkout" ) { > hide_main => 1, > ); > if ($issue_error eq 'DEBT') { >- $template->param(amount => $currencySymbol.$needconfirm->{DEBT}); >+ $template->param(DEBT => $needconfirm->{DEBT}); > } > } else { > if ( $confirmed || $issuenoconfirm ) { # we'll want to call getpatroninfo again to get updated issues. >-- >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 12001
:
70314
|
70342
|
70343
|
70344
|
70345
|
70346
|
71798
|
71799
|
71800
|
71801
|
71802
|
71852
|
71853
|
71854
|
71855
|
71856
|
71857
|
71979
|
71980
|
71981
|
71982
|
71983
|
71984
|
71985
|
71986
|
71987
|
71988
|
77066
|
77136
|
77278
|
77279