From c8efaa80e6a6f7dc1862e9123129599caf13c573 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 18 Dec 2017 11:25:00 -0300 Subject: [PATCH] Bug 19826: Add K::Acq::Budget(s) and K::Acq::Fund(s) This patch introduces Koha::Object(s)-derived classes for budgets and funds (aqbudgetperiods and aqbudgets respectively). C4::Budgets already uses DBIC calls on those tables so transition should be easy on top of this. To test: - Check the referenced schema files are the right ones. - QA scripts shoudl be happy. - Sign off :-D Note: the POD coverage report throws a false negative result on singular classes which is trivially wrong. Signed-off-by: Aleisha Amohia Signed-off-by: Kyle M Hall --- Koha/Acquisition/Budget.pm | 40 +++++++++++++++++++++++++++++++++++++ Koha/Acquisition/Budgets.pm | 48 +++++++++++++++++++++++++++++++++++++++++++++ Koha/Acquisition/Fund.pm | 40 +++++++++++++++++++++++++++++++++++++ Koha/Acquisition/Funds.pm | 48 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 176 insertions(+) create mode 100644 Koha/Acquisition/Budget.pm create mode 100644 Koha/Acquisition/Budgets.pm create mode 100644 Koha/Acquisition/Fund.pm create mode 100644 Koha/Acquisition/Funds.pm diff --git a/Koha/Acquisition/Budget.pm b/Koha/Acquisition/Budget.pm new file mode 100644 index 0000000000..3fea5de5d3 --- /dev/null +++ b/Koha/Acquisition/Budget.pm @@ -0,0 +1,40 @@ +package Koha::Acquisition::Budget; + +# 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); + +=head1 NAME + +Koha::Acquisition::Budget object class + +=head1 API + +=head2 Internal methods + +=head3 _type + +=cut + +sub _type { + return 'Aqbudgetperiod'; +} + +1; diff --git a/Koha/Acquisition/Budgets.pm b/Koha/Acquisition/Budgets.pm new file mode 100644 index 0000000000..e9cae2227b --- /dev/null +++ b/Koha/Acquisition/Budgets.pm @@ -0,0 +1,48 @@ +package Koha::Acquisition::Budgets; + +# 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::Objects); + +=head1 NAME + +Koha::Acquisition::Budgets object set class + +=head1 API + +=head2 Internal methods + +=head3 _type (internal) + +=cut + +sub _type { + return 'Aqbudgetperiod'; +} + +=head3 object_class (internal) + +=cut + +sub object_class { + return 'Koha::Acquisition::Budget'; +} + +1; diff --git a/Koha/Acquisition/Fund.pm b/Koha/Acquisition/Fund.pm new file mode 100644 index 0000000000..20cc26ea5f --- /dev/null +++ b/Koha/Acquisition/Fund.pm @@ -0,0 +1,40 @@ +package Koha::Acquisition::Fund; + +# 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); + +=head1 NAME + +Koha::Acquisition::Fund object class + +=head1 API + +=head2 Internal methods + +=head3 _type + +=cut + +sub _type { + return 'Aqbudget'; +} + +1; diff --git a/Koha/Acquisition/Funds.pm b/Koha/Acquisition/Funds.pm new file mode 100644 index 0000000000..4812ddfe9b --- /dev/null +++ b/Koha/Acquisition/Funds.pm @@ -0,0 +1,48 @@ +package Koha::Acquisition::Funds; + +# 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::Objects); + +=head1 NAME + +Koha::Acquisition::Funds object set class + +=head1 API + +=head2 Internal methods + +=head3 _type (internal) + +=cut + +sub _type { + return 'Aqbudget'; +} + +=head3 object_class (internal) + +=cut + +sub object_class { + return 'Koha::Acquisition::Fund'; +} + +1; -- 2.15.1