projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
aa4bb6d
)
add more debug tracing to invoice generation, RT#11452
author
ivan
<ivan>
Sat, 5 Feb 2011 05:45:41 +0000
(
05:45
+0000)
committer
ivan
<ivan>
Sat, 5 Feb 2011 05:45:41 +0000
(
05:45
+0000)
FS/FS/cust_pkg.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_pkg.pm
b/FS/FS/cust_pkg.pm
index
c35da28
..
7b0363e
100644
(file)
--- a/
FS/FS/cust_pkg.pm
+++ b/
FS/FS/cust_pkg.pm
@@
-1767,7
+1767,7
@@
I<pkg_svc.hidden> flag will be omitted.
sub h_cust_svc {
my $self = shift;
warn "$me _h_cust_svc called on $self\n"
sub h_cust_svc {
my $self = shift;
warn "$me _h_cust_svc called on $self\n"
- if $DEBUG
> 1
;
+ if $DEBUG;
my ($end, $start, $mode) = @_;
my @cust_svc = $self->_sort_cust_svc(
my ($end, $start, $mode) = @_;
my @cust_svc = $self->_sort_cust_svc(
@@
-2122,7
+2122,7
@@
Returns a list of lists, calling the label method for all (historical) services
sub h_labels {
my $self = shift;
warn "$me _h_labels called on $self\n"
sub h_labels {
my $self = shift;
warn "$me _h_labels called on $self\n"
- if $DEBUG
> 1
;
+ if $DEBUG;
map { [ $_->label(@_) ] } $self->h_cust_svc(@_);
}
map { [ $_->label(@_) ] } $self->h_cust_svc(@_);
}
@@
-2156,13
+2156,13
@@
sub _labels_short {
my( $self, $method ) = ( shift, shift );
warn "$me _labels_short called on $self with $method method\n"
my( $self, $method ) = ( shift, shift );
warn "$me _labels_short called on $self with $method method\n"
- if $DEBUG
> 1
;
+ if $DEBUG;
my $conf = new FS::Conf;
my $max_same_services = $conf->config('cust_bill-max_same_services') || 5;
warn "$me _labels_short populating \%labels\n"
my $conf = new FS::Conf;
my $max_same_services = $conf->config('cust_bill-max_same_services') || 5;
warn "$me _labels_short populating \%labels\n"
- if $DEBUG
> 1
;
+ if $DEBUG;
my %labels;
#tie %labels, 'Tie::IxHash';
my %labels;
#tie %labels, 'Tie::IxHash';
@@
-2170,17
+2170,24
@@
sub _labels_short {
foreach $self->$method(@_);
warn "$me _labels_short populating \@labels\n"
foreach $self->$method(@_);
warn "$me _labels_short populating \@labels\n"
- if $DEBUG
> 1
;
+ if $DEBUG;
my @labels;
foreach my $label ( keys %labels ) {
my %seen = ();
my @values = grep { ! $seen{$_}++ } @{ $labels{$label} };
my $num = scalar(@values);
my @labels;
foreach my $label ( keys %labels ) {
my %seen = ();
my @values = grep { ! $seen{$_}++ } @{ $labels{$label} };
my $num = scalar(@values);
+ warn "$me _labels_short $num items for $label\n"
+ if $DEBUG;
+
if ( $num > $max_same_services ) {
if ( $num > $max_same_services ) {
+ warn "$me _labels_short more than $max_same_services, so summarizing\n"
+ if $DEBUG;
push @labels, "$label ($num)";
} else {
if ( $conf->exists('cust_bill-consolidate_services') ) {
push @labels, "$label ($num)";
} else {
if ( $conf->exists('cust_bill-consolidate_services') ) {
+ warn "$me _labels_short consolidating services\n"
+ if $DEBUG;
# push @labels, "$label: ". join(', ', @values);
while ( @values ) {
my $detail = "$label: ";
# push @labels, "$label: ". join(', ', @values);
while ( @values ) {
my $detail = "$label: ";
@@
-2190,6
+2197,8
@@
sub _labels_short {
push @labels, $detail;
}
} else {
push @labels, $detail;
}
} else {
+ warn "$me _labels_short adding service data\n"
+ if $DEBUG;
push @labels, map { "$label: $_" } @values;
}
}
push @labels, map { "$label: $_" } @values;
}
}