diff options
author | ivan <ivan> | 2011-02-05 04:58:50 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-02-05 04:58:50 +0000 |
commit | ee7237176092487cd7e6919fcd5941dda5791239 (patch) | |
tree | 29480c6691096abc5526df3696c5a7671b56c2dd | |
parent | e65d6d5ac9f5183b511990dcfc45063aac002293 (diff) |
add more debug tracing to invoice generation, RT#11452
-rw-r--r-- | FS/FS/cust_bill.pm | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 856b0e203..24b0117ef 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -4336,10 +4336,10 @@ sub _items_cust_bill_pkg { 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). ")"; - } + $description .= " (" . time2str($date_format, $cust_bill_pkg->sdate). + " - ". time2str($date_format, $cust_bill_pkg->edate). + ")" + unless $conf->exists('disable_line_item_date_ranges'); my @d = (); @@ -4356,6 +4356,9 @@ sub _items_cust_bill_pkg { || $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,8 +4374,14 @@ sub _items_cust_bill_pkg { } + 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) { @@ -4385,6 +4394,9 @@ sub _items_cust_bill_pkg { 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 @@ sub _items_cust_bill_pkg { } 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; |