[freeside-commits] freeside/FS/FS cust_bill.pm,1.314,1.315

Ivan,,, ivan at wavetail.420.am
Fri Feb 4 20:58:52 PST 2011


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

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.314
retrieving revision 1.315
diff -u -w -d -r1.314 -r1.315
--- cust_bill.pm	5 Feb 2011 04:49:36 -0000	1.314
+++ cust_bill.pm	5 Feb 2011 04:58:50 -0000	1.315
@@ -4336,10 +4336,10 @@
           my $description = ($is_summary && $type && $type eq 'U')
                             ? "Usage charges" : $desc;
 
-          unless ( $conf->exists('disable_line_item_date_ranges') ) {
             $description .= " (" . time2str($date_format, $cust_bill_pkg->sdate).
-                            " - ". time2str($date_format, $cust_bill_pkg->edate). ")";
-          }
+                          " - ". time2str($date_format, $cust_bill_pkg->edate).
+                          ")"
+            unless $conf->exists('disable_line_item_date_ranges');
 
           my @d = ();
 
@@ -4356,6 +4356,9 @@
                 || $is_summary && $type && $type eq 'U' )
           {
 
+            warn "$me _items_cust_bill_pkg adding service details\n"
+              if $DEBUG > 1;
+
             push @d, map &{$escape_function}($_),
                          $cust_pkg->h_labels_short(@dates, 'I')
                                                    #$cust_bill_pkg->edate,
@@ -4371,9 +4374,15 @@
 
           }
 
+          warn "$me _items_cust_bill_pkg adding details\n"
+            if $DEBUG > 1;
+
           push @d, $cust_bill_pkg->details(%details_opt)
             unless ($is_summary || $type && $type eq 'R');
   
+          warn "$me _items_cust_bill_pkg calculating amount\n"
+            if $DEBUG > 1;
+  
           my $amount = 0;
           if (!$type) {
             $amount = $cust_bill_pkg->recur;
@@ -4385,6 +4394,9 @@
   
           if ( !$type || $type eq 'R' ) {
 
+            warn "$me _items_cust_bill_pkg adding recur\n"
+              if $DEBUG > 1;
+
             if ( $cust_bill_pkg->hidden ) {
               $r->{amount}      += $amount;
               $r->{unit_amount} += $cust_bill_pkg->unitrecur;
@@ -4403,6 +4415,9 @@
 
           } else {  # $type eq 'U'
 
+            warn "$me _items_cust_bill_pkg adding usage\n"
+              if $DEBUG > 1;
+
             if ( $cust_bill_pkg->hidden ) {
               $u->{amount}      += $amount;
               $u->{unit_amount} += $cust_bill_pkg->unitrecur;



More information about the freeside-commits mailing list