diff options
| author | mark <mark> | 2011-12-10 01:29:46 +0000 | 
|---|---|---|
| committer | mark <mark> | 2011-12-10 01:29:46 +0000 | 
| commit | 17f4c40fa07f86b7c482bc9915e617fe294377d4 (patch) | |
| tree | 94fe5a1ecf5e50ffc25e47ab1cc94ba1e6f02079 /FS | |
| parent | ecb7665dc7dadd32cdfa5a1b98be57f0850c234d (diff) | |
missing file from #15068
Diffstat (limited to 'FS')
| -rw-r--r-- | FS/FS/discount_plan.pm | 17 | 
1 files changed, 16 insertions, 1 deletions
| diff --git a/FS/FS/discount_plan.pm b/FS/FS/discount_plan.pm index 081f24045..4f97e3351 100644 --- a/FS/FS/discount_plan.pm +++ b/FS/FS/discount_plan.pm @@ -47,10 +47,12 @@ sub new {    my ($previous_balance) = $cust_bill->previous;    my $self = { +    cust_bill     => $cust_bill, +    months        => $months,      pkgnums       => [],      base          => $previous_balance || 0, # sum of charges before discount      discounted    => $previous_balance || 0, # sum of charges after discount -    list_pkgnums  => 0, # whether any packages are not discounted +    list_pkgnums  => undef, # whether any packages are not discounted    };    foreach my $cust_bill_pkg ( $cust_bill->cust_bill_pkg ) { @@ -182,6 +184,19 @@ sub pkgnums {    @{ $self->{pkgnums} };  } +=item list_pkgnums + +Returns a true value if any packages listed on the invoice do not  +receive a discount, either because there isn't one at the specified +term length or because they're not monthly recurring packages. + +=cut + +sub list_pkgnums { +  my $self = shift; +  $self->{list_pkgnums}; +} +  # any others?  don't think so  1; | 
