X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fcurrency_fixed.pm;h=41d7a657ed730a6f36fcb4a1620055bc65044a37;hp=c64fb787254613a686223deb42fb4e9ed69314ea;hb=0692ff47a2eac65616bf24104a51e558506f1b8f;hpb=3d0a1bb06b895c5be6e3f0517d355442a6b1e125 diff --git a/FS/FS/part_pkg/currency_fixed.pm b/FS/FS/part_pkg/currency_fixed.pm index c64fb7872..41d7a657e 100644 --- a/FS/FS/part_pkg/currency_fixed.pm +++ b/FS/FS/part_pkg/currency_fixed.pm @@ -33,7 +33,7 @@ use FS::currency_exchange; sub price_info { my $self = shift; - my $str = $self->SUPER::price_info; + my $str = $self->SUPER::price_info(@_); $str .= " (or local currency pricing)" if $str; $str; } @@ -54,9 +54,10 @@ sub calc_setup { use FS::Conf; sub calc_currency_option { - my($self, $optionname, $cust_pkg, $sdate, $details, $param) = @_; + my($self, $optionname, $cust_or_quotation_pkg, $sdate, $details, $param) = @_; - my($currency, $amount) = $cust_pkg->part_pkg_currency_option($optionname); + my($currency, $amount) = + $cust_or_quotation_pkg->part_pkg_currency_option($optionname); return sprintf('%.2f', $amount ) unless $currency; $param->{'billed_currency'} = $currency; @@ -73,9 +74,10 @@ sub calc_currency_option { } sub base_recur { - my( $self, $cust_pkg, $sdate, $details, $param ) = @_; - $param ||= {}; - $self->calc_currency_option('recur_fee', $cust_pkg, $sdate, $details, $param); + my( $self, $cust_or_quotation_pkg, $sdate, $details, $param ) = @_; + $self->calc_currency_option( + 'recur_fee', $cust_or_quotation_pkg, $sdate, $details, $param || {} + ); } sub can_discount { 0; } #can't discount yet (percentage would work, but amount?) @@ -93,4 +95,6 @@ sub is_free { 0; } sub can_currency_exchange { 1; } +sub can_usageprice { 0; } + 1;