Bugzilla – Attachment 171275 Details for
Bug 14250
Don't allow to generate discharges for patrons with fines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14250: (follow-up) Refacto the algorithm for discharge messages
Bug-14250-follow-up-Refacto-the-algorithm-for-disc.patch (text/plain), 4.67 KB, created by
Sukhmandeep
on 2024-09-10 16:50:16 UTC
(
hide
)
Description:
Bug 14250: (follow-up) Refacto the algorithm for discharge messages
Filename:
MIME Type:
Creator:
Sukhmandeep
Created:
2024-09-10 16:50:16 UTC
Size:
4.67 KB
patch
obsolete
>From d0e23e7b3d8e08060d9a284f7d2257af0c5939b3 Mon Sep 17 00:00:00 2001 >From: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> >Date: Wed, 4 Sep 2024 14:45:20 +0200 >Subject: [PATCH] Bug 14250: (follow-up) Refacto the algorithm for discharge > messages > >TEST PLAN: >1 - In the intranet add fines to a client and ensure they have no checkout >2 - Set syspref useDischarge to 'Allow' >3 - On client profile click on "Discharge", see it is possible >4 - On the opac, go to the tab "Ask for discharge", see it is possible >5 - Apply patch >6 - Click on the button "Ask for discharge" -> it will not be possible > and you will be propperly messaged >7 - Return to the tab "Ask for a discharge", there will be no button > anymore >8 - On the intranet page, there will be no button anymore >9 - Check out a book >10 - Repeat 7 and 8 and see the message include issue with checkout >11 - Remove fine and repeat 7 & 8 > >Note: removing the useless has_checkout and has_debt >Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com> >--- > .../bootstrap/en/modules/opac-discharge.tt | 16 +++------------- > opac/opac-discharge.pl | 5 ----- > 2 files changed, 3 insertions(+), 18 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt >index 3a3f381218..f657a4e6dc 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt >@@ -44,24 +44,14 @@ > <a href="/cgi-bin/koha/opac-discharge.pl?op=get">Get your discharge</a></li> > [% ELSIF pending %] > <p>Your discharge will be available on this page within a few days.</p> >- [% ELSIF failure %] >- <p>You cannot be discharged because you have checked out items. Please return your checked out items before asking for a discharge.</p> >- <ul> >- [% IF has_debt %] >- <li>You have unpaid charges. Please pay your charges before reapplying.</li> >- [% END %] >- [% IF has_issues %] >- <li>You have checked out items. Please return your checked out items before reapplying.</li> >- [% END %] >- [% IF !has_issue and !has_debt %] >- <li>You cannot be discharged for an unknown reason. Please contact library staff for more information.</li> >- [% END %] >- </ul> > [% ELSIF not messages %] > <h2>What is a discharge?</h2> > <p>This document certifies that you have returned all borrowed items. It is sometimes asked during a file transfer from a school to another. The discharge is sent by us to your school. You will also find it available on your reader account.</p> > <p><strong>Warning</strong>: This request is only valid if you are in good standing with the library. Once the application is made, you can not borrow library materials.</p> > [% UNLESS can_be_discharged %] >+ [% IF failure %] >+ <p> There was an error during the discharge process </p> >+ [% END %] > <div class="alert alert-info">You cannot be discharged because: > <ul> > [% IF discharge_problems.checkouts %] >diff --git a/opac/opac-discharge.pl b/opac/opac-discharge.pl >index 54fc526dfc..34fcaea4e2 100755 >--- a/opac/opac-discharge.pl >+++ b/opac/opac-discharge.pl >@@ -49,13 +49,10 @@ my ( $can_be_discharged, $discharge_problems ) = > Koha::Patron::Discharge::can_be_discharged( { borrowernumber => $loggedinuser } ); > my $patron = Koha::Patrons->find($loggedinuser); > my $has_pending_checkouts = $patron->checkouts->count; >-my $has_debt = ( $patron->account->outstanding_debits->total_outstanding > 0 ); > > $template->param( > can_be_discharged => $can_be_discharged, > discharge_problems => $discharge_problems, >- has_checkouts => $has_pending_checkouts, >- has_debt => $has_debt, > ); > > my $pending = Koha::Patron::Discharge::count( >@@ -82,8 +79,6 @@ if ( $op eq 'cud-request' ) { > $template->param( success => 1 ); > } else { > $template->param( failure => 1 ); >- $template->param( has_issues => $has_pending_checkouts ); >- $template->param( has_debt => $has_debt ); > } > } elsif ( $op eq 'get' ) { > unless ($available) { >-- >2.34.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 14250
:
170136
|
170228
|
170581
|
170607
|
170662
|
170663
|
170664
|
170705
|
170706
|
170707
|
170708
|
171025
|
171026
|
171271
|
171272
|
171273
|
171274
| 171275 |
171276