Lines 134-139
__PACKAGE__->add_columns(
Link Here
|
134 |
'+archived' => { is_boolean => 1 } |
134 |
'+archived' => { is_boolean => 1 } |
135 |
); |
135 |
); |
136 |
|
136 |
|
|
|
137 |
__PACKAGE__->has_many( |
138 |
"additional_field_values", |
139 |
"Koha::Schema::Result::AdditionalFieldValue", |
140 |
sub { |
141 |
my ($args) = @_; |
142 |
|
143 |
return { |
144 |
"$args->{foreign_alias}.record_id" => { -ident => "$args->{self_alias}.code" }, |
145 |
|
146 |
"$args->{foreign_alias}.field_id" => |
147 |
{ -in => \'(SELECT id FROM additional_fields WHERE tablename="account_credit_types")' }, |
148 |
}; |
149 |
}, |
150 |
{ cascade_copy => 0, cascade_delete => 0 }, |
151 |
); |
152 |
|
137 |
sub koha_objects_class { |
153 |
sub koha_objects_class { |
138 |
'Koha::Account::CreditTypes'; |
154 |
'Koha::Account::CreditTypes'; |
139 |
} |
155 |
} |
140 |
- |
|
|