X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Forder_pkg.html;h=17c56055e09f3d3f638a4853fb1c9e4e74920304;hb=e0a26680d75fc2000bde195eba7946805a3aaa28;hp=b232debd7baa139c54b4e1ed1f634689655fdc6e;hpb=29472410e3b882a6a6b74fe48d28db411fe8fcff;p=freeside.git diff --git a/httemplate/misc/order_pkg.html b/httemplate/misc/order_pkg.html index b232debd7..17c56055e 100644 --- a/httemplate/misc/order_pkg.html +++ b/httemplate/misc/order_pkg.html @@ -28,15 +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 @@ -78,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 @@ -98,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()'; + +>
@@ -130,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 = ''; @@ -139,4 +184,6 @@ if( ! $conf->exists('order_pkg-no_start_date') ) { $start_date = $start_date ? time2str($format, $start_date) : ''; } +my $svcpart = scalar($cgi->param('svcpart')); +