From: ivan Date: Sun, 31 Jan 2010 07:04:38 +0000 (+0000) Subject: discounts, RT#6679 X-Git-Tag: root_of_svc_elec_features~493 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=75125d51297402390c1bbb489cf39b74611b1009 discounts, RT#6679 --- diff --git a/FS/FS/discount.pm b/FS/FS/discount.pm index 558d0f881..457c9d681 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