diff options
| author | ivan <ivan> | 2011-08-03 22:13:07 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2011-08-03 22:13:07 +0000 | 
| commit | a6015842c134b8b1c65dba12a0da7e3794efaee3 (patch) | |
| tree | 8dea7264d9c6463e05db6ad0d244f06312e81e69 /FS | |
| parent | 6fd2fa88c4376e5382cb8bc55248f35b08f4f9e6 (diff) | |
fix displaying usage separate from recurring when using separate_usage and invoice_sections but without a usage_section set, RT#13907
Diffstat (limited to 'FS')
| -rw-r--r-- | FS/FS/cust_bill_pkg.pm | 16 | 
1 files changed, 8 insertions, 8 deletions
diff --git a/FS/FS/cust_bill_pkg.pm b/FS/FS/cust_bill_pkg.pm index 59eb4dded..c9b0a4dc1 100644 --- a/FS/FS/cust_bill_pkg.pm +++ b/FS/FS/cust_bill_pkg.pm @@ -682,17 +682,17 @@ sub set_display {                      || $cust_pkg->part_pkg->option('usage_mandate', 'Hush!');    # or use the category from $opt{'part_pkg'} if its not bundled? -  my $section = $cust_pkg->part_pkg->categoryname; +  my $categoryname = $cust_pkg->part_pkg->categoryname;    return $self->set('display', []) -    unless $separate || $section || $usage_mandate; +    unless $separate || $categoryname || $usage_mandate;    my @display = (); -  my %hash = ( 'section' => $section ); +  my %hash = ( 'section' => $categoryname ); -  $section =            $part_pkg->option('usage_section', 'Hush!') -           || $cust_pkg->part_pkg->option('usage_section', 'Hush!'); +  my $usage_section =            $part_pkg->option('usage_section', 'Hush!') +                    || $cust_pkg->part_pkg->option('usage_section', 'Hush!');    my $summary =            $part_pkg->option('summarize_usage', 'Hush!')                || $cust_pkg->part_pkg->option('summarize_usage', 'Hush!'); @@ -708,18 +708,18 @@ sub set_display {                       };    } -  if ($separate && $section && $summary) { +  if ($separate && $usage_section && $summary) {      push @display, new FS::cust_bill_pkg_display { type    => 'U',                                                     summary => 'Y',                                                     %hash,                                                   };    } -  if ($usage_mandate || $section && $summary) { +  if ($usage_mandate || ($usage_section && $summary) ) {      $hash{post_total} = 'Y';    }    if ($separate || $usage_mandate) { -    $hash{section} = $section if ($separate || $usage_mandate); +    $hash{section} = $usage_section if $usage_section;      push @display, new FS::cust_bill_pkg_display { type => 'U', %hash };    }  | 
