[freeside-commits] branch master updated. dda70549e974d4b559f9d5a117948b931813c7d1

Mark Wells mark at 420.am
Thu May 31 13:03:09 PDT 2012


The branch, master has been updated
       via  dda70549e974d4b559f9d5a117948b931813c7d1 (commit)
      from  4daa22e234bec170832b893cc8d038e9d2aca6ea (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 dda70549e974d4b559f9d5a117948b931813c7d1
Author: Mark Wells <mark at freeside.biz>
Date:   Thu May 31 13:02:12 2012 -0700

    fix location selection for prospects, #940

diff --git a/FS/FS/prospect_main.pm b/FS/FS/prospect_main.pm
index 5a4048f..6adc852 100644
--- a/FS/FS/prospect_main.pm
+++ b/FS/FS/prospect_main.pm
@@ -244,7 +244,8 @@ Returns the locations (see L<FS::cust_location>) associated with this prospect.
 
 sub cust_location {
   my $self = shift;
-  qsearch( 'cust_location', { 'prospectnum' => $self->prospectnum } );
+  qsearch( 'cust_location', { 'prospectnum' => $self->prospectnum,
+                              'custnum'     => '' } );
 }
 
 =item qual
diff --git a/httemplate/edit/prospect_main.html b/httemplate/edit/prospect_main.html
index c8c8e98..d398541 100644
--- a/httemplate/edit/prospect_main.html
+++ b/httemplate/edit/prospect_main.html
@@ -36,6 +36,9 @@
          'empty_label'   => 'No address',
          'disable_empty' => $conf->exists('prospect_main-location_required'),
          'alt_format'    => $conf->exists('prospect_main-alt_address_format'),
+         'include_opt_callback' => sub { 
+            'prospect_main' => shift
+          },
        },
      ],
      'new_callback'    => $new_callback,
diff --git a/httemplate/elements/tr-select-cust_location.html b/httemplate/elements/tr-select-cust_location.html
index 05712ee..d9e3e9e 100644
--- a/httemplate/elements/tr-select-cust_location.html
+++ b/httemplate/elements/tr-select-cust_location.html
@@ -287,7 +287,7 @@ my $location_sort = sub {
   or lc($a->address2) cmp lc($b->address2)
 };
 
-my @cust_location = ();
+my @cust_location;
 push @cust_location, $cust_main->cust_location if $cust_main;
 push @cust_location, $prospect_main->cust_location if $prospect_main;
 push @cust_location, $cust_location

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

Summary of changes:
 FS/FS/prospect_main.pm                           |    3 ++-
 httemplate/edit/prospect_main.html               |    3 +++
 httemplate/elements/tr-select-cust_location.html |    2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list