diff options
| author | ivan <ivan> | 2009-12-28 19:20:25 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2009-12-28 19:20:25 +0000 | 
| commit | 03ceab71dad1e5eb366865d304e5e459cc905ce4 (patch) | |
| tree | 18b4532289a0237ae694b1ad5c033b25f448bd7c /httemplate/misc/location.cgi | |
| parent | 5950a980cef4968ac59ca8041d2204e6d98e7a3d (diff) | |
beginning of prospect/CRM/contact work
Diffstat (limited to 'httemplate/misc/location.cgi')
| -rw-r--r-- | httemplate/misc/location.cgi | 15 | 
1 files changed, 13 insertions, 2 deletions
| diff --git a/httemplate/misc/location.cgi b/httemplate/misc/location.cgi index 419c59f2e..82ad636c4 100644 --- a/httemplate/misc/location.cgi +++ b/httemplate/misc/location.cgi @@ -3,12 +3,23 @@  my $locationnum = $cgi->param('arg'); +my $curuser = $FS::CurrentUser::CurrentUser; +  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, +  'addl_from' => ' LEFT JOIN cust_main     USING ( custnum     ) ', +                 ' LEFT JOIN prospect_main USING ( prospectnum ) ', +  'extra_sql' => ' AND ( '. +                       ' ( custnum IS NOT NULL AND '. +                           $curuser->agentnums_sql( table=>'cust_main' ). +                       ' ) '. +                       ' OR '. +                       ' ( prospectnum IS NOT NULL AND '. +                           $curuser->agentnums_sql( table=>'prospect_main' ). +                       ' ) '. +                     ' )',  });  my %hash = (); | 
