From 20bddf47a41b6d064b3cfa4c41e55c157cf0c3de Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 9 Jan 2009 04:06:26 +0000 Subject: pick/enter a location when ordering a package, RT#4499 --- httemplate/misc/location.cgi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 httemplate/misc/location.cgi (limited to 'httemplate/misc/location.cgi') diff --git a/httemplate/misc/location.cgi b/httemplate/misc/location.cgi new file mode 100644 index 000000000..3c3a85545 --- /dev/null +++ b/httemplate/misc/location.cgi @@ -0,0 +1,18 @@ +<% objToJson(\%hash) %> +<%init> + +my $locationnum = $cgi->param('arg'); + +my $cust_location = qsearchs({ + '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; + + -- cgit v1.2.1