X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fdiscount.pm;h=6fc3391caec21acffc19e5af8a1bd4d0fd2bdd06;hb=b79a8cb932946c849328a3c117c35821d9d21e66;hp=4f42c5b72d3149265cb9f0f6067dd373d04712c4;hpb=b5c4237a34aef94976bc343c8d9e138664fc3984;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; }