X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main.cgi;h=5671e7a2b6d6cc545ed984cd1863eef210fe3723;hb=05a8005cb5435fbdb3552af855a77934b58eac91;hp=ef81ebab166898e2e2bb5dd8771a7d19e9f9b188;hpb=f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7;p=freeside.git diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index ef81ebab1..5671e7a2b 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -28,8 +28,10 @@ <& cust_main/top_misc.html, $cust_main, 'custnum' => $custnum &> %# birthdate -% if ( $conf->exists('cust_main-enable_birthdate') +% if ( $conf->config('national_id-country') +% || $conf->exists('cust_main-enable_birthdate') % || $conf->exists('cust_main-enable_spouse_birthdate') +% || $conf->exists('cust_main-enable_anniversary_date') % ) % {
@@ -51,6 +53,7 @@ <& /elements/location.html, object => $cust_main->bill_location, prefix => 'bill_', + enable_coords => 1, &> <& cust_main/after_bill_location.html, $cust_main &> @@ -75,6 +78,7 @@ prefix => 'ship_', enable_censustract => 1, enable_district => 1, + enable_coords => 1, &>
@@ -246,6 +250,8 @@ if ( $cgi->param('error') ) { $stateid = $cust_main->stateid; # don't mask an entered value on errors $payinfo = $cust_main->payinfo; # don't mask an entered value on errors + $cust_main->national_id( $cgi->param('national_id1') || $cgi->param('national_id2') ); + $prospectnum = $cgi->param('prospectnum') || ''; $pkgpart_svcpart = $cgi->param('pkgpart_svcpart') || ''; @@ -279,7 +285,8 @@ if ( $cgi->param('error') ) { my( $query ) = $cgi->keywords; $query =~ /^(\d+)$/; $custnum=$1; - $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ); + $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ) + or die "custnum $custnum not found"; if ( $cust_main->dbdef_table->column('paycvv') && length($cust_main->paycvv) ) { my $paycvv = $cust_main->paycvv; @@ -309,6 +316,8 @@ if ( $cgi->param('error') ) { $stateid = ''; $payinfo = ''; + $cgi->param('tagnum', FS::part_tag->default_tags); + if ( $cgi->param('qualnum') =~ /^(\d+)$/ ) { my $qualnum = $1; my $qual = qsearchs('qual', { 'qualnum' => $qualnum } ) @@ -347,14 +356,18 @@ if ( $cgi->param('error') ) { my $countrydefault = $conf->config('countrydefault') || 'US'; my $statedefault = $conf->config('statedefault') || 'CA'; $cust_main->set('bill_location', - FS::cust_location->new( - { country => $countrydefault, state => $statedefault } - ) + FS::cust_location->new( { + country => $countrydefault, + state => $statedefault, + coord_auto => 'Y', + } ) ); $cust_main->set('ship_location', - FS::cust_location->new( - { country => $countrydefault, state => $statedefault } - ) + FS::cust_location->new( { + country => $countrydefault, + state => $statedefault, + coord_auto => 'Y', + } ) ); }