X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fdiscount.pm;h=6fc3391caec21acffc19e5af8a1bd4d0fd2bdd06;hb=80511cb4158b98db01deec317e5408675487bc6e;hp=4f42c5b72d3149265cb9f0f6067dd373d04712c4;hpb=5250c44bd7f282c7d782bf0e8349af12376929df;p=freeside.git diff --git a/FS/FS/discount.pm b/FS/FS/discount.pm index 4f42c5b72..6fc3391ca 100644 --- a/FS/FS/discount.pm +++ b/FS/FS/discount.pm @@ -54,6 +54,11 @@ months disabled +=item setup - apply discount to setup fee (not just to recurring fee) + +If the discount is based on a percentage, then the % will be applied to the +setup and recurring portions. + =back =head1 METHODS @@ -130,6 +135,7 @@ sub check { || $self->ut_float('percent') #actually decimal, but this will do || $self->ut_floatn('months') #actually decimal, but this will do || $self->ut_enum('disabled', [ '', 'Y' ]) + || $self->ut_enum('setup', [ '', 'Y' ]) ; return $error if $error; @@ -176,6 +182,7 @@ sub description { my $self = shift; my $desc = $self->description_short; $desc .= ' for '. $self->months. ' months' if $self->months; + $desc .= ', applies to setup' if $self->setup; $desc; }