X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fchange_pkg.cgi;h=243da93089c47b004c819aa0733bc54d840e7da4;hb=5847b9f9d69019e8c254da74b484e2b55f1507a1;hp=8f0067d2d19254805a2c4c79bb54ab6d5da746a1;hpb=b5c4237a34aef94976bc343c8d9e138664fc3984;p=freeside.git diff --git a/httemplate/misc/change_pkg.cgi b/httemplate/misc/change_pkg.cgi index 8f0067d2d..243da9308 100755 --- a/httemplate/misc/change_pkg.cgi +++ b/httemplate/misc/change_pkg.cgi @@ -1,52 +1,124 @@ -<% include('/elements/header-popup.html', "Change Package") %> +<& /elements/header-popup.html, mt($title) &> - -<% include('/elements/error.html') %> +<& /elements/error.html &>
@@ -80,4 +152,20 @@ my $cust_main = $cust_pkg->cust_main 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); + $cgi->param('delay', 1); + 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>