[freeside-commits] freeside/FS/FS/detail_format sum_count.pm, 1.1, 1.2 sum_duration.pm, 1.1, 1.2 sum_duration_prefix.pm, 1.1, 1.2
Mark Wells
mark at wavetail.420.am
Wed Jan 4 13:11:03 PST 2012
Update of /home/cvs/cvsroot/freeside/FS/FS/detail_format
In directory wavetail.420.am:/tmp/cvs-serv23701/FS/FS/detail_format
Modified Files:
sum_count.pm sum_duration.pm sum_duration_prefix.pm
Log Message:
hide zero-charge summary lines, #15535
Index: sum_duration_prefix.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/detail_format/sum_duration_prefix.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- sum_duration_prefix.pm 3 Jan 2012 21:13:33 -0000 1.1
+++ sum_duration_prefix.pm 4 Jan 2012 21:11:01 -0000 1.2
@@ -62,11 +62,13 @@
my $total_duration = sum( map { $_->{'duration'} } @subtotals );
$prefix =~ s/(...)(...)/$1 - $2/;
+ next if $total_amount < 0.01;
+
$self->csv->combine(
$prefix,
map({
- ($_->{count} || ''),
- ($_->{duration} ? int($_->{duration}/60) . ' min' : '')
+ $_->{count},
+ (int($_->{duration}/60) . ' min'),
} @subtotals ),
$self->money_char . sprintf('%.02f',$total_amount),
);
Index: sum_duration.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/detail_format/sum_duration.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- sum_duration.pm 3 Jan 2012 21:13:33 -0000 1.1
+++ sum_duration.pm 4 Jan 2012 21:11:00 -0000 1.2
@@ -42,13 +42,14 @@
my $buffer = $self->{buffer};
foreach my $svcnum (keys %$svcnums) {
+ my $subtotal = $svcnums->{$svcnum};
+ next if $subtotal->{amount} < 0.01;
+
my $cust_svc = qsearchs('cust_svc', { svcnum => $svcnum })
or die "svcnum #$svcnum not found";
my $phonenum = $cust_svc->svc_x->label;
warn "processing $phonenum\n" if $DEBUG;
- my $subtotal = $svcnums->{$svcnum};
-
$self->csv->combine(
$phonenum,
$subtotal->{count},
Index: sum_count.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/detail_format/sum_count.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- sum_count.pm 3 Jan 2012 21:13:33 -0000 1.1
+++ sum_count.pm 4 Jan 2012 21:11:00 -0000 1.2
@@ -41,13 +41,14 @@
my $buffer = $self->{buffer};
foreach my $svcnum (keys %$svcnums) {
+ my $subtotal = $svcnums->{$svcnum};
+ next if $subtotal->{amount} < 0.01;
+
my $cust_svc = qsearchs('cust_svc', { svcnum => $svcnum })
or die "svcnum #$svcnum not found";
my $phonenum = $cust_svc->svc_x->label;
warn "processing $phonenum\n" if $DEBUG;
- my $subtotal = $svcnums->{$svcnum};
-
$self->csv->combine(
$phonenum,
$subtotal->{count},
More information about the freeside-commits
mailing list