pick/enter a location when ordering a package, RT#4499
[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   'table'     => 'cust_location',
8   'hashref'   => { 'locationnum' => $locationnum },
9   'addl_from' => 'LEFT JOIN cust_main USING ( custnum )',
10   'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
11 });
12
13 my %hash = ();
14 %hash = map { $_ => $cust_location->$_() }
15             qw( address1 address2 city county state zip country )
16   if $cust_location;
17
18 </%init>