summaryrefslogtreecommitdiff
path: root/httemplate/misc/location.cgi
diff options
context:
space:
mode:
authorivan <ivan>2009-01-09 04:06:26 +0000
committerivan <ivan>2009-01-09 04:06:26 +0000
commit20bddf47a41b6d064b3cfa4c41e55c157cf0c3de (patch)
tree61b285cb23ccb27b145bdee84ff0c7421477eaba /httemplate/misc/location.cgi
parent2b8ffc98529637ffddfe7cbf6b4f9b8deb90f0fa (diff)
pick/enter a location when ordering a package, RT#4499
Diffstat (limited to 'httemplate/misc/location.cgi')
-rw-r--r--httemplate/misc/location.cgi18
1 files changed, 18 insertions, 0 deletions
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;
+
+</%init>