diff options
author | Mark Wells <mark@freeside.biz> | 2015-01-27 23:27:54 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2015-01-27 23:27:54 -0800 |
commit | 71f6489e0b4cdd286668b79c8a397876df20840c (patch) | |
tree | 32f5a40d12c13ee842bcdd0ffc2371ac5630158a | |
parent | fa298c55a9e276ef714f1e6dbf11ae3931ad8684 (diff) |
give discounts a default name, #31273
-rw-r--r-- | FS/FS/discount.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/FS/FS/discount.pm b/FS/FS/discount.pm index 0561f9c..361e0b4 100644 --- a/FS/FS/discount.pm +++ b/FS/FS/discount.pm @@ -173,7 +173,12 @@ sub description_short { my $conf = new FS::Conf; my $money_char = $conf->config('money_char') || '$'; - my $desc = $self->name ? $self->name.': ' : ''; + my $desc; + if ( $self->name ) { + $desc = $self->name . ': '; + } else { + $desc = 'Discount of '; + } $desc .= $money_char. sprintf('%.2f/month', $self->amount) if $self->amount > 0; |