1 <% include( 'elements/browse.html',
2 title => emt('Real Estate Inventory'),
3 name => 'real estate inventory',
6 'Edit locations' => "${p}browse/realestate_location.html",
7 'Add a new location' => "${p}edit/realestate_location.html",
8 'Add a new unit' => "${p}edit/realestate_unit.html",
12 table => 'realestate_unit',
13 select => join(', ',qw(
15 realestate_location.location_title
21 LEFT JOIN realestate_location
22 ON realestate_location.realestatelocnum
23 = realestate_unit.realestatelocnum
25 ON realestate_unit.custnum = cust_main.custnum
29 count_query => 'SELECT COUNT(*) FROM realestate_unit',
31 header => [ 'Location', 'Unit', 'Customer' ],
36 return '' unless $_[0]->custnum;
37 return $_[0]->company if $_[0]->company;
38 return $_[0]->first.' '.$_[0]->last;
42 ["${p}edit/realestate_location?", 'realestatelocnum' ],
43 ["${p}edit/realestate_unit.html?", 'realestatenum' ],
44 ["${p}view/cust_main.cgi?", 'custnum' ]
55 my $curuser = $FS::CurrentUser::CurrentUser;
57 unless $curuser->access_right('Edit inventory')
58 || $curuser->access_right('Edit global inventory')
59 || $curuser->access_right('Configuration');