Bugzilla – Attachment 148550 Details for
Bug 29099
Add support for item bundles in the inventory tool
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29099: Add Koha objects for item bundle(s)
Bug-29099-Add-Koha-objects-for-item-bundles.patch (text/plain), 3.22 KB, created by
Marcel de Rooy
on 2023-03-22 14:11:06 UTC
(
hide
)
Description:
Bug 29099: Add Koha objects for item bundle(s)
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-03-22 14:11:06 UTC
Size:
3.22 KB
patch
obsolete
>From 7166f881131b7c455884954923a49afa340c567a Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 22 Mar 2023 12:37:57 +0000 >Subject: [PATCH] Bug 29099: Add Koha objects for item bundle(s) >Content-Type: text/plain; charset=utf-8 > >--- > Koha/Item/Bundle.pm | 63 ++++++++++++++++++++++++++++++++++++++++++++ > Koha/Item/Bundles.pm | 50 +++++++++++++++++++++++++++++++++++ > 2 files changed, 113 insertions(+) > create mode 100644 Koha/Item/Bundle.pm > create mode 100644 Koha/Item/Bundles.pm > >diff --git a/Koha/Item/Bundle.pm b/Koha/Item/Bundle.pm >new file mode 100644 >index 0000000000..ef077796aa >--- /dev/null >+++ b/Koha/Item/Bundle.pm >@@ -0,0 +1,63 @@ >+package Koha::Item::Bundle; >+ >+# Copyright Koha Development Team 2023 >+# >+# 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, see <http://www.gnu.org/licenses>. >+ >+use Modern::Perl; >+use Koha::Item; >+ >+use base qw(Koha::Object); >+ >+=head1 NAME >+ >+Koha::Item::Bundle - Koha item bundle object >+ >+=head1 METHODS >+ >+=head2 item_object >+ >+ $item_bundle->item_object; >+ >+=cut >+ >+sub item_object { # name chosen different from column 'item' >+ my ( $self ) = @_; >+ return Koha::Item->_new_from_dbic( $self->_result->item ); >+} >+ >+=head2 host_item >+ >+ $item_bundle->host_item.barcode; >+ >+=cut >+ >+sub host_item { >+ my ( $self ) = @_; >+ return Koha::Item->_new_from_dbic( $self->_result->host ); >+} >+ >+=head1 INTERNAL METHODS >+ >+=head2 _type >+ >+=cut >+ >+sub _type { >+ return 'ItemBundle'; >+} >+ >+1; >diff --git a/Koha/Item/Bundles.pm b/Koha/Item/Bundles.pm >new file mode 100644 >index 0000000000..9d542fe800 >--- /dev/null >+++ b/Koha/Item/Bundles.pm >@@ -0,0 +1,50 @@ >+package Koha::Item::Bundles; >+ >+# Copyright Koha Development Team 2023 >+# >+# 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, see <http://www.gnu.org/licenses>. >+ >+use Modern::Perl; >+ >+use Koha::Item::Bundle; >+ >+use base qw(Koha::Objects); >+ >+=head1 NAME >+ >+Koha::Item::Bundles - Koha item bundles object >+ >+=head1 INTERNAL METHODS >+ >+=cut >+ >+=head2 _type >+ >+=cut >+ >+sub _type { >+ return 'ItemBundle'; >+} >+ >+=head3 object_class >+ >+=cut >+ >+sub object_class { >+ return 'Koha::Item::Bundle'; >+} >+ >+1; >-- >2.30.2
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 29099
:
125207
|
140898
|
146009
|
148550
|
148555
|
148556
|
176237
|
176238
|
176239