[freeside-commits] branch FREESIDE_3_BRANCH updated. 63827f50be90b3774c7d312f9ac049e69111e3d3
Ivan
ivan at 420.am
Wed Feb 26 18:43:45 PST 2014
The branch, FREESIDE_3_BRANCH has been updated
via 63827f50be90b3774c7d312f9ac049e69111e3d3 (commit)
from b9491d5d5f06f41963c9e4d523a6bce7d8fa132b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 63827f50be90b3774c7d312f9ac049e69111e3d3
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Feb 26 18:43:44 2014 -0800
fix invoice for cust_bill_pkg missing cust_pkg, RT#27745
diff --git a/FS/FS/TemplateItem_Mixin.pm b/FS/FS/TemplateItem_Mixin.pm
index bf857a9..fa20c24 100644
--- 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 ) {
- $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 ) {
- $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/;
- $desc;
+ return $desc;
}
+
}
=item time_period_pretty PART_PKG, AGENTNUM
-----------------------------------------------------------------------
Summary of changes:
FS/FS/TemplateItem_Mixin.pm | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
More information about the freeside-commits
mailing list