From a932550b3dad4c471a4c1b1ab59dd08bec90f3de Mon Sep 17 00:00:00 2001 From: Michael Hafen Date: Tue, 24 Feb 2009 12:05:50 -0700 Subject: [PATCH] Add option to inventory tool to ignore copies on loan This adds an option to the inventory tool causing it to ignore copies currently on loan. This is good if you want to do inventory, but don't want to update the date-last-seen on items currently on loan. Signed-off-by: Galen Charlton Signed-off-by: Henri-Damien LAURENT --- C4/Items.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/C4/Items.pm b/C4/Items.pm index c9818a0cb3..b843ca5844 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1071,6 +1071,11 @@ END_SQL push @where_strings, 'issues.date_due IS NULL'; } + if ( $ignoreissued) { + $query .= "LEFT JOIN issues ON items.itemnumber = issues.itemnumber "; + push @where_strings, 'issues.date_due IS NULL'; + } + if ( @where_strings ) { $query .= 'WHERE '; $query .= join ' AND ', @where_strings; -- 2.39.5