View | Details | Raw Unified | Return to bug 14850
Collapse All | Expand All

(-)a/Koha/Acquisition/Budget.pm (+24 lines)
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;
(-)a/Koha/Acquisition/BudgetPeriod.pm (+12 lines)
Line 0 Link Here
1
package Koha::Acquisition::BudgetPeriod;
2
3
use Modern::Perl;
4
5
use Koha::Database;
6
use base qw( Koha::Object );
7
8
sub _type {
9
    return 'Aqbudgetperiod';
10
}
11
12
1;
(-)a/Koha/Acquisition/BudgetPeriods.pm (+19 lines)
Line 0 Link Here
1
package Koha::Acquisition::BudgetPeriods;
2
3
use Modern::Perl;
4
5
use Carp;
6
7
use Koha::Database;
8
9
use base qw( Koha::Objects );
10
11
sub _type {
12
    return 'Aqbudgetperiod';
13
}
14
15
sub object_class {
16
    return 'Koha::Acquisition::BudgetPeriod';
17
}
18
19
1;
(-)a/Koha/Acquisition/Budgets.pm (-1 / +19 lines)
Line 0 Link Here
0
- 
1
package Koha::Acquisition::Budgets;
2
3
use Modern::Perl;
4
5
use Carp;
6
7
use Koha::Database;
8
9
use base qw( Koha::Objects );
10
11
sub _type {
12
    return 'Aqbudget';
13
}
14
15
sub object_class {
16
    return 'Koha::Acquisition::Budget';
17
}
18
19
1;

Return to bug 14850