Bugzilla – Attachment 66555 Details for
Bug 14850
Funds from inactive budgets appear in 'Funds' dropdown on acqui/invoice.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14850 - Add Koha Objects
Bug-14850---Add-Koha-Objects.patch (text/plain), 2.54 KB, created by
Nick Clemens
on 2017-08-28 16:03:46 UTC
(
hide
)
Description:
Bug 14850 - Add Koha Objects
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2017-08-28 16:03:46 UTC
Size:
2.54 KB
patch
obsolete
>From 250e28f8c4dd67b2b2e640e29d0be0f39b12e20e Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 28 Aug 2017 15:59:49 +0000 >Subject: [PATCH] Bug 14850 - Add Koha Objects > >--- > Koha/Acquisition/Budget.pm | 24 ++++++++++++++++++++++++ > Koha/Acquisition/BudgetPeriod.pm | 12 ++++++++++++ > Koha/Acquisition/BudgetPeriods.pm | 19 +++++++++++++++++++ > Koha/Acquisition/Budgets.pm | 19 +++++++++++++++++++ > 4 files changed, 74 insertions(+) > create mode 100644 Koha/Acquisition/Budget.pm > create mode 100644 Koha/Acquisition/BudgetPeriod.pm > create mode 100644 Koha/Acquisition/BudgetPeriods.pm > create mode 100644 Koha/Acquisition/Budgets.pm > >diff --git a/Koha/Acquisition/Budget.pm b/Koha/Acquisition/Budget.pm >new file mode 100644 >index 0000000..f357046 >--- /dev/null >+++ b/Koha/Acquisition/Budget.pm >@@ -0,0 +1,24 @@ >+package Koha::Acquisition::Budget; >+ >+use Modern::Perl; >+ >+use Koha::Acquisition::BudgetPeriods; >+use Koha::Acquisition::BudgetPeriod; >+use Koha::Database; >+use base qw( Koha::Object ); >+ >+sub active { >+ my ($self) = @_; >+ >+ my $b_period = Koha::Acquisition::BudgetPeriods->find({ budget_period_id => $self->budget_period_id }); >+ return unless $b_period; >+ my $active = $b_period->budget_period_active; >+ return $active; >+ >+} >+ >+sub _type { >+ return 'Aqbudget'; >+} >+ >+1; >diff --git a/Koha/Acquisition/BudgetPeriod.pm b/Koha/Acquisition/BudgetPeriod.pm >new file mode 100644 >index 0000000..55b3fa2 >--- /dev/null >+++ b/Koha/Acquisition/BudgetPeriod.pm >@@ -0,0 +1,12 @@ >+package Koha::Acquisition::BudgetPeriod; >+ >+use Modern::Perl; >+ >+use Koha::Database; >+use base qw( Koha::Object ); >+ >+sub _type { >+ return 'Aqbudgetperiod'; >+} >+ >+1; >diff --git a/Koha/Acquisition/BudgetPeriods.pm b/Koha/Acquisition/BudgetPeriods.pm >new file mode 100644 >index 0000000..e1b5d75 >--- /dev/null >+++ b/Koha/Acquisition/BudgetPeriods.pm >@@ -0,0 +1,19 @@ >+package Koha::Acquisition::BudgetPeriods; >+ >+use Modern::Perl; >+ >+use Carp; >+ >+use Koha::Database; >+ >+use base qw( Koha::Objects ); >+ >+sub _type { >+ return 'Aqbudgetperiod'; >+} >+ >+sub object_class { >+ return 'Koha::Acquisition::BudgetPeriod'; >+} >+ >+1; >diff --git a/Koha/Acquisition/Budgets.pm b/Koha/Acquisition/Budgets.pm >new file mode 100644 >index 0000000..f18ac5e >--- /dev/null >+++ b/Koha/Acquisition/Budgets.pm >@@ -0,0 +1,19 @@ >+package Koha::Acquisition::Budgets; >+ >+use Modern::Perl; >+ >+use Carp; >+ >+use Koha::Database; >+ >+use base qw( Koha::Objects ); >+ >+sub _type { >+ return 'Aqbudget'; >+} >+ >+sub object_class { >+ return 'Koha::Acquisition::Budget'; >+} >+ >+1; >-- >2.1.4
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 14850
:
66555
|
66556
|
77522
|
85521
|
85522
|
85600
|
85601
|
85602