diff options
author | Mark Wells <mark@freeside.biz> | 2015-03-10 13:09:51 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2015-03-10 13:09:51 -0700 |
commit | edae5c0f10d80ecd8d45c04c51e3ca698e4a7a99 (patch) | |
tree | 64bd43047f03dc51e67e9bafb8021649ef4f672d /FS/FS/Template_Mixin.pm | |
parent | 93b55cfdc07c1c29e9b42e801713f6595eaf071f (diff) |
correctly choose a default locationnum for prospects, #32489, #25343
Diffstat (limited to 'FS/FS/Template_Mixin.pm')
-rw-r--r-- | FS/FS/Template_Mixin.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm index 4a0834e05..655736782 100644 --- a/FS/FS/Template_Mixin.pm +++ b/FS/FS/Template_Mixin.pm @@ -3027,7 +3027,10 @@ sub _items_cust_bill_pkg { }) || $cust_main; $default_locationnum = $h_cust_main->ship_locationnum; } elsif ( $self->prospectnum ) { - $default_locationnum = $self->prospect_main->cust_location->locationnum; + my $cust_location = qsearchs('cust_location', + { prospectnum => $self->prospectnum, + disabled => '' }); + $default_locationnum = $cust_location->locationnum if $cust_location; } my @b = (); # accumulator for the line item hashes that we'll return |