X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_bill_ApplicationCommon.pm;h=803239d043f894cf5acc707ad4331ece69d0bef7;hb=6577fcc50b6a711f1988bb4c83924e90f4bc97d6;hp=467b581aba3eeadabb64fbd8018d73eef60c293e;hpb=553bae9c8217daa25c83681ba633e9c112e3d9b1;p=freeside.git diff --git a/FS/FS/cust_bill_ApplicationCommon.pm b/FS/FS/cust_bill_ApplicationCommon.pm index 467b581ab..803239d04 100644 --- a/FS/FS/cust_bill_ApplicationCommon.pm +++ b/FS/FS/cust_bill_ApplicationCommon.pm @@ -8,7 +8,7 @@ use FS::Record qw( qsearch qsearchs dbh ); @ISA = qw( FS::Record ); -$DEBUG = 1; +$DEBUG = 0; $me = '[FS::cust_bill_ApplicationCommon]'; =head1 NAME @@ -178,7 +178,15 @@ sub apply_to_lineitems { # - apply based on weights... my $weight_col = $self->_app_part_pkg_weight_column; - my @openweight = map { [ $_, ($_->cust_pkg->part_pkg->$weight_col()||0) ] } + my @openweight = map { + my $open = $_; + my $cust_pkg = $open->cust_pkg; + my $weight = + $cust_pkg + ? ( $cust_pkg->part_pkg->$weight_col() || 0 ) + : 0; #default or per-tax weight? + [ $open, $weight ] + } @open; my %saw = (); @@ -351,6 +359,18 @@ sub cust_bill { qsearchs( 'cust_bill', { 'invnum' => $self->invnum } ); } +=item applied_to_invoice + +Returns a string representing the invoice (see Lcust_bill->invnum_date_pretty; +} + =item lineitem_breakdown_table =cut