[freeside-commits] freeside/FS/FS cust_bill.pm, 1.299.2.13, 1.299.2.14

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


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

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.13
retrieving revision 1.299.2.14
diff -u -w -d -r1.299.2.13 -r1.299.2.14
--- cust_bill.pm	5 Feb 2011 04:49:41 -0000	1.299.2.13
+++ cust_bill.pm	5 Feb 2011 04:58:52 -0000	1.299.2.14
@@ -4305,10 +4305,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 = ();
 
@@ -4325,6 +4325,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,
@@ -4340,9 +4343,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;
@@ -4354,6 +4363,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;
@@ -4372,6 +4384,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