2 % $cgi->param('error', $error);
3 % $cgi->redirect(popurl(3). 'edit/cust_location-censustract.html?'. $cgi->query_string );
6 <& /elements/header-popup.html, "Census tract changed" &>
7 <SCRIPT TYPE="text/javascript">
16 my $curuser = $FS::CurrentUser::CurrentUser;
19 unless $curuser->access_right('Change customer package');
21 my $locationnum = $cgi->param('locationnum');
22 my $cust_location = qsearchs({
23 'select' => 'cust_location.*',
24 'table' => 'cust_location',
25 'addl_from' => 'LEFT JOIN cust_main USING ( custnum )',
26 'hashref' => { 'locationnum' => $locationnum },
27 'extra_sql' => ' AND '. $curuser->agentnums_sql,
29 die "unknown locationnum $locationnum" unless $cust_location;
31 $cust_location->set('censustract', $cgi->param('censustract'));
32 my $error = $cust_location->replace;