@@ -, +, @@ editing the active currency Bug 15084: Make sure the previous active currency is marked as inactive --- Koha/Acquisition/Currency.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/Koha/Acquisition/Currency.pm +++ a/Koha/Acquisition/Currency.pm @@ -42,7 +42,13 @@ sub store { my $result; $self->_result->result_source->schema->txn_do( sub { if ( $self->active ) { - my @currencies = Koha::Acquisition::Currencies->search; + # Remove the active flag from all other active currencies + my @currencies = Koha::Acquisition::Currencies->search( + { + currency => { '!=' => $self->currency }, + active => 1, + } + ); for my $currency ( @currencies ) { $currency->active(0); $currency->store; --