[freeside-commits] branch FREESIDE_3_BRANCH updated. 02a6274b9eec3668afe0835df2009790f010a0b9

Ivan ivan at 420.am
Wed Jan 15 22:15:43 PST 2014


The branch, FREESIDE_3_BRANCH has been updated
       via  02a6274b9eec3668afe0835df2009790f010a0b9 (commit)
      from  ded7dddeaf4ec7ec42b5f59133b487a62f43ea78 (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 02a6274b9eec3668afe0835df2009790f010a0b9
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Jan 15 22:15:42 2014 -0800

    fix part_pkg.comment showing in signup and self-service package order, RT#25557

diff --git a/FS/FS/ClientAPI/MasonComponent.pm b/FS/FS/ClientAPI/MasonComponent.pm
index c4094ff..8a31185 100644
--- a/FS/FS/ClientAPI/MasonComponent.pm
+++ b/FS/FS/ClientAPI/MasonComponent.pm
@@ -99,6 +99,7 @@ my %session_callbacks = (
     my %args = @$argsref;
     $args{part_pkg} = \@part_pkg;
     $args{first_svc} = \@first_svc;
+    $args{no_comment} = 1;
     @$argsref = ( %args );
     return ''; #no error
 
diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm
index 2cccce0..c908c91 100644
--- a/FS/FS/part_pkg.pm
+++ b/FS/FS/part_pkg.pm
@@ -784,6 +784,11 @@ sub custom_comment {
     $price_info;
 }
 
+sub pkg_price_info {
+  my $self = shift;
+  $self->pkg. ' - '. ($self->price_info || 'No charge');
+}
+
 =item pkg_class
 
 Returns the package class, as an FS::pkg_class object, or the empty string
diff --git a/httemplate/edit/cust_main/first_pkg/select-part_pkg.html b/httemplate/edit/cust_main/first_pkg/select-part_pkg.html
index 709a8ad..3c2eac0 100644
--- a/httemplate/edit/cust_main/first_pkg/select-part_pkg.html
+++ b/httemplate/edit/cust_main/first_pkg/select-part_pkg.html
@@ -144,8 +144,9 @@ foreach my $part_pkg ( @part_pkg ) {
 my @options = ();
 push @options, '' unless $opt{'disable_empty'};
 push @options, map $pkgpart_svcpart{ $_->pkgpart }, @part_pkg;
+my $label_method = $opt{no_comment} ? 'pkg_price_info' : 'pkg_comment' ;
 my %labels = ( '' => ( $opt{'empty_label'} || '(none)' ),
-               map { $pkgpart_svcpart{ $_->pkgpart } => $_->pkg_comment }
+               map { $pkgpart_svcpart{ $_->pkgpart } => $_->$label_method() }
                    @part_pkg
              );
 

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/ClientAPI/MasonComponent.pm                  |    1 +
 FS/FS/part_pkg.pm                                  |    5 +++++
 .../edit/cust_main/first_pkg/select-part_pkg.html  |    3 ++-
 3 files changed, 8 insertions(+), 1 deletions(-)




More information about the freeside-commits mailing list