[freeside-commits] branch master updated. edb76c8cd4f4066e32f64ab92909a0f95d85ae23

Ivan ivan at 420.am
Wed Feb 26 18:43:44 PST 2014


The branch, master has been updated
       via  edb76c8cd4f4066e32f64ab92909a0f95d85ae23 (commit)
      from  33043da94faf7538a568b4064a511d35b4c7caf5 (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 edb76c8cd4f4066e32f64ab92909a0f95d85ae23
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Feb 26 18:43:43 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