1 % if ( $conf->exists('show_stateid') ) {
3 <TD ALIGN="right"><% $stateid_label %></TD>
4 <TD><INPUT TYPE="text" NAME="stateid" VALUE="<% $stateid %>" SIZE=12></TD>
5 <TD><& /elements/select-state.html,
6 state => $cust_main->stateid_state,
7 country => $cust_main->country, # how does this work on new customer?
9 disable_countyupdate => 1,
13 <INPUT TYPE="hidden" NAME="stateid" VALUE="<% $stateid %>">
14 <INPUT TYPE="hidden" NAME="stateid_state" VALUE="<% $cust_main->stateid_state %>">
18 my $cust_main = shift;
19 my $conf = FS::Conf->new;
21 if ( $cgi->param('error') ) {
22 $stateid = $cust_main->stateid;
23 } elsif ( $cust_main->custnum ) {
24 $stateid = $cust_main->masked('stateid');
28 $cust_main->set('stateid_state' => $cust_main->state)
29 unless $cust_main->stateid_state;
31 my $stateid_label = FS::Msgcat::_gettext('stateid') =~ /^(stateid)?$/
32 ? 'Driver’s License'
33 : FS::Msgcat::_gettext('stateid') || 'Driver’s License';
35 my $stateid_state_label =
36 FS::Msgcat::_gettext('stateid_state') =~ /^(stateid_state)?$/
37 ? 'Driver’s License State'
38 : FS::Msgcat::_gettext('stateid') || 'Driver’s License State';