From: Mark Wells Date: Tue, 8 Sep 2015 00:40:25 +0000 (-0700) Subject: "1 months", eww X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=f5955dde67c2015cab4a7892d64799d3adbd7968 "1 months", eww --- diff --git a/FS/FS/discount.pm b/FS/FS/discount.pm index 361e0b4b2..e11335741 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;