sub cust_location {
my $self = shift;
- qsearch( 'cust_location', { 'prospectnum' => $self->prospectnum,
- 'custnum' => '' } );
+ qsearch({
+ 'table' => 'cust_location',
+ 'hashref' => { 'prospectnum' => $self->prospectnum,
+ 'custnum' => '',
+ },
+ 'order_by' => 'ORDER BY country, LOWER(state), LOWER(city), LOWER(county), LOWER(address1), LOWER(address2)',
+ });
}
=item qual
my @contact = map $_->contact, $self->prospect_contact;
- #XXX define one contact type as "billing", then we could pick just that one
- my @invoicing_list = map $_->emailaddress, map $_->contact_email, @contact;
-
#XXX i'm not compatible with cust_main-require_phone (which is kind of a
# pre-contact thing anyway)
#$cust_main->payby('BILL');
#$cust_main->paydate('12/2037');
- $cust_main->insert( {}, \@invoicing_list,
+ $cust_main->insert( {},
'prospectnum' => $self->prospectnum,
)
or $cust_main;