$doreturn = 0 if C4::Context->preference("BlockReturnOfWithdrawnItems");
}
+ if ( $item->{itemlost} and C4::Context->preference("BlockReturnOfLostItems") ) {
+ $doreturn = 0;
+ }
+
# case of a return of document (deal with issues and holdingbranch)
my $today = DateTime->now( time_zone => C4::Context->tz() );
# fix up the accounts.....
if ( $item->{'itemlost'} ) {
$messages->{'WasLost'} = 1;
-
- if ( $item->{'itemlost'} ) {
+ unless ( C4::Context->preference("BlockReturnOfLostItems") ) {
if (
Koha::RefundLostItemFeeRules->should_refund(
{
)
)
{
- _FixAccountForLostAndReturned( $item->{'itemnumber'}, $borrowernumber, $barcode );
+ _FixAccountForLostAndReturned( $item->{'itemnumber'},
+ $borrowernumber, $barcode );
$messages->{'LostItemFeeRefunded'} = 1;
}
}
z3950NormalizeAuthor
SpineLabelAutoPrint
SpineLabelShowPrintOnBibDetails
+ BlockReturnOfLostItems
BlockReturnOfWithdrawnItems
CalculateFinesOnReturn
AgeRestrictionOverride
}
elsif ( $code eq 'WasLost' ) {
$err{waslost} = 1;
+ $exit_required_p = 1 if C4::Context->preference("BlockReturnOfLostItems");
}
elsif ( $code eq 'LostItemFeeRefunded' ) {
$template->param( LostItemFeeRefunded => 1 );
forgivemanualholdsexpire => $forgivemanualholdsexpire,
overduecharges => $overduecharges,
AudioAlerts => C4::Context->preference("AudioAlerts"),
- BlockReturnOfWithdrawnItems => C4::Context->preference("BlockReturnOfWithdrawnItems"),
);
$itemnumber = GetItemnumberFromBarcode( $barcode );
--- /dev/null
+
+INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
+('BlockReturnOfLostItems','0','0','If enabled, items that are marked as lost cannot be returned.','YesNo');
('BiblioDefaultView','normal','normal|marc|isbd','Choose the default detail view in the catalog; choose between normal, marc or isbd','Choice'),
('BibtexExportAdditionalFields', '', NULL , 'Define additional BibTex tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.', 'textarea'),
('BlockExpiredPatronOpacActions','1',NULL,'Set whether an expired patron can perform opac actions such as placing holds or renew books, can be overridden on a per patron-type basis','YesNo'),
+('BlockReturnOfLostItems','0','0','If enabled, items that are marked as lost cannot be returned.','YesNo'),
('BlockReturnOfWithdrawnItems','1','0','If enabled, items that are marked as withdrawn cannot be returned.','YesNo'),
('BorrowerMandatoryField','surname|cardnumber',NULL,'Choose the mandatory fields for a patron\'s account','free'),
('borrowerRelationship','father|mother','','Define valid relationships between a guarantor & a guarantee (separated by | or ,)','free'),
no: "Don't block"
- returning of items that have been withdrawn.
-
+ - pref: BlockReturnOfLostItems
+ choices:
+ yes: Block
+ no: "Don't block"
+ - returning of items that have been lost.
+ -
- pref: CalculateFinesOnReturn
choices:
yes: Do
[% END %]
[% IF ( errmsgloo.waslost ) %]
<p class="problem">Item was lost, now found.</p>
- [% IF ( LostItemFeeRefunded ) %]
+ [% IF LostItemFeeRefunded and not Koha.Preference('BlockReturnOfLostItems') %]
<p class="problem">A refund has been applied to the borrowing patron's account.</p>
+ [% ELSIF Koha.Preference('BlockReturnOfLostItems') %]
+ <h5>Cannot check in</h5>
+ <p><strong>NOT CHECKED IN</strong></p>
[% ELSE %]
<p class="problem">Any lost item fees for this item will remain on the patron's account.</p>
[% END %]
[% END %]
[% IF ( errmsgloo.withdrawn ) %]
- [% IF BlockReturnOfWithdrawnItems %]
+ [% IF Koha.Preference('BlockReturnOfWithdrawnItems') %]
<h5>Cannot check in</h5>
<p><strong>NOT CHECKED IN</strong></p>
- <p class="problem">Item is withdrawn.</p>
- [% ELSE %]
- <p class="problem">Item is withdrawn.</p>
[% END %]
+ <p class="problem">Item is withdrawn.</p>
[% END %]
[% IF ( errmsgloo.debarred ) %]
<p class="problem"><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% errmsgloo.debarborrowernumber %]">[% errmsgloo.debarname %]([% errmsgloo.debarcardnumber %])</a> is now debarred until [% errmsgloo.debarred | $KohaDates %].</p>
z3950NormalizeAuthor
SpineLabelAutoPrint
SpineLabelShowPrintOnBibDetails
+ BlockReturnOfLostItems
BlockReturnOfWithdrawnItems
CalculateFinesOnReturn
AgeRestrictionOverride