1 <TD CLASS="inv" BGCOLOR="<% $bgcolor %>" WIDTH="20%">
4 <DIV STYLE="font-style: italic; font-size: small">
7 <% $loc->location_label( 'join_string' => '<BR>',
8 'double_space' => ' ',
9 'escape_function' => \&encode_entities,
10 'countrydefault' => $countrydefault,
14 % if ( $loc->latitude && $loc->longitude ) {
17 <% $loc->latitude %>, <% $loc->longitude %>
18 <& /elements/coord-links.html,
21 $opt{'cust_main'}->name_short. ': '. $opt{'part_pkg'}->pkg,
22 $opt{'cust_main'}->agentnum,
31 % if ( ! $cust_pkg->get('cancel')
32 % && $FS::CurrentUser::CurrentUser->access_right('Change customer package')
37 ( <%pkg_change_location_link($cust_pkg)%> )
38 % if ( $cust_pkg->locationnum ) {
39 ( <%edit_location_link($cust_pkg->locationnum)%> )
47 my $conf = new FS::Conf;
50 my $bgcolor = $opt{'bgcolor'};
51 my $cust_pkg = $opt{'cust_pkg'};
52 my $countrydefault = $opt{'countrydefault'} || 'US';
53 my $statedefault = $opt{'statedefault'}
54 || ($countrydefault eq 'US' ? 'CA' : '');
56 my $loc = $cust_pkg->cust_location_or_main;
57 # dubious--they should all have a location now
58 my $default = $cust_pkg->locationnum == $opt{'cust_main'}->ship_locationnum;
60 sub pkg_change_location_link {
62 my $pkgpart = $cust_pkg->pkgpart;
63 include( '/elements/popup_link-cust_pkg.html',
64 'action' => $p. "misc/change_pkg.cgi?locationnum=-1;pkgpart=$pkgpart;".
65 "address1=;address2=;city=;county=;state=$statedefault;".
66 "zip=;country=$countrydefault",
67 'label' => emt('Change location'),
68 'actionlabel' => emt('Change'),
69 'cust_pkg' => $cust_pkg,
73 sub edit_location_link {
74 my $locationnum = shift;
75 include( '/elements/popup_link.html',
76 'action' => $p. "edit/cust_location.cgi?locationnum=$locationnum",
77 'label' => emt('Edit location'),
78 'actionlabel' => emt('Edit'),