diff options
author | Mark Wells <mark@freeside.biz> | 2015-09-07 17:40:25 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2015-09-07 23:10:23 -0700 |
commit | 7ac9115109599df55f55a52c83204f0ac4e0b00c (patch) | |
tree | 622a21976c0fcdd298aaf4756e9c4ab9a6488def | |
parent | 3220d99fa3ef70ca60cc7218533401da1990f4e0 (diff) |
"1 months", eww
-rw-r--r-- | FS/FS/discount.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/FS/FS/discount.pm b/FS/FS/discount.pm index 14911395b..dd6960495 100644 --- a/FS/FS/discount.pm +++ b/FS/FS/discount.pm @@ -198,7 +198,13 @@ sub description { ( 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; |