summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2011-01-24 00:54:09 +0000
committerivan <ivan>2011-01-24 00:54:09 +0000
commitf023c57df143ab903178c33d626bfaf4c04f38cb (patch)
treea1b7b7c4ead35e4545d3ee357dae4f53dca042bb
parentb8aee5aec07186d681075de466ed204d2d0246b2 (diff)
torrus, RT#10574
-rw-r--r--FS/FS/part_pkg/torrus_Common.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/FS/FS/part_pkg/torrus_Common.pm b/FS/FS/part_pkg/torrus_Common.pm
index c8915ce4c..cbd9ee3fe 100644
--- a/FS/FS/part_pkg/torrus_Common.pm
+++ b/FS/FS/part_pkg/torrus_Common.pm
@@ -74,14 +74,15 @@ sub calc_usage {
$max -= $inc;
next if $max < 0;
- my $amount = sprintf('%.2f', $self->option($self->_torrus_rate) * $max );
+ my $rate = $self->option($self->_torrus_rate);
+ my $amount = sprintf('%.2f', $rate * $max );
$total += $amount;
#add usage details to invoice
my $l = $self->_torrus_label;
- my $d = "Last month's usage for $serviceid: $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$amount";
+ $d .= " @ $money_char$rate/$l: $money_char$amount";
push @$details, $d;