[freeside-commits] freeside/FS/FS Schema.pm, 1.317, 1.317.2.1 cust_bill.pm, 1.350, 1.350.2.1 cust_bill_pkg_detail.pm, 1.16, 1.16.2.1
Erik Levinson
levinse at wavetail.420.am
Tue Jul 26 16:46:12 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv15201/FS/FS
Modified Files:
Tag: FREESIDE_2_3_BRANCH
Schema.pm cust_bill.pm cust_bill_pkg_detail.pm
Log Message:
accountcode billing, RT12181
Index: cust_bill_pkg_detail.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill_pkg_detail.pm,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -u -w -d -r1.16 -r1.16.2.1
--- cust_bill_pkg_detail.pm 27 Apr 2011 05:22:21 -0000 1.16
+++ cust_bill_pkg_detail.pm 26 Jul 2011 23:46:09 -0000 1.16.2.1
@@ -57,6 +57,8 @@
=item accountcode - accountcode
+=item startdate - CDR startdate, if any
+
=item detail - detail description
=back
Index: Schema.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Schema.pm,v
retrieving revision 1.317
retrieving revision 1.317.2.1
diff -u -w -d -r1.317 -r1.317.2.1
--- Schema.pm 20 Jul 2011 18:34:19 -0000 1.317
+++ Schema.pm 26 Jul 2011 23:46:09 -0000 1.317.2.1
@@ -701,6 +701,7 @@
'duration', 'int', 'NULL', '', 0, '',
'phonenum', 'varchar', 'NULL', 15, '', '',
'accountcode', 'varchar', 'NULL', 20, '', '',
+ 'startdate', @date_type, '', '',
'regionname', 'varchar', 'NULL', $char_d, '', '',
'detail', 'varchar', '', 255, '', '',
],
Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.350
retrieving revision 1.350.2.1
diff -u -w -d -r1.350 -r1.350.2.1
--- cust_bill.pm 20 Jul 2011 18:34:19 -0000 1.350
+++ cust_bill.pm 26 Jul 2011 23:46:09 -0000 1.350.2.1
@@ -2351,7 +2351,6 @@
# (alignment in text invoice?) problems to change them all to '%.2f' ?
# yes: fixed width (dot matrix) text printing will be borked
sub print_generic {
-
my( $self, %params ) = @_;
my $today = $params{today} ? $params{today} : time;
warn "$me print_generic called on $self with suffix $params{template}\n"
@@ -4222,21 +4221,25 @@
quantity => '',
product_code => 'N/A',
section => $section,
- ext_description => [],
+ ext_description => [ $section->{'header'} ],
+ detail_temp => [],
};
$section->{'amount'} += $amount;
$accountcodes{$accountcode}{'amount'} += $amount;
$accountcodes{$accountcode}{calls}++;
$accountcodes{$accountcode}{duration} += $detail->duration;
- push @{$accountcodes{$accountcode}{ext_description}},
- $detail->formatted('format' => $format);
+ push @{$accountcodes{$accountcode}{detail_temp}}, $detail;
}
}
foreach my $l ( values %accountcodes ) {
$l->{amount} = sprintf( "%.2f", $l->{amount} );
- unshift @{$l->{ext_description}}, $section->{'header'};
+ my @sorted_detail = sort { $a->startdate <=> $b->startdate } @{$l->{detail_temp}};
+ foreach my $sorted_detail ( @sorted_detail ) {
+ push @{$l->{ext_description}}, $sorted_detail->formatted('format'=>$format);
+ }
+ delete $l->{detail_temp};
push @lines, $l;
}
More information about the freeside-commits
mailing list