From 1be3fdd594009deaf3f00130d85c96637bd17a10 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 23 Mar 2020 11:23:46 +0100 Subject: [PATCH] Bug 23463: Replace a new occurrence of ModItem This new script have been pushed just before 23463. --- tools/batch_extend_due_dates.pl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/batch_extend_due_dates.pl b/tools/batch_extend_due_dates.pl index e79e5bdeb3..caec5bd230 100755 --- a/tools/batch_extend_due_dates.pl +++ b/tools/batch_extend_due_dates.pl @@ -24,7 +24,6 @@ use CGI; use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::Items qw( ModItem ); use Koha::Checkouts; use Koha::DateUtils qw( dt_from_string ); @@ -134,8 +133,7 @@ elsif ( $op eq 'modify' ) { $checkout->date_due($new_due_date)->store; # Update items.onloan - ModItem( { onloan => $new_due_date->strftime('%Y-%m-%d %H:%M') }, - undef, $checkout->itemnumber ); + $checkout->item->onloan($new_due_date)->store; } $template->param( -- 2.20.1