X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fmisc%2Fchange_pkg.cgi;h=e3ef4b7a85ed6bffd60194ed3ebde527151f9aec;hb=ae2ce7f3fc2a0fe00f05145ce64e8b6b8c034631;hp=7425fbfaf2bd7e41734fe9cb64fcec4aa1744d65;hpb=2c62268f304f1ec6e8baf89043eb1bd1197bb9a6;p=freeside.git diff --git a/httemplate/misc/change_pkg.cgi b/httemplate/misc/change_pkg.cgi index 7425fbfaf..e3ef4b7a8 100755 --- a/httemplate/misc/change_pkg.cgi +++ b/httemplate/misc/change_pkg.cgi @@ -6,55 +6,109 @@
@@ -90,13 +144,18 @@ 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 )) { + 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>