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