Bugzilla – Attachment 41015 Details for
Bug 8483
Borrower reading history should include deleted items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8483 - Add checkout classes
Bug-8483---Add-checkout-classes.patch (text/plain), 6.82 KB, created by
Kyle M Hall (khall)
on 2015-07-16 12:03:01 UTC
(
hide
)
Description:
Bug 8483 - Add checkout classes
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-07-16 12:03:01 UTC
Size:
6.82 KB
patch
obsolete
>From 93e15853e2552be95fa145c4d369652dfeacb25e Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 16 Jul 2015 07:55:27 -0400 >Subject: [PATCH] Bug 8483 - Add checkout classes > >--- > Koha/Checkout.pm | 76 +++++++++++++++++++++++++++++++++++++++++++++++++ > Koha/Checkouts.pm | 58 +++++++++++++++++++++++++++++++++++++ > Koha/Old/Checkout.pm | 57 ++++++++++++++++++++++++++++++++++++ > Koha/Old/Checkouts.pm | 63 ++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 254 insertions(+), 0 deletions(-) > create mode 100644 Koha/Checkout.pm > create mode 100644 Koha/Checkouts.pm > create mode 100644 Koha/Old/Checkout.pm > create mode 100644 Koha/Old/Checkouts.pm > >diff --git a/Koha/Checkout.pm b/Koha/Checkout.pm >new file mode 100644 >index 0000000..f30f6e1 >--- /dev/null >+++ b/Koha/Checkout.pm >@@ -0,0 +1,76 @@ >+package Koha::Checkout; >+ >+# Copyright ByWater Solutions 2015 >+# >+# 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 Carp; >+ >+use Koha::Database; >+use Koha::Items; >+use Koha::Deleted::Items; >+ >+use base qw(Koha::Object); >+ >+=head1 NAME >+ >+Koha::Checkout - Koha Checkout Object class >+ >+=head1 API >+ >+=head2 Class Methods >+ >+=cut >+ >+=head3 item >+ >+my $item = $checkout->item({ deleted => 1 }); >+ >+Returns the related Koha::Item for this checkout. >+ >+If the parameter delete is passed and true, and the itemnumber >+is not found for current items, this method will look for a matching >+deleted item. >+ >+=cut >+ >+sub item { >+ my ( $self, $params ) = @_; >+ >+ my $item = Koha::Items->search( { itemnumber => $self->itemnumber() } )->next(); >+ >+ $item ||= Koha::Deleted::Items->search( { itemnumber => $self->itemnumber() } )->next() if ( $params->{deleted} ); >+ >+ return $item || undef; >+} >+ >+=head3 type >+ >+=cut >+ >+sub type { >+ return 'Issue'; >+} >+ >+=head1 AUTHOR >+ >+Kyle M Hall <kyle@bywatersolutions.com> >+ >+=cut >+ >+1; >diff --git a/Koha/Checkouts.pm b/Koha/Checkouts.pm >new file mode 100644 >index 0000000..9b1ddc1 >--- /dev/null >+++ b/Koha/Checkouts.pm >@@ -0,0 +1,58 @@ >+package Koha::Checkouts; >+ >+# Copyright ByWater Solutions 2015 >+# >+# 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 Carp; >+ >+use Koha::Database; >+ >+use Koha::Checkout; >+ >+use base qw(Koha::Objects); >+ >+=head1 NAME >+ >+Koha::Checkouts - Koha Checkouts Object class >+ >+=head1 API >+ >+=head2 Class Methods >+ >+=cut >+ >+=head3 type >+ >+=cut >+ >+sub type { >+ return 'Issue'; >+} >+ >+sub object_class { >+ return 'Koha::Checkout'; >+} >+ >+=head1 AUTHOR >+ >+Kyle M Hall <kyle@bywatersolutions.com> >+ >+=cut >+ >+1; >diff --git a/Koha/Old/Checkout.pm b/Koha/Old/Checkout.pm >new file mode 100644 >index 0000000..27e8283 >--- /dev/null >+++ b/Koha/Old/Checkout.pm >@@ -0,0 +1,57 @@ >+package Koha::Old::Checkout; >+ >+# Copyright ByWater Solutions 2015 >+# >+# 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 Carp; >+ >+use Koha::Database; >+ >+use base qw(Koha::Checkout); >+ >+=head1 NAME >+ >+Koha::Old::Checkout - Koha Old Checkout Object class >+ >+This class is an extension of Koha::Checkout. >+ >+New methods should only be added to Koha::Checkout unless they are specifically >+and only for dealing with old checkouts. >+ >+=head1 API >+ >+=head2 Class Methods >+ >+=cut >+ >+=head3 type >+ >+=cut >+ >+sub type { >+ return 'OldIssue'; >+} >+ >+=head1 AUTHOR >+ >+Kyle M Hall <kyle@bywatersolutions.com> >+ >+=cut >+ >+1; >diff --git a/Koha/Old/Checkouts.pm b/Koha/Old/Checkouts.pm >new file mode 100644 >index 0000000..85dc15e >--- /dev/null >+++ b/Koha/Old/Checkouts.pm >@@ -0,0 +1,63 @@ >+package Koha::Old::Checkouts; >+ >+# Copyright ByWater Solutions 2015 >+# >+# 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 Carp; >+ >+use Koha::Database; >+ >+use Koha::Old::Checkout; >+ >+use base qw(Koha::Checkouts); >+ >+=head1 NAME >+ >+Koha::Old::Checkouts - Koha Old Checkouts Object class >+ >+This class is an extension of Koha::Checkouts. >+ >+New methods should only be added to Koha::Checkouts unless they are specifically >+and only for dealing with old checkouts. >+ >+=head1 API >+ >+=head2 Class Methods >+ >+=cut >+ >+=head3 type >+ >+=cut >+ >+sub type { >+ return 'OldIssue'; >+} >+ >+sub object_class { >+ return 'Koha::Old::Checkout'; >+} >+ >+=head1 AUTHOR >+ >+Kyle M Hall <kyle@bywatersolutions.com> >+ >+=cut >+ >+1; >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8483
:
41013
|
41014
|
41015
|
41016
|
41017
|
41999
|
42000
|
42001
|
42787
|
42788
|
42789
|
42932
|
42935
|
42939
|
42940
|
42941
|
49129
|
49130
|
49131
|
49134
|
49135
|
49136
|
49137
|
49139
|
49140
|
49141
|
49142
|
49143
|
49144
|
49145