--- /dev/null
+package Koha::Old::Checkout;
+
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 3 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+use Modern::Perl;
+
+use Koha::Database;
+
+use base qw(Koha::Object);
+
+sub _type {
+ return 'OldIssue';
+}
+
+1;
--- /dev/null
+package Koha::Old::Checkouts;
+
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 3 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+use Modern::Perl;
+
+use Koha::Database;
+use Koha::Old::Checkout;
+
+use base qw(Koha::Objects);
+
+sub _type {
+ return 'OldIssue';
+}
+
+sub object_class {
+ return 'Koha::Old::Checkout';
+}
+
+1;
+++ /dev/null
-package Koha::OldIssue;
-
-# This file is part of Koha.
-#
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 3 of the License, or (at your option) any later
-# version.
-#
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with Koha; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-use Modern::Perl;
-
-use Koha::Database;
-
-use base qw(Koha::Object);
-
-sub _type {
- return 'OldIssue';
-}
-
-1;
+++ /dev/null
-package Koha::OldIssues;
-
-# This file is part of Koha.
-#
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 3 of the License, or (at your option) any later
-# version.
-#
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with Koha; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-use Modern::Perl;
-
-use Koha::Database;
-use Koha::OldIssue;
-
-use base qw(Koha::Objects);
-
-sub _type {
- return 'OldIssue';
-}
-
-sub object_class {
- return 'Koha::OldIssue';
-}
-
-1;
use Koha::Database;
use Koha::DateUtils;
use Koha::Holds;
-use Koha::OldIssues;
+use Koha::Old::Checkouts;
use Koha::Patron::Categories;
use Koha::Patron::HouseboundProfile;
use Koha::Patron::HouseboundRole;
return 1 if $issues->count; # 0 || N
# Check old issues table
- my $old_issues = Koha::OldIssues->search($criteria);
+ my $old_issues = Koha::Old::Checkouts->search($criteria);
return $old_issues->count; # 0 || N
}
use Koha::Account::Lines;
use Koha::Checkouts;
use Koha::Holds;
-use Koha::OldIssues;
+use Koha::Old::Checkouts;
use Koha::Patrons;
=head1 NAME
First, attempts to find a Koha::Checkout-object by C<$issue_id>. If we find one,
compare its borrowernumber to currently logged in C<$user>. However, if an issue
-is not found, attempt to find a Koha::OldIssue-object instead and compare its
+is not found, attempt to find a Koha::Old::Checkout-object instead and compare its
borrowernumber to currently logged in C<$user>.
=cut
my ($c, $user, $issue_id) = @_;
my $issue = Koha::Checkouts->find($issue_id);
- $issue = Koha::OldIssues->find($issue_id) unless $issue;
+ $issue = Koha::Old::Checkouts->find($issue_id) unless $issue;
return $issue && $issue->borrowernumber
&& $user->borrowernumber == $issue->borrowernumber;
}