ffzg/recall_notices.pl: added --interval and --dedup
[koha.git] / catalogue / updateitem.pl
index 2e54eac..7924b2b 100755 (executable)
@@ -17,8 +17,7 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
-use strict; 
-use warnings;
+use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Auth;
 use C4::Context;
@@ -45,7 +44,7 @@ my $confirm=$cgi->param('confirm');
 my $dbh = C4::Context->dbh;
 
 # get the rest of this item's information
-my $item_data_hashref = GetItem($itemnumber, undef);
+my $item_data_hashref = Koha::Items->find($itemnumber)->unblessed;
 
 # make sure item statuses are set to 0 if empty or NULL
 for ($damaged,$itemlost,$withdrawn) {
@@ -81,6 +80,6 @@ elsif (defined $itemnotes) { # i.e., itemnotes parameter passed from form
 
 ModItem($item_changes, $biblionumber, $itemnumber);
 
-LostItem($itemnumber) if $itemlost;
+LostItem($itemnumber, 'moredetail') if $itemlost;
 
 print $cgi->redirect("moredetail.pl?biblionumber=$biblionumber&itemnumber=$itemnumber#item$itemnumber");