diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2015-06-15 23:37:48 -0500 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2015-06-15 23:37:48 -0500 |
commit | 8f82d54c3b3bd30c8f8451ea24bcdab70ff37327 (patch) | |
tree | 20a6265c2cd7b6ec40d9aa0ddcde8ec22a1c8cde /httemplate/misc/change_pkg.cgi | |
parent | d2e0e83c3cb0caf1d1a958eee1717934e8b5176f (diff) |
RT#30705 Change contract end date when changing packages
Diffstat (limited to 'httemplate/misc/change_pkg.cgi')
-rwxr-xr-x | httemplate/misc/change_pkg.cgi | 13 |
1 files changed, 13 insertions, 0 deletions
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' => '<B>Contract End</B>', + } &> +% } + </TABLE> <BR> @@ -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"; } </%init> |