From: ivan Date: Sat, 5 Feb 2011 04:58:50 +0000 (+0000) Subject: add more debug tracing to invoice generation, RT#11452 X-Git-Tag: freeside_2_3_0~646 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=ee7237176092487cd7e6919fcd5941dda5791239 add more debug tracing to invoice generation, RT#11452 --- 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;