[freeside-commits] freeside/FS/FS cust_bill_pkg.pm, 1.56.2.2, 1.56.2.3
Ivan,,,
ivan at wavetail.420.am
Wed Aug 3 15:13:09 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv23323
Modified Files:
Tag: FREESIDE_2_3_BRANCH
cust_bill_pkg.pm
Log Message:
fix displaying usage separate from recurring when using separate_usage and invoice_sections but without a usage_section set, RT#13907
Index: cust_bill_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill_pkg.pm,v
retrieving revision 1.56.2.2
retrieving revision 1.56.2.3
diff -u -w -d -r1.56.2.2 -r1.56.2.3
--- cust_bill_pkg.pm 3 Aug 2011 05:07:23 -0000 1.56.2.2
+++ cust_bill_pkg.pm 3 Aug 2011 22:13:07 -0000 1.56.2.3
@@ -682,16 +682,16 @@
|| $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!')
+ 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!')
@@ -708,18 +708,18 @@
};
}
- 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 };
}
More information about the freeside-commits
mailing list