summaryrefslogtreecommitdiff
path: root/httemplate/misc/location.cgi
blob: 419c59f2e0d1863222113f8919dfaacff5dd3e19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<% objToJson(\%hash) %>
<%init>

my $locationnum = $cgi->param('arg');

my $cust_location = qsearchs({
  'select'    => 'cust_location.*',
  'table'     => 'cust_location',
  'hashref'   => { 'locationnum' => $locationnum },
  'addl_from' => 'LEFT JOIN cust_main USING ( custnum )',
  'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
});

my %hash = ();
%hash = map { $_ => $cust_location->$_() }
            qw( address1 address2 city county state zip country )
  if $cust_location;

</%init>