From bdc107554a89fe3e37cd1903a4f39f19e77f2bcc Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Mon, 7 Sep 2015 17:40:25 -0700 Subject: "1 months", eww --- FS/FS/discount.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'FS/FS/discount.pm') 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; -- cgit v1.1