projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b9491d5
)
fix invoice for cust_bill_pkg missing cust_pkg, RT#27745
author
Ivan Kohler
<ivan@freeside.biz>
Thu, 27 Feb 2014 02:43:44 +0000
(18:43 -0800)
committer
Ivan Kohler
<ivan@freeside.biz>
Thu, 27 Feb 2014 02:43:44 +0000
(18:43 -0800)
FS/FS/TemplateItem_Mixin.pm
patch
|
blob
|
history
diff --git
a/FS/FS/TemplateItem_Mixin.pm
b/FS/FS/TemplateItem_Mixin.pm
index
bf857a9
..
fa20c24
100644
(file)
--- a/
FS/FS/TemplateItem_Mixin.pm
+++ b/
FS/FS/TemplateItem_Mixin.pm
@@
-61,14
+61,19
@@
sub desc {
my( $self, $locale ) = @_;
if ( $self->pkgnum > 0 ) {
my( $self, $locale ) = @_;
if ( $self->pkgnum > 0 ) {
- $self->itemdesc || $self->part_pkg->pkg_locale($locale);
+ return $self->itemdesc if $self->itemdesc;
+ my $part_pkg = $self->part_pkg or return 'UNKNOWN';
+ return $part_pkg->pkg_locale($locale);
+
} elsif ( $self->feepart ) {
} elsif ( $self->feepart ) {
- $self->part_fee->itemdesc_locale($locale);
+ return $self->part_fee->itemdesc_locale($locale);
+
} else { # by the process of elimination it must be a tax
my $desc = $self->itemdesc || 'Tax';
$desc .= ' '. $self->itemcomment if $self->itemcomment =~ /\S/;
} else { # by the process of elimination it must be a tax
my $desc = $self->itemdesc || 'Tax';
$desc .= ' '. $self->itemcomment if $self->itemcomment =~ /\S/;
- $desc;
+
return
$desc;
}
}
+
}
=item time_period_pretty PART_PKG, AGENTNUM
}
=item time_period_pretty PART_PKG, AGENTNUM