projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fdc5582
)
discounts, RT#6679
author
ivan
<ivan>
Sun, 31 Jan 2010 07:04:38 +0000
(07:04 +0000)
committer
ivan
<ivan>
Sun, 31 Jan 2010 07:04:38 +0000
(07:04 +0000)
FS/FS/discount.pm
patch
|
blob
|
history
diff --git
a/FS/FS/discount.pm
b/FS/FS/discount.pm
index
558d0f8
..
457c9d6
100644
(file)
--- a/
FS/FS/discount.pm
+++ b/
FS/FS/discount.pm
@@
-126,13
+126,17
@@
sub check {
$self->SUPER::check;
}
$self->SUPER::check;
}
+=item description_short
+
=item description
Returns a text description incorporating the amount, percent and months fields.
=item description
Returns a text description incorporating the amount, percent and months fields.
+description_short omits term information
+
=cut
=cut
-sub description {
+sub description
_short
{
my $self = shift;
my $conf = new FS::Conf;
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;
if $self->amount > 0;
$desc .= $self->percent. '% '
if $self->percent > 0;
- $desc .= 'for '. $self->months. ' months' if $self->months;
$desc;
}
$desc;
}
+sub description {
+ my $self = shift;
+ my $desc = $self->description_short;
+ $desc .= ' for '. $self->months. ' months' if $self->months;
+ $desc;
+}
+
=back
=head1 BUGS
=back
=head1 BUGS