1 <TD CLASS="inv" BGCOLOR="<% $bgcolor %>">
3 % unless ( $cust_pkg->locationnum ) {
4 <I><FONT SIZE=-1>(default service address)</FONT><BR>
7 <% $loc->address1 |h %><BR>
9 % if ( $loc->address2 !~ /^\s*$/ ) {
10 <% $loc->address2 |h %><BR>
13 <% $loc->city |h %><% $loc->county ? ' ('.$loc->county.' county)' : '' |h %>,
14 <% $loc->state |h %> <% $loc->zip |h %><BR>
16 % if ( $loc->country ne $countrydefault ) {
17 <% code2country( $loc->country ) %>
22 % if ( ! $cust_pkg->get('cancel')
23 % && $FS::CurrentUser::CurrentUser->access_right('Change customer package')
27 ( <%pkg_change_location_link($cust_pkg)%> )
36 my $conf = new FS::Conf;
38 my $bgcolor = $opt{'bgcolor'};
39 my $cust_pkg = $opt{'cust_pkg'};
40 my $part_pkg = $opt{'part_pkg'};
41 my $conf = new FS::Conf;
42 my $countrydefault = $conf->config('countrydefault') || 'US';
43 my $statedefault = $conf->config('statedefault')
44 || ($countrydefault eq 'US' ? 'CA' : '');
46 my $loc = $cust_pkg->cust_location_or_main;
48 sub pkg_change_location_link {
50 my $pkgpart = $cust_pkg->pkgpart;
51 include( '/elements/popup_link-cust_pkg.html',
52 'action' => $p. "misc/change_pkg.cgi?locationnum=-1;pkgpart=$pkgpart;".
53 "address1=;address2=;city=;county=;state=$statedefault;".
54 "zip=;country=$countrydefault",
55 'label' => 'Change location',
56 'actionlabel' => 'Change',
57 'cust_pkg' => $cust_pkg,