Bugzilla – Attachment 50835 Details for
Bug 14577
Allow restriction of checkouts based on fines of guarantor/guarantee
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14577 [QA Followup]
Bug-14577-QA-Followup.patch (text/plain), 5.61 KB, created by
Kyle M Hall (khall)
on 2016-04-27 16:51:59 UTC
(
hide
)
Description:
Bug 14577 [QA Followup]
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-04-27 16:51:59 UTC
Size:
5.61 KB
patch
obsolete
>From e16fc533f17935ce1ac8ccbb845851f7bed4dd8d Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 16 Mar 2016 18:00:20 +0000 >Subject: [PATCH] Bug 14577 [QA Followup] > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/Circulation.pm | 6 +++--- > C4/Members.pm | 2 +- > .../intranet-tmpl/prog/en/modules/circ/circulation.tt | 3 ++- > .../en/modules/circ/circulation_batch_checkouts.tt | 11 ++++++++++- > t/db_dependent/Patron.t | 19 +------------------ > 5 files changed, 17 insertions(+), 24 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 73b2c2c..04c8176 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -863,11 +863,11 @@ sub CanBookBeIssued { > } > > if ( $guarantees_non_issues_charges > $no_issues_charge_guarantees && !$inprocess && !$allowfineoverride) { >- $issuingimpossible{DEBT_GUARANTEES} = sprintf( "%.2f", $guarantees_non_issues_charges ); >+ $issuingimpossible{DEBT_GUARANTEES} = $guarantees_non_issues_charges; > } elsif ( $guarantees_non_issues_charges > $no_issues_charge_guarantees && !$inprocess && $allowfineoverride) { >- $needsconfirmation{DEBT_GUARANTEES} = sprintf( "%.2f", $guarantees_non_issues_charges ); >+ $needsconfirmation{DEBT_GUARANTEES} = $guarantees_non_issues_charges; > } elsif ( $allfinesneedoverride && $guarantees_non_issues_charges > 0 && $guarantees_non_issues_charges <= $no_issues_charge_guarantees && !$inprocess ) { >- $needsconfirmation{DEBT_GUARANTEES} = sprintf( "%.2f", $guarantees_non_issues_charges ); >+ $needsconfirmation{DEBT_GUARANTEES} = $guarantees_non_issues_charges; > } > } > >diff --git a/C4/Members.pm b/C4/Members.pm >index a3e1377..7ad7689 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -343,7 +343,7 @@ sub patronflags { > if ( $guarantees_non_issues_charges > $no_issues_charge_guarantees ) { > my %flaginfo; > $flaginfo{'message'} = sprintf 'patron guarantees owe %.02f', $guarantees_non_issues_charges; >- $flaginfo{'amount'} = sprintf "%.02f", $guarantees_non_issues_charges; >+ $flaginfo{'amount'} = $guarantees_non_issues_charges; > $flaginfo{'noissues'} = 1 unless C4::Context->preference("allowfineoverride"); > $flags{'CHARGES_GUARANTEES'} = \%flaginfo; > } >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 7513680..fdce7ac 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -3,6 +3,7 @@ > [% USE KohaDates %] > [% USE ColumnsSettings %] > [% USE ItemTypes %] >+[% USE Price %] > [% IF Koha.Preference('ExportRemoveFields') OR Koha.Preference('ExportWithCsvProfile') %] > [% SET exports_enabled = 1 %] > [% END %] >@@ -236,7 +237,7 @@ $(document).ready(function() { > [% END %] > > [% IF ( DEBT_GUARANTEES ) %] >- <li>The patron's guarantees collectively have a debt of [% DEBT_GUARANTEES %].</li> >+ <li>The patron's guarantees collectively have a debt of [% DEBT_GUARANTEES | $Price %].</li> > [% END %] > > [% IF ( RENTALCHARGE && RENTALCHARGE > 0 ) %] >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 eadeb1d..1cbe06d 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 >@@ -1,5 +1,6 @@ > [% USE Branches %] > [% USE KohaDates %] >+[% USE Price %] > [% IF ( export_remove_fields OR export_with_csv_profile ) %] > [% SET exports_enabled = 1 %] > [% END %] >@@ -66,7 +67,15 @@ $(document).ready(function() { > <div class="dialog alert"> > Cannot check out! > [% IF charges_is_blocker %] >- Checkouts are <span class="circ-hlt">BLOCKED</span> because fine balance is <span class="circ-hlt">OVER THE LIMIT</span>. >+ <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span> >+ [% END %] >+ [% IF charges_guarantees_is_blocker %] >+ <li> >+ <span class="circ-hlt">Fees & Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees | $Price %]. >+ </li> >+ <li> >+ <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span> >+ </li> > [% END %] > </div> > [% ELSIF borrower and not checkout_infos %] >diff --git a/t/db_dependent/Patron.t b/t/db_dependent/Patron.t >index 0140013..11c57fe 100755 >--- a/t/db_dependent/Patron.t >+++ b/t/db_dependent/Patron.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 15; >+use Test::More tests => 13; > use Test::Warn; > > use C4::Context; >@@ -44,23 +44,6 @@ $object->surname("Test Surname"); > $object->store(); > > is( $object->in_storage, 1, "Object is now stored" ); >-my $guarantee1 = Koha::Patron->new( >- { >- categorycode => $categorycode, >- branchcode => $branchcode, >- guarantorid => $object->id >- } >-)->store(); >-my $guarantee2 = Koha::Patron->new( >- { >- categorycode => $categorycode, >- branchcode => $branchcode, >- guarantorid => $object->id >- } >-)->store(); >-my @guarantees = $object->guarantees(); >-is( $guarantees[0]->id, $guarantee1->id, "First guarantee matchs" ); >-is( $guarantees[1]->id, $guarantee2->id, "Second guarantee matchs" ); > > my $borrowernumber = $object->borrowernumber; > >-- >2.1.4
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 14577
:
47936
|
48632
|
48639
|
48759
|
48784
|
49036
|
49236
|
49237
|
49303
|
49304
|
50834
| 50835