projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add msgclass to initial msg_template, #38500
[freeside.git]
/
FS
/
FS
/
discount.pm
diff --git
a/FS/FS/discount.pm
b/FS/FS/discount.pm
index
361e0b4
..
e113357
100644
(file)
--- a/
FS/FS/discount.pm
+++ b/
FS/FS/discount.pm
@@
-196,7
+196,13
@@
sub description {
( my $months = $self->months ) =~ s/\.0+$//;
$months =~ s/(\.\d*[1-9])0+$/$1/;
( my $months = $self->months ) =~ s/\.0+$//;
$months =~ s/(\.\d*[1-9])0+$/$1/;
- $desc .= " for $months months" if $months;
+ if ($months) {
+ if ($months == 1) {
+ $desc .= " for 1 month";
+ } else {
+ $desc .= " for $months months";
+ }
+ }
$desc .= ', applies to setup' if $self->setup;
$desc .= ', applies to setup' if $self->setup;