Bug 13261 - Better check in message for patrons with indefinite restricition
This patch adds a better check in message for patrons with indefinite restriction. To test: Check out an item to a patron. Add a manual restriction without expiry date to that patron. Check in the item. Without patch, the checkin message reads: Reminder: Patron was earlier restricted until 9999-12-31 Apply patch and repeat steps above. The message should now read: Reminder: Patron has a restriction (no expiry date) NOTE: Changed wording at two places following Owen's suggestion. New: "Patron has an indefinite restriction" Signed-off-by: Frederic Demians <f.demians@tamil.fr> Thanks Marc for catching this case. I was thinking like you that the wording sounded strange while playing with bug 13242. Merge the original patch and the followup, containing a better wording, thanks to Owen comment. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works as described, no problems found. Passes tests and QA script. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
6b432853f6
commit
955e836c9b
|
|
@ -1946,11 +1946,15 @@ sub AddReturn {
|
|||
}
|
||||
# there's no overdue on the item but borrower had been previously debarred
|
||||
} elsif ( $issue->{date_due} and $borrower->{'debarred'} ) {
|
||||
my $borrower_debar_dt = dt_from_string( $borrower->{debarred} );
|
||||
$borrower_debar_dt->truncate(to => 'day');
|
||||
my $today_dt = $today->clone()->truncate(to => 'day');
|
||||
if ( DateTime->compare( $borrower_debar_dt, $today_dt ) != -1 ) {
|
||||
$messages->{'PrevDebarred'} = $borrower->{'debarred'};
|
||||
if ( $borrower->{debarred} eq "9999-12-31") {
|
||||
$messages->{'ForeverDebarred'} = $borrower->{'debarred'};
|
||||
} else {
|
||||
my $borrower_debar_dt = dt_from_string( $borrower->{debarred} );
|
||||
$borrower_debar_dt->truncate(to => 'day');
|
||||
my $today_dt = $today->clone()->truncate(to => 'day');
|
||||
if ( DateTime->compare( $borrower_debar_dt, $today_dt ) != -1 ) {
|
||||
$messages->{'PrevDebarred'} = $borrower->{'debarred'};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -506,6 +506,9 @@ foreach my $code ( keys %$messages ) {
|
|||
elsif ( $code eq 'PrevDebarred' ) {
|
||||
$err{prevdebarred} = $messages->{'PrevDebarred'};
|
||||
}
|
||||
elsif ( $code eq 'ForeverDebarred' ) {
|
||||
$err{foreverdebarred} = $messages->{'ForeverDebarred'};
|
||||
}
|
||||
elsif ( $code eq 'NotForLoanStatusUpdated' ) {
|
||||
$err{NotForLoanStatusUpdated} = $messages->{NotForLoanStatusUpdated};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -440,7 +440,7 @@ $(document).ready(function() {
|
|||
[% END %]
|
||||
|
||||
[% IF ( USERBLOCKEDNOENDDATE ) %]
|
||||
<li>Patron has a restriction (no expiry date).</li>
|
||||
<li>Patron has an indefinite restriction.</li>
|
||||
[% END %]
|
||||
|
||||
[% IF ( USERBLOCKEDOVERDUE ) %]
|
||||
|
|
@ -449,7 +449,7 @@ $(document).ready(function() {
|
|||
</ul>
|
||||
|
||||
[% IF (forceallow) %]
|
||||
<li>Restriction overridden temporarily</li>
|
||||
<li>Restriction overridden temporarily.</li>
|
||||
[% END %]
|
||||
|
||||
</div></div>
|
||||
|
|
|
|||
|
|
@ -423,6 +423,10 @@ $(document).ready(function () {
|
|||
[% IF ( errmsgloo.prevdebarred ) %]
|
||||
<p class="problem"><b>Reminder: </b>Patron was earlier restricted until [% errmsgloo.prevdebarred | $KohaDates %]</p>
|
||||
[% END %]
|
||||
[% IF ( errmsgloo.foreverdebarred ) %]
|
||||
<p class="problem"><b>Reminder: </b>Patron has an indefinite restriction</p>
|
||||
[% END %]
|
||||
|
||||
[% END %]
|
||||
[% IF ( soundon ) %]
|
||||
<audio src="[% interface %]/[% theme %]/sound/critical.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
|
||||
|
|
|
|||
Loading…
Reference in New Issue