X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fchange_pkg.cgi;h=e3ef4b7a85ed6bffd60194ed3ebde527151f9aec;hb=64aec88c35418b8c630811cdf5afb19b2a1c4299;hp=e74747e8210f2d4c3868ef675379cd7156a8c3b3;hpb=8f82d54c3b3bd30c8f8451ea24bcdab70ff37327;p=freeside.git
diff --git a/httemplate/misc/change_pkg.cgi b/httemplate/misc/change_pkg.cgi
index e74747e82..e3ef4b7a8 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();
@@ -96,7 +108,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' %>
>