if ( $cust_bill_pkg->setup != 0 && (!$type || $type eq 'S') ) {
+ warn "$me _items_cust_bill_pkg adding setup\n"
+ if $DEBUG > 1;
+
my $description = $desc;
$description .= ' Setup' if $cust_bill_pkg->recur != 0;
)
{
+ warn "$me _items_cust_bill_pkg adding recur/usage\n"
+ if $DEBUG > 1;
+
my $is_summary = $display->summary;
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 = ();
|| $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,
}
+ 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) {
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;
} 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;