From 3115a1d9400ebf270ad6604b2dce92cc355d0cb8 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 5 Feb 2011 03:36:12 +0000 Subject: [PATCH] add more debug tracing to invoice generation, RT#11452 --- FS/FS/cust_bill.pm | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index a4866707e..110419f4d 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -2708,7 +2708,7 @@ sub print_generic { foreach my $section (@sections, @$late_sections) { - warn "$me adding $section section\n" + warn "$me adding section \n". Dumper($section) if $DEBUG > 1; # begin some normalization @@ -2736,6 +2736,9 @@ sub print_generic { ); } + warn "$me setting options\n" + if $DEBUG > 1; + my $multilocation = scalar($cust_main->cust_location); #too expensive? my %options = (); $options{'section'} = $section if $multisection; @@ -2749,7 +2752,14 @@ sub print_generic { $options{'multilocation'} = $multilocation; $options{'multisection'} = $multisection; + warn "$me searching for line items\n" + if $DEBUG > 1; + foreach my $line_item ( $self->_items_pkg(%options) ) { + + warn "$me adding line item $line_item\n" + if $DEBUG > 1; + my $detail = { ext_description => [], }; @@ -4111,9 +4121,21 @@ sub _items_previous { sub _items_pkg { my $self = shift; my %options = @_; + + warn "$me _items_pkg searching for all package line items\n" + if $DEBUG > 1; + my @cust_bill_pkg = grep { $_->pkgnum } $self->cust_bill_pkg; + + warn "$me _items_pkg filtering line items\n" + if $DEBUG > 1; my @items = $self->_items_cust_bill_pkg(\@cust_bill_pkg, @_); + if ($options{section} && $options{section}->{condensed}) { + + warn "$me _items_pkg condensing section\n" + if $DEBUG > 1; + my %itemshash = (); local $Storable::canonical = 1; foreach ( @items ) { @@ -4133,6 +4155,10 @@ sub _items_pkg { } keys %itemshash; } + + warn "$me _items_pkg returning ". scalar(@items). " items\n" + if $DEBUG > 1; + @items; } -- 2.11.0