[freeside-commits] freeside/httemplate/misc order_pkg.html, 1.19, 1.20
Ivan,,,
ivan at wavetail.420.am
Sun Mar 27 19:00:54 PDT 2011
Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory wavetail.420.am:/tmp/cvs-serv12828/httemplate/misc
Modified Files:
order_pkg.html
Log Message:
finish existing customer dsl order, RT#7111
Index: order_pkg.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/order_pkg.html,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -w -d -r1.19 -r1.20
--- order_pkg.html 20 Jan 2011 20:46:30 -0000 1.19
+++ order_pkg.html 28 Mar 2011 02:00:52 -0000 1.20
@@ -28,11 +28,19 @@
<FORM NAME="OrderPkgForm" ACTION="<% $p %>edit/process/quick-cust_pkg.cgi" METHOD="POST">
<INPUT TYPE="hidden" NAME="custnum" VALUE="<% $cust_main->custnum %>">
+<INPUT TYPE="hidden" NAME="qualnum" VALUE="<% scalar($cgi->param('qualnum')) |h %>">
% if ( $svcpart ) {
<INPUT TYPE="hidden" NAME="svcpart" VALUE="<% $svcpart %>">
% }
<% ntable("#cccccc", 2) %>
+% if ( $part_pkg ) {
+ <INPUT TYPE="hidden" NAME="pkgpart" VALUE="<% $part_pkg->pkgpart %>">
+ <TR>
+ <TH ALIGN="right">Package</TH>
+ <TD COLSPAN=6><% $part_pkg->pkg_comment |h %></TD>
+ </TR>
+% } else {
<% include('/elements/tr-select-cust-part_pkg.html',
'curr_value' => $pkgpart,
'classnum' => -1,
@@ -40,6 +48,7 @@
'onchange' => 'enable_order_pkg',
)
%>
+% }
<TR>
<TH ALIGN="right">Start date </TD>
@@ -81,12 +90,23 @@
%>
% }
+% if ( $cgi->param('lock_locationnum') ) {
+
+ <INPUT TYPE = "hidden"
+ NAME = "locationnum"
+ VALUE = "<% scalar($cgi->param('lock_locationnum')) |h %>"
+ >
+
+% } else {
+
<% include('/elements/tr-select-cust_location.html',
'cgi' => $cgi,
'cust_main' => $cust_main,
)
%>
+% }
+
<TR>
<TH ALIGN="right">Contract end date </TD>
<TD COLSPAN=6>
@@ -101,6 +121,8 @@
</TABLE>
+% unless ( $cgi->param('lock_locationnum') ) {
+
<% include( '/elements/standardize_locations.html',
'form' => "OrderPkgForm",
'onlyship' => 1,
@@ -109,8 +131,18 @@
)
%>
+% }
+
<BR>
-<INPUT NAME="submitButton" TYPE="button" VALUE="Order Package" onClick = "this.disabled=true; standardize_locations();" <% $pkgpart ? '' : 'DISABLED' %>>
+% my $onclick = $cgi->param('lock_locationnum')
+% ? 'document.OrderPkgForm.submit()'
+% : 'standardize_locations()';
+<INPUT NAME="submitButton"
+ TYPE="button"
+ VALUE="Order Package"
+ onClick = "this.disabled=true; <% $onclick %>;"
+ <% $pkgpart ? '' : 'DISABLED' %>
+>
</FORM>
</BODY>
@@ -133,7 +165,17 @@
'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
});
-my $pkgpart = scalar($cgi->param('pkgpart'));
+my $part_pkg = '';
+if ( $cgi->param('lock_pkgpart') ) {
+ $part_pkg = qsearchs({
+ 'table' => 'part_pkg',
+ 'hashref' => { 'pkgpart' => scalar($cgi->param('lock_pkgpart')) },
+ 'extra_sql' => ' AND '. FS::part_pkg->agent_pkgs_sql( $cust_main->agent ),
+ })
+ or die "unknown pkgpart ". $cgi->param('lock_pkgpart');
+}
+
+my $pkgpart = $part_pkg ? $part_pkg->pkgpart : scalar($cgi->param('pkgpart'));
my $format = $date_format. ' %T %z (%Z)'; #false laziness w/REAL_cust_pkg.cgi?
my $start_date = '';
@@ -142,6 +184,6 @@
$start_date = $start_date ? time2str($format, $start_date) : '';
}
-my $svcpart = $cgi->param('svcpart');
+my $svcpart = scalar($cgi->param('svcpart'));
</%init>
More information about the freeside-commits
mailing list