summaryrefslogtreecommitdiff
path: root/FS/FS/part_pkg
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2016-09-12 12:25:21 -0700
committerMark Wells <mark@freeside.biz>2016-09-12 12:25:32 -0700
commit17956978685bcc30c8532c94b89b4d481d337c4e (patch)
tree0fc35a4e164d401a147197b9a0a4dd64c78399ab /FS/FS/part_pkg
parent752e12c741bcb43a1b3eec64c213452adc56b843 (diff)
respect CDR price rounding in invoice details, #72451 and #72330
Diffstat (limited to 'FS/FS/part_pkg')
-rw-r--r--FS/FS/part_pkg/voip_cdr.pm3
-rw-r--r--FS/FS/part_pkg/voip_tiered.pm5
2 files changed, 6 insertions, 2 deletions
diff --git a/FS/FS/part_pkg/voip_cdr.pm b/FS/FS/part_pkg/voip_cdr.pm
index 7d9a7f5c9..50ae0af7c 100644
--- a/FS/FS/part_pkg/voip_cdr.pm
+++ b/FS/FS/part_pkg/voip_cdr.pm
@@ -423,7 +423,8 @@ sub calc_usage {
my $formatter = FS::detail_format->new($output_format,
buffer => $details,
- locale => $cust_pkg->cust_main->locale
+ locale => $cust_pkg->cust_main->locale,
+ rounding => ($self->option_cacheable('rounding') || 2),
);
my $use_duration = $self->option('use_duration');
diff --git a/FS/FS/part_pkg/voip_tiered.pm b/FS/FS/part_pkg/voip_tiered.pm
index 0ad0ff6bf..d8607a69e 100644
--- a/FS/FS/part_pkg/voip_tiered.pm
+++ b/FS/FS/part_pkg/voip_tiered.pm
@@ -196,7 +196,10 @@ sub calc_usage {
my $output_format = $self->option('output_format', 'Hush!') || 'default';
- my $formatter = FS::detail_format->new($output_format, buffer => $details);
+ my $formatter = FS::detail_format->new($output_format,
+ buffer => $details,
+ rounding => ($self->option_cacheable('rounding') || 2))
+ ;
my $charges = 0;