+ $self->base_setup($cust_pkg, $sdate, $details, $param);
+}
+
+use FS::Conf;
+sub calc_currency_option {
+ my($self, $optionname, $cust_or_quotation_pkg, $sdate, $details, $param) = @_;
+
+ my($currency, $amount) =
+ $cust_or_quotation_pkg->part_pkg_currency_option($optionname);
+ return sprintf('%.2f', $amount ) unless $currency;
+
+ $param->{'billed_currency'} = $currency;
+ $param->{'billed_amount'} = $amount;
+
+ my $currency_exchange = qsearchs('currency_exchange', {
+ 'from_currency' => $currency,
+ 'to_currency' => ( FS::Conf->new->config('currency') || 'USD' ),
+ }) or die "No exchange rate from $currency\n";
+
+ #XXX do we want the rounding here to work differently?
+ #my $recognized_amount =
+ sprintf('%.2f', $amount * $currency_exchange->rate);