X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Ftorrus_Common.pm;h=d0dc9d14dac0fe95ec5fb54af3f14f31946bd506;hb=b8baeb2b7fb88b2b17740bedb379ec41d04de358;hp=cbd9ee3fe10ba3bb67c7d47490df7a818e6b6933;hpb=f023c57df143ab903178c33d626bfaf4c04f38cb;p=freeside.git diff --git a/FS/FS/part_pkg/torrus_Common.pm b/FS/FS/part_pkg/torrus_Common.pm index cbd9ee3fe..d0dc9d14d 100644 --- a/FS/FS/part_pkg/torrus_Common.pm +++ b/FS/FS/part_pkg/torrus_Common.pm @@ -7,6 +7,15 @@ our %info = ( 'disabled' => 1 ); #torrus_Common not a usable price plan directly our $DEBUG = 1; +sub recur_temporality { 'preceding'; } + +sub price_info { + my $self = shift; + my $str = $self->SUPER::price_info; + $str .= " plus usage" if $str; + $str; +} + sub calc_recur { my $self = shift; my($cust_pkg, $sdate, $details, $param ) = @_; @@ -80,7 +89,7 @@ sub calc_usage { #add usage details to invoice my $l = $self->_torrus_label; - my $d = "Last month's usage for $serviceid: ". sprintf('%2f',$max). $l; + my $d = "Last month's usage for $serviceid: ". sprintf('%.2f',$max). $l; $d .= " (". ($max+$inc). "$l - $inc$l included)" if $inc; $d .= " @ $money_char$rate/$l: $money_char$amount";