[freeside-commits] freeside/FS/FS discount.pm,1.1,1.2
Ivan,,,
ivan at wavetail.420.am
Sat Jan 30 23:04:40 PST 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv12911/FS/FS
Modified Files:
discount.pm
Log Message:
discounts, RT#6679
Index: discount.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/discount.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- discount.pm 30 Jan 2010 07:38:31 -0000 1.1
+++ discount.pm 31 Jan 2010 07:04:38 -0000 1.2
@@ -126,13 +126,17 @@
$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 @@
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
More information about the freeside-commits
mailing list