[freeside-commits] freeside/httemplate/view/cust_main/packages package.html, 1.8, 1.8.2.1
Mark Wells
mark at wavetail.420.am
Mon Jan 24 17:52:22 PST 2011
Update of /home/cvs/cvsroot/freeside/httemplate/view/cust_main/packages
In directory wavetail.420.am:/tmp/cvs-serv26763/packages
Modified Files:
Tag: FREESIDE_2_1_BRANCH
package.html
Log Message:
missing files for new locations UI, RT#10766
Index: package.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/packages/package.html,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -u -w -d -r1.8 -r1.8.2.1
--- package.html 22 Sep 2010 19:16:20 -0000 1.8
+++ package.html 25 Jan 2011 01:52:20 -0000 1.8.2.1
@@ -168,8 +168,16 @@
% }
</TR>
+% if ( $curuser->access_right('Change customer package') and
+% !$cust_pkg->get('cancel') and
+% !$opt{'show_location'}) {
+ <TR>
+ <TD><FONT SIZE="-1">
+ ( <% pkg_change_location_link($cust_pkg) %> )
+ </FONT></TD>
+ </TR>
+% }
% }
-
</TABLE>
</TD>
@@ -184,6 +192,10 @@
my $curuser = $FS::CurrentUser::CurrentUser;
+my $countrydefault = $opt{'countrydefault'} || 'US';
+my $statedefault = $opt{'statedefault'}
+ || ($countrydefault eq 'US' ? 'CA' : '');
+
#subroutines
#false laziness w/status.html
@@ -204,6 +216,19 @@
);
}
+sub pkg_change_location_link {
+ my $cust_pkg = shift;
+ my $pkgpart = $cust_pkg->pkgpart;
+ include( '/elements/popup_link-cust_pkg.html',
+ 'action' => $p. "misc/change_pkg.cgi?locationnum=-1;pkgpart=$pkgpart;".
+ "address1=;address2=;city=;county=;state=$statedefault;".
+ "zip=;country=$countrydefault",
+ 'label' => 'Change location',
+ 'actionlabel' => 'Change',
+ 'cust_pkg' => $cust_pkg,
+ );
+}
+
sub pkg_dates_link { pkg_link('edit/REAL_cust_pkg', 'Edit dates', @_ ); }
sub pkg_discount_link {
More information about the freeside-commits
mailing list