diff options
author | ivan <ivan> | 2010-01-31 07:04:38 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-01-31 07:04:38 +0000 |
commit | 75125d51297402390c1bbb489cf39b74611b1009 (patch) | |
tree | 86e762133b3d678fda84dff1c89c331b307a309d /FS/FS/discount.pm | |
parent | fdc5582ecb8bb5fd5fec85ada2088308cdba86b5 (diff) |
discounts, RT#6679
Diffstat (limited to 'FS/FS/discount.pm')
-rw-r--r-- | FS/FS/discount.pm | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/FS/FS/discount.pm b/FS/FS/discount.pm index 558d0f8..457c9d6 100644 --- a/FS/FS/discount.pm +++ b/FS/FS/discount.pm @@ -126,13 +126,17 @@ sub check { $self->SUPER::check; } +=item description_short + =item description Returns a text description incorporating the amount, percent and months fields. +description_short omits term information + =cut -sub description { +sub description_short { my $self = shift; my $conf = new FS::Conf; @@ -143,11 +147,17 @@ sub description { if $self->amount > 0; $desc .= $self->percent. '% ' if $self->percent > 0; - $desc .= 'for '. $self->months. ' months' if $self->months; $desc; } +sub description { + my $self = shift; + my $desc = $self->description_short; + $desc .= ' for '. $self->months. ' months' if $self->months; + $desc; +} + =back =head1 BUGS |