use SL::DB::Contact;
use SL::DB::FollowUp;
use SL::DB::History;
+use SL::DB::Currency;
# safety
__PACKAGE__->run_before(
)
];
- $query =
- 'SELECT curr
- FROM defaults';
- my $curr = selectall_hashref_query($::form, $dbh, $query)->[0]->{curr};
- my @currencies = grep(
- { $_; }
- map(
- { s/\s//g; $_; }
- split(m/:/, $curr)
- )
- );
- $self->{all_currencies} = \@currencies;
+ $self->{all_currencies} = SL::DB::Manager::Currency->get_all();
$self->{all_languages} = SL::DB::Manager::Language->get_all();
<th align="right">[% 'Currency' | $T8 %]</th>
<td>
- [% L.select_tag('cv.curr', SELF.all_currencies, default = SELF.cv.curr, with_empty = 1) %]
+ [% L.select_tag('cv.currency_id', SELF.all_currencies, title_key = 'name', value_key = 'id', default = SELF.cv.currency_id, with_empty = 1) %]
</td>
[% END %]
</tr>