This commit was generated by cvs2svn to compensate for changes in r8593,
[freeside.git] / httemplate / misc / location.cgi
1 <% objToJson(\%hash) %>
2 <%init>
3
4 my $locationnum = $cgi->param('arg');
5
6 my $cust_location = qsearchs({
7   'select'    => 'cust_location.*',
8   'table'     => 'cust_location',
9   'hashref'   => { 'locationnum' => $locationnum },
10   'addl_from' => 'LEFT JOIN cust_main USING ( custnum )',
11   'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
12 });
13
14 my %hash = ();
15 %hash = map { $_ => $cust_location->$_() }
16             qw( address1 address2 city county state zip country )
17   if $cust_location;
18
19 </%init>