X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Fchange_pkg.cgi;h=e74747e8210f2d4c3868ef675379cd7156a8c3b3;hp=1b4a94e81ea74814237c3ebe7272fa9b3c5bea81;hb=a3696f50ea05e5b8f87c24c5298fc35bee03fc75;hpb=9313346347265c5a1ad3e1da8f2fcbb965a9d6cd diff --git a/httemplate/misc/change_pkg.cgi b/httemplate/misc/change_pkg.cgi index 1b4a94e81..e74747e82 100755 --- a/httemplate/misc/change_pkg.cgi +++ b/httemplate/misc/change_pkg.cgi @@ -28,6 +28,14 @@ 'curr_value' => $cust_pkg->quantity &> +% if ($use_contract_end) { + <& /elements/tr-input-date-field.html, { + 'name' => 'contract_end', + 'value' => ($cgi->param('contract_end') || $cust_pkg->get('contract_end')), + 'label' => 'Contract End', + } &> +% } +
@@ -124,6 +132,8 @@ my $part_pkg = $cust_pkg->part_pkg; my $title = "Change Package"; +my $use_contract_end = $cust_pkg->get('contract_end') ? 1 : 0; + # if there's already a package change ordered, preload it if ( $cust_pkg->change_to_pkgnum ) { my $change_to = FS::cust_pkg->by_key($cust_pkg->change_to_pkgnum); @@ -131,6 +141,9 @@ if ( $cust_pkg->change_to_pkgnum ) { foreach(qw( start_date pkgpart locationnum quantity )) { $cgi->param($_, $change_to->get($_)); } + if ($use_contract_end) { + $cgi->param('contract_end', $change_to->get('contract_end')); + } $title = "Edit Scheduled Package Change"; }