From: Thomas Heck Date: Wed, 26 Jun 2013 11:51:15 +0000 (+0200) Subject: Auf CustomerVendor auf currency_id umgestellt X-Git-Tag: release-3.1.0beta1~161^2^2~26 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=9e228847e12d3094685049e3c8c69fd173853f7b;p=kivitendo-erp.git Auf CustomerVendor auf currency_id umgestellt --- diff --git a/SL/Controller/CustomerVendor.pm b/SL/Controller/CustomerVendor.pm index 9becb61da..8d2f96a39 100644 --- a/SL/Controller/CustomerVendor.pm +++ b/SL/Controller/CustomerVendor.pm @@ -19,6 +19,7 @@ use SL::DB::Pricegroup; use SL::DB::Contact; use SL::DB::FollowUp; use SL::DB::History; +use SL::DB::Currency; # safety __PACKAGE__->run_before( @@ -727,18 +728,7 @@ sub _pre_render { ) ]; - $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(); diff --git a/templates/webpages/customer_vendor/form.html b/templates/webpages/customer_vendor/form.html index bb84e9bb1..dd12e75ea 100644 --- a/templates/webpages/customer_vendor/form.html +++ b/templates/webpages/customer_vendor/form.html @@ -293,7 +293,7 @@ [% 'Currency' | $T8 %] - [% 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) %] [% END %]