c34c8ee853
Currently, once a user is discharged, lifting the discharge debarment does not allow the user to ask for a discharge again. This patch adds the ability for a user to be discharged several times and to keep an history of the discharges. Test plan: - As a user, ask for a discharge. - As a librarian, allow the discharge. - Check that the requested and validated dates appear on the discharge panel of the borrower in the admin interface. - Lift the discharge debarment of the user. - Check that you can repeat these steps and that the new discharges are added in the discharge panel of the borrower in the admin interface. Please note that you will need to run misc/devel/update_dbix_class_files.pl after the SQL update. Adding a primary key to the discharges table was mandatory for DBIX::Class to be able to query with order_by. Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
71 lines
2.1 KiB
Text
71 lines
2.1 KiB
Text
[% USE KohaDates %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Patrons › [% IF (unknowuser) %]Patron does not exist[% ELSE %]Discharge for [% firstname %] [% surname %] ([% cardnumber %])[% END %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
<body id="discharge" class="discharge">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'patron-search.inc' %]
|
|
|
|
<div id="breadcrumbs">
|
|
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
|
|
› <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
|
|
› [% IF (unknowuser) %]Patron does not exist[% ELSE %]Discharge for [% firstname %] [% surname %] ([% cardnumber %])[% END %]
|
|
</div>
|
|
|
|
<div id="doc3" class="yui-t1">
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
<div class="yui-g">
|
|
<h3>Discharge</h3>
|
|
[% FOR message IN messages %]
|
|
<div class="dialog [% message.type %]">
|
|
[% IF message.code == "unable_to_generate_pdf" %]
|
|
An error occurs when generating the pdf file.
|
|
Please contact the administrator to resolve this problem.
|
|
[% END %]
|
|
</div>
|
|
[% END %]
|
|
[% UNLESS can_be_discharged %]
|
|
<p>Cannot edit discharge: borrower has issues.</p>
|
|
[% ELSE %]
|
|
[% IF has_reserves %]
|
|
<p>Borrower has reserves: they will be canceled if the discharge is generated.</p>
|
|
[% END %]
|
|
<form method="post">
|
|
<input type="submit" value="Generate discharge" name="discharge" />
|
|
<input type="hidden" value="[% borrowernumber %]" name="borrowernumber" />
|
|
</form>
|
|
[% END %]
|
|
|
|
[% IF validated_discharges %]
|
|
<h2>Already validated discharges</h2>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Requested</th>
|
|
<th>Validated</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOR d IN validated_discharges %]
|
|
<tr>
|
|
<td>[% d.needed | $KohaDates with_hours = 1 %]</td>
|
|
<td>[% d.validated | $KohaDates with_hours = 1 %]</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
[% END %]
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
[% INCLUDE 'circ-menu.inc' %]
|
|
</div>
|
|
</div>
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|