From e0a26680d75fc2000bde195eba7946805a3aaa28 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 28 Mar 2011 02:00:53 +0000 Subject: finish existing customer dsl order, RT#7111 --- httemplate/misc/order_pkg.html | 86 +++++++++++++++++++++++++++++++----------- 1 file changed, 64 insertions(+), 22 deletions(-) (limited to 'httemplate/misc/order_pkg.html') diff --git a/httemplate/misc/order_pkg.html b/httemplate/misc/order_pkg.html index dcbc01636..17c56055e 100644 --- a/httemplate/misc/order_pkg.html +++ b/httemplate/misc/order_pkg.html @@ -28,18 +28,27 @@
+ % if ( $svcpart ) { % } <% ntable("#cccccc", 2) %> -<% include('/elements/tr-select-cust-part_pkg.html', - 'curr_value' => $pkgpart, - 'classnum' => -1, - 'cust_main' => $cust_main, - 'onchange' => 'enable_order_pkg', - ) -%> +% if ( $part_pkg ) { + + + Package + <% $part_pkg->pkg_comment |h %> + +% } else { + <% include('/elements/tr-select-cust-part_pkg.html', + 'curr_value' => $pkgpart, + 'classnum' => -1, + 'cust_main' => $cust_main, + 'onchange' => 'enable_order_pkg', + ) + %> +% } Start date @@ -81,11 +90,22 @@ %> % } -<% include('/elements/tr-select-cust_location.html', - 'cgi' => $cgi, - 'cust_main' => $cust_main, - ) -%> +% if ( $cgi->param('lock_locationnum') ) { + + + +% } else { + + <% include('/elements/tr-select-cust_location.html', + 'cgi' => $cgi, + 'cust_main' => $cust_main, + ) + %> + +% } Contract end date @@ -101,16 +121,28 @@ -<% include( '/elements/standardize_locations.html', - 'form' => "OrderPkgForm", - 'onlyship' => 1, - 'no_company' => 1, - 'callback' => 'document.OrderPkgForm.submit();', - ) -%> +% unless ( $cgi->param('lock_locationnum') ) { + + <% include( '/elements/standardize_locations.html', + 'form' => "OrderPkgForm", + 'onlyship' => 1, + 'no_company' => 1, + 'callback' => 'document.OrderPkgForm.submit();', + ) + %> + +% }
-> +% my $onclick = $cgi->param('lock_locationnum') +% ? 'document.OrderPkgForm.submit()' +% : 'standardize_locations()'; + +>
@@ -133,7 +165,17 @@ my $cust_main = qsearchs({ '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 @@ if( ! $conf->exists('order_pkg-no_start_date') ) { $start_date = $start_date ? time2str($format, $start_date) : ''; } -my $svcpart = $cgi->param('svcpart'); +my $svcpart = scalar($cgi->param('svcpart')); -- cgit v1.2.1