X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main.pm;h=d9db2ed16faa0671fce89774832eef296818be9c;hb=d78cfd10ddb82f27cdafaaeb80479d9bb6723480;hp=329b461884e7f6c0a4acd5fa7798d9f2631c534c;hpb=085a29e3efffe7db3277a2f7f13ff6bd364835fb;p=freeside.git diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 329b46188..d9db2ed16 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -2071,7 +2071,7 @@ sub _cust_pkg { # This should be generalized to use config options to determine order. sub sort_packages { - my $locationsort = $a->locationnum <=> $b->locationnum; + my $locationsort = ( $a->locationnum || 0 ) <=> ( $b->locationnum || 0 ); return $locationsort if $locationsort; if ( $a->get('cancel') xor $b->get('cancel') ) { @@ -7986,9 +7986,11 @@ sub geocode { ? 'ship_' : ''; - my ($zip,$plus4) = split /-/, $self->get("${prefix}zip") + my($zip,$plus4) = split /-/, $self->get("${prefix}zip") if $self->country eq 'US'; + $zip ||= ''; + $plus4 ||= ''; #CCH specific location stuff my $extra_sql = "AND plus4lo <= '$plus4' AND plus4hi >= '$plus4'"; @@ -8401,8 +8403,8 @@ sub _money_table_where { (Class method) -Returns a qsearch hash expression to search for parameters specified in HREF. -Valid parameters are +Returns a qsearch hash expression to search for parameters specified in +HASHREF. Valid parameters are =over 4