[freeside-commits] freeside/FS/FS cust_bill.pm, 1.299.2.11, 1.299.2.12

Ivan,,, ivan at wavetail.420.am
Fri Feb 4 20:41:10 PST 2011


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

Modified Files:
      Tag: FREESIDE_2_1_BRANCH
	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.299.2.11
retrieving revision 1.299.2.12
diff -u -w -d -r1.299.2.11 -r1.299.2.12
--- cust_bill.pm	5 Feb 2011 04:05:10 -0000	1.299.2.11
+++ cust_bill.pm	5 Feb 2011 04:41:08 -0000	1.299.2.12
@@ -4179,7 +4179,7 @@
 
 sub _items_cust_bill_pkg {
   my $self = shift;
-  my $cust_bill_pkg = shift;
+  my $cust_bill_pkgs = shift;
   my %opt = @_;
 
   my $format = $opt{format} || '';
@@ -4194,9 +4194,12 @@
 
   my @b = ();
   my ($s, $r, $u) = ( undef, undef, undef );
-  foreach my $cust_bill_pkg ( @$cust_bill_pkg )
+  foreach my $cust_bill_pkg ( @$cust_bill_pkgs )
   {
 
+    warn "$me _items_cust_bill_pkg considering cust_bill_pkg $cust_bill_pkg\n"
+      if $DEBUG > 1;
+
     $discount_show_always = ($cust_bill_pkg->cust_bill_pkg_discount
         			&& $conf->exists('discount-show-always'));
 
@@ -4221,6 +4224,9 @@
                         )
     {
 
+      warn "$me _items_cust_bill_pkg considering display item $display\n"
+        if $DEBUG > 1;
+
       my $type = $display->type;
 
       my $desc = $cust_bill_pkg->desc;
@@ -4234,6 +4240,9 @@
 
       if ( $cust_bill_pkg->pkgnum > 0 ) {
 
+        warn "$me _items_cust_bill_pkg cust_bill_pkg is non-tax\n"
+          if $DEBUG > 1;
+ 
         my $cust_pkg = $cust_bill_pkg->cust_pkg;
 
         if ( $cust_bill_pkg->setup != 0 && (!$type || $type eq 'S') ) {
@@ -4379,6 +4388,9 @@
 
       } else { #pkgnum tax or one-shot line item (??)
 
+        warn "$me _items_cust_bill_pkg cust_bill_pkg is tax\n"
+          if $DEBUG > 1;
+
         if ( $cust_bill_pkg->setup != 0 ) {
           push @b, {
             'description' => $desc,
@@ -4400,6 +4412,9 @@
 
   }
 
+  warn "$me _items_cust_bill_pkg done considering cust_bill_pkgs\n"
+    if $DEBUG > 1;
+
   foreach ( $s, $r, ($opt{skip_usage} ? () : $u ) ) {
     if ( $_  ) {
       $_->{amount}      = sprintf( "%.2f", $_->{amount} ),



More information about the freeside-commits mailing list