Line 0
Link Here
|
|
|
1 |
package Koha::Acquisition::Budget; |
2 |
|
3 |
use Modern::Perl; |
4 |
|
5 |
use Koha::Acquisition::BudgetPeriods; |
6 |
use Koha::Acquisition::BudgetPeriod; |
7 |
use Koha::Database; |
8 |
use base qw( Koha::Object ); |
9 |
|
10 |
sub active { |
11 |
my ($self) = @_; |
12 |
|
13 |
my $b_period = Koha::Acquisition::BudgetPeriods->find({ budget_period_id => $self->budget_period_id }); |
14 |
return unless $b_period; |
15 |
my $active = $b_period->budget_period_active; |
16 |
return $active; |
17 |
|
18 |
} |
19 |
|
20 |
sub _type { |
21 |
return 'Aqbudget'; |
22 |
} |
23 |
|
24 |
1; |