X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Forder_pkg.html;h=4f511cc36c51d97b0a2c0edf3562cecc543d7ef5;hb=be40a9fa3750374b32f2aa31e8807433c05d7817;hp=b232debd7baa139c54b4e1ed1f634689655fdc6e;hpb=29472410e3b882a6a6b74fe48d28db411fe8fcff;p=freeside.git diff --git a/httemplate/misc/order_pkg.html b/httemplate/misc/order_pkg.html index b232debd7..4f511cc36 100644 --- a/httemplate/misc/order_pkg.html +++ b/httemplate/misc/order_pkg.html @@ -5,38 +5,34 @@ - + <% include('/elements/error.html') %>
+ +% 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 @@ -68,6 +64,13 @@ %> % } +% if ( $curuser->access_right('Waive setup fee') ) { + + Waive setup fee + + +% } + % if ( $conf->exists('pkg_referral') ) { <% include('/elements/tr-select-part_referral.html', 'curr_value' => scalar( $cgi->param('refnum') ), #get rid of empty_label first# || $cust_main->refnum, @@ -78,11 +81,23 @@ %> % } -<% 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 +113,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_new_location()'; + +>
@@ -130,7 +157,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 +176,6 @@ if( ! $conf->exists('order_pkg-no_start_date') ) { $start_date = $start_date ? time2str($format, $start_date) : ''; } +my $svcpart = scalar($cgi->param('svcpart')); +