Lines 42-48
sub store {
Link Here
|
42 |
my $result; |
42 |
my $result; |
43 |
$self->_result->result_source->schema->txn_do( sub { |
43 |
$self->_result->result_source->schema->txn_do( sub { |
44 |
if ( $self->active ) { |
44 |
if ( $self->active ) { |
45 |
my @currencies = Koha::Acquisition::Currencies->search; |
45 |
# Remove the active flag from all other active currencies |
|
|
46 |
my @currencies = Koha::Acquisition::Currencies->search( |
47 |
{ |
48 |
currency => { '!=' => $self->currency }, |
49 |
active => 1, |
50 |
} |
51 |
); |
46 |
for my $currency ( @currencies ) { |
52 |
for my $currency ( @currencies ) { |
47 |
$currency->active(0); |
53 |
$currency->active(0); |
48 |
$currency->store; |
54 |
$currency->store; |
49 |
- |
|
|