X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fchange_pkg.cgi;h=323784554c8eae3ed3f4db2905049da509e9d2a9;hb=5f2c3a88d92952d13a5231a230e332e1a8e94016;hp=e74747e8210f2d4c3868ef675379cd7156a8c3b3;hpb=8f82d54c3b3bd30c8f8451ea24bcdab70ff37327;p=freeside.git
diff --git a/httemplate/misc/change_pkg.cgi b/httemplate/misc/change_pkg.cgi
index e74747e82..323784554 100755
--- a/httemplate/misc/change_pkg.cgi
+++ b/httemplate/misc/change_pkg.cgi
@@ -19,13 +19,13 @@
<& /elements/tr-select-cust-part_pkg.html,
'pre_label' => emt('New'),
- 'curr_value' => scalar($cgi->param('pkgpart')),
+ 'curr_value' => scalar($cgi->param('pkgpart')) || $cust_pkg->pkgpart,
'classnum' => $part_pkg->classnum,
'cust_main' => $cust_main,
&>
<& /elements/tr-input-pkg-quantity.html,
- 'curr_value' => $cust_pkg->quantity
+ 'curr_value' => scalar($cgi->param('quantity')) || $cust_pkg->quantity
&>
% if ($use_contract_end) {
@@ -39,6 +39,10 @@
+<& /elements/table-cust_pkg_usageprice.html,
+ 'pkgpart' => (scalar($cgi->param('pkgpart')) || $cust_pkg->pkgpart),
+ 'pkgnum' => ($cust_pkg->change_to_pkgnum || $pkgnum),
+&>
<% mt('Change') |h %>
<% ntable('#cccccc') %>
@@ -49,8 +53,16 @@
document.getElementById('start_date_text').disabled = !enable;
document.getElementById('start_date_button').style.display =
(enable ? '' : 'none');
- document.getElementById('start_date_button_disabled').style.display =
- (enable ? 'none' : '');
+ if (document.getElementById('start_date_button_disabled')) { // does this ever exist anymore?
+ document.getElementById('start_date_button_disabled').style.display =
+ (enable ? 'none' : '');
+ }
+ if (enable) {
+ usageprice_disable(1);
+ } else {
+ var form = document.OrderPkgForm;
+ usageprice_disable(0,form.pkgpart.options[form.pkgpart.selectedIndex].value);
+ }
}
<&| /elements/onload.js &>
delay_changed();
@@ -72,6 +84,16 @@
+% my $discount_cust_pkg = $curuser->access_right('Discount customer package');
+% my $waive_setup_fee = $curuser->access_right('Waive setup fee');
+%
+% if ( $discount_cust_pkg || $waive_setup_fee ) {
+ <% mt('Discounting') |h %>
+ <% ntable("#cccccc") %>
+ <& /elements/tr-select-pkg-discount.html, disable_recur => 1, &>
+
+
+% }
<% mt('Location') |h %>
<% ntable('#cccccc') %>
@@ -96,7 +118,7 @@
TYPE = "button"
VALUE = "<% mt("Change package") |h %>"
onClick = "this.disabled=true; standardize_new_location();"
- <% scalar($cgi->param('pkgpart')) ? '' : 'DISABLED' %>
+ <% #scalar($cgi->param('pkgpart')) ? '' : 'DISABLED' %>
>