[freeside-commits] freeside/FS/FS cust_bill.pm,1.308,1.309

Ivan,,, ivan at wavetail.420.am
Fri Feb 4 19:36:09 PST 2011


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv10860

Modified Files:
	cust_bill.pm 
Log Message:
add more debug tracing to invoice generation, RT#11452

Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.308
retrieving revision 1.309
diff -u -w -d -r1.308 -r1.309
--- cust_bill.pm	5 Feb 2011 02:38:37 -0000	1.308
+++ cust_bill.pm	5 Feb 2011 03:36:07 -0000	1.309
@@ -2739,7 +2739,7 @@
 
   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
@@ -2767,6 +2767,9 @@
                  );
     }
 
+    warn "$me   setting options\n"
+      if $DEBUG > 1;
+
     my $multilocation = scalar($cust_main->cust_location); #too expensive?
     my %options = ();
     $options{'section'} = $section if $multisection;
@@ -2780,7 +2783,14 @@
     $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 => [],
       };
@@ -4142,9 +4152,21 @@
 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 ) {
@@ -4164,6 +4186,10 @@
                  }
              keys %itemshash;
   }
+
+  warn "$me _items_pkg returning ". scalar(@items). " items\n"
+    if $DEBUG > 1;
+
   @items;
 }
 



More information about the freeside-commits mailing list