X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_bill_pkg.pm;h=2c79209c5d5aacace86b82cde857841e4032f19c;hp=37c4a273540d680726b075f160a681555b373b01;hb=c7bf005860b761a55ca075df987fb3b5ade8c242;hpb=6b4fe3354a905755f9e6f1810cf94bbc269ce81d diff --git a/FS/FS/cust_bill_pkg.pm b/FS/FS/cust_bill_pkg.pm index 37c4a2735..2c79209c5 100644 --- a/FS/FS/cust_bill_pkg.pm +++ b/FS/FS/cust_bill_pkg.pm @@ -413,7 +413,8 @@ sub previous_cust_bill_pkg { Returns an array of detail information for the invoice line item. -Currently available options are: I I +Currently available options are: I, I and +I. If I is set to html or latex then the array members are improved for tabular appearance in those environments if possible. @@ -421,6 +422,12 @@ for tabular appearance in those environments if possible. If I is set then the array members are processed by this function before being returned. +I overrides the normal HTML or LaTeX function for returning +formatted CDRs. It can be set to a subroutine which returns an empty list +to skip usage detail: + + 'format_function' => sub { () }, + =cut sub details { @@ -872,7 +879,7 @@ sub cust_bill_pkg_detail { my %hash = ( 'billpkgnum' => $self->billpkgnum ); $hash{classnum} = $classnum if $classnum; - qsearch ( 'cust_bill_pkg_detail', { %hash } ), + qsearch( 'cust_bill_pkg_detail', \%hash ), } @@ -883,8 +890,21 @@ Returns the list of associated cust_bill_pkg_discount objects. =cut sub cust_bill_pkg_discount { - my $self = shift; - qsearch ( 'cust_bill_pkg_discount', { 'billpkgnum' => $self->billpkgnum } ); + my $self = shift; + qsearch( 'cust_bill_pkg_discount', { 'billpkgnum' => $self->billpkgnum } ); +} + +=item recur_show_zero + +=cut + +sub recur_show_zero { + my $self = shift; + + $self->recur == 0 + && $self->pkgnum + && $self->cust_pkg->part_pkg->recur_show_zero; + } =back