@@ -, +, @@ - Find an item which is checked out and mark it lost from moredetail.pl - Find an item which is checked out and mark it lost using the batch item modification tool --- catalogue/updateitem.pl | 2 +- installer/data/mysql/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 6 ++++++ .../en/modules/admin/preferences/circulation.pref | 8 ++++++++ tools/batchMod.pl | 2 +- 5 files changed, 17 insertions(+), 2 deletions(-) --- a/catalogue/updateitem.pl +++ a/catalogue/updateitem.pl @@ -74,6 +74,6 @@ if (defined $itemnotes) { # i.e., itemnotes parameter passed from form ModItem($item_changes, $biblionumber, $itemnumber); -LostItem($itemnumber, 'MARK RETURNED', 'CHARGE FEE') if $itemlost; +LostItem($itemnumber, C4::Context->preference("ReturnLostItems"), 'CHARGE FEE') if $itemlost; print $cgi->redirect("moredetail.pl?biblionumber=$biblionumber&itemnumber=$itemnumber#item$itemnumber"); --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -423,3 +423,4 @@ INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ( INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('DisplayIconsXSLT', '1', '', 'If ON, displays the format, audience, and material type icons in XSLT MARC21 results and detail pages.', 'YesNo'); INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('HighlightOwnItemsOnOPAC','0','','If on, and a patron is logged into the OPAC, items from his or her home library will be emphasized and shown first in search results and item details.','YesNo'); INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('HighlightOwnItemsOnOPACWhich','PatronBranch','PatronBranch|OpacURLBranch','Decides which branch''s items to emphasize. If PatronBranch, emphasize the logged in user''s library''s items. If OpacURLBranch, highlight the items of the Apache var BRANCHCODE defined in Koha''s Apache configuration file.','Choice') +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('ReturnLostItems', '1', 'If enabled, items marked as lost via the librarian intranet will be automatically returned. Note, the cronjob for marking items as lost has its own command line switch and is not affected by this system preference.','', 'YesNo'); --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -6771,6 +6771,12 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } +$DBversion ="3.11.00.XXX"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('ReturnLostItems', '1', '','If enabled, items marked as lost via the librarian intranet will be automatically returned. Note, the cronjob for marking items as lost has its own command line switch and is not affected by this system preference.', 'YesNo')"); + print "Upgrade to $DBversion done (Add system preference ReturnLostItems)\n"; + SetVersion($DBversion); +} =head1 FUNCTIONS --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -543,3 +543,11 @@ Circulation: - and this password - pref: AutoSelfCheckPass - . + Lost Items Policy: + - + - pref: ReturnLostItems + type: choice + choices: + yes: "Check in" + no: "Don't check in" + - items marked as lost that are checked out to a patron. --- a/tools/batchMod.pl +++ a/tools/batchMod.pl @@ -190,7 +190,7 @@ if ($op eq "action") { UpdateMarcWith( $marcitem, $localmarcitem ); eval{ if ( my $item = ModItemFromMarc( $localmarcitem, $itemdata->{biblionumber}, $itemnumber ) ) { - LostItem($itemnumber, 'MARK RETURNED', 'CHARGE FEE') if $item->{itemlost}; + LostItem($itemnumber, C4::Context->preference("ReturnLostItems"), 'CHARGE FEE') if $item->{itemlost}; } }; } --