summaryrefslogtreecommitdiff
path: root/FS/FS/discount.pm
diff options
context:
space:
mode:
authorlevinse <levinse>2011-04-29 12:12:45 +0000
committerlevinse <levinse>2011-04-29 12:12:45 +0000
commite774555a6ae69da65e7774c701232fdf9dd052b1 (patch)
tree3807379817a297a53b27b1f6d8c8c7ec758f6713 /FS/FS/discount.pm
parent91fd4ea0e91ee9e6717e0b12e01eebb8f8b21322 (diff)
apply discount to setup fees, part 1 of 2, RT11512
Diffstat (limited to 'FS/FS/discount.pm')
-rw-r--r--FS/FS/discount.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/FS/FS/discount.pm b/FS/FS/discount.pm
index 4f42c5b..6fc3391 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;
}