diff options
author | Mark Wells <mark@freeside.biz> | 2012-04-13 12:08:40 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2012-04-13 12:08:40 -0700 |
commit | 18459c4369f63b7fda11a3ff7a0af067bed0c9bf (patch) | |
tree | 82a9c8b69b77a27f30055511d8c1ab3816ab90bb /FS/FS/cust_main.pm | |
parent | 217bd576f8024ea541bdbb967e1c53f242980e61 (diff) |
adjustment to display_custnum special format, #16815
Diffstat (limited to 'FS/FS/cust_main.pm')
-rw-r--r-- | FS/FS/cust_main.pm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 1e0e6d3b1..845d09848 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -3963,9 +3963,16 @@ cust_main-default_agent_custid is set and it has a value, custnum otherwise. sub display_custnum { my $self = shift; - my $prefix = $conf->config('cust_main-custnum-display_prefix') || ''; + my $prefix = $conf->config('cust_main-custnum-display_prefix', $self->agentnum) || ''; if ( my $special = $conf->config('cust_main-custnum-display_special') ) { - if ( $special eq 'CoStCl' ) { + if ( $special eq 'CoStAg' ) { + $prefix = uc( join('', + $self->country, + ($self->state =~ /^(..)/), + $prefix || ($self->agent->agent =~ /^(..)/) + ) ); + } + elsif ( $special eq 'CoStCl' ) { $prefix = uc( join('', $self->country, ($self->state =~ /^(..)/), |