X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fcurrency_exchange.html;fp=httemplate%2Fedit%2Fcurrency_exchange.html;h=573ace5eedc9c80377215d9f494c479f01c99d62;hp=0000000000000000000000000000000000000000;hb=e96a2a6fd3a8885b0fb035ecc55bdf50dbe5a4aa;hpb=0f21021fea8f99d28b4507c3cffa55cbdd6f110d diff --git a/httemplate/edit/currency_exchange.html b/httemplate/edit/currency_exchange.html new file mode 100755 index 000000000..573ace5ee --- /dev/null +++ b/httemplate/edit/currency_exchange.html @@ -0,0 +1,73 @@ +<& /elements/header.html, 'Exchange rates' &> + +
+ +<& /elements/table-grid.html &> +% my $bgcolor1 = '#eeeeee'; +% my $bgcolor2 = '#ffffff'; +% my $bgcolor = ''; + + + From + Rate + To + + +%foreach my $currency (@currencies) { +% +% if ( $bgcolor eq $bgcolor1 ) { +% $bgcolor = $bgcolor2; +% } else { +% $bgcolor = $bgcolor1; +% } +% +% my %hash = ( 'from_currency' => $currency, +% 'to_currency' => $to_currency, +% ); +% +% my $currency_exchange = qsearchs('currency_exchange', \%hash) +% || new FS::currency_exchange \%hash; +% +% $currency_exchange->rate('1.000000') if length($currency_exchange->rate) == 0; + + + + + <% $currency %>: <% code2currency($currency) %> + + + + " + VALUE = "<% $currency_exchange->rate %>" + SIZE = 14 + MAXLENGTH = 14 + > + + + + <% $to_currency %>: <% code2currency($to_currency) %> + + + +% } + + + +
+ +
+ +<& /elements/footer.html &> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +my $conf = new FS::Conf; + +my $to_currency = $conf->config('currency') || 'USD'; + +my @currencies = sort { $a cmp $b } $conf->config('currencies'); + +