summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2011-02-05 03:36:12 +0000
committerivan <ivan>2011-02-05 03:36:12 +0000
commit3115a1d9400ebf270ad6604b2dce92cc355d0cb8 (patch)
tree829159a6e7006abefd0988237dbd31f3407bea37
parent86920681153d97ef2702b8ce8c42f1b5db79d8d3 (diff)
add more debug tracing to invoice generation, RT#11452
-rw-r--r--FS/FS/cust_bill.pm28
1 files changed, 27 insertions, 1 deletions
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;
}