summaryrefslogtreecommitdiff
path: root/FS/FS/discount.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-09-07 17:40:25 -0700
committerMark Wells <mark@freeside.biz>2015-09-07 23:10:17 -0700
commitbdc107554a89fe3e37cd1903a4f39f19e77f2bcc (patch)
treed7fa7dd75956147a1c2beb9724a569d80ba5102e /FS/FS/discount.pm
parentb076e3c7d5c166c73158f7ab8be5b4875f2b3922 (diff)
"1 months", eww
Diffstat (limited to 'FS/FS/discount.pm')
-rw-r--r--FS/FS/discount.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/FS/FS/discount.pm b/FS/FS/discount.pm
index 361e0b4..e113357 100644
--- 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/;
- $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;