X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fmisc%2Fchange_pkg.cgi;h=e74747e8210f2d4c3868ef675379cd7156a8c3b3;hb=dd268209494ce9fc3491d02b8c3034a7dffc84e4;hp=887fa014a892def759fed3f54d86c807b2434f6e;hpb=7be7baeebee74dab20d5a0a63f7066094c47519b;p=freeside.git diff --git a/httemplate/misc/change_pkg.cgi b/httemplate/misc/change_pkg.cgi index 887fa014a..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', + } &> +% } +
@@ -35,12 +43,26 @@ <% mt('Change') |h %> <% ntable('#cccccc') %> + - param('delay') ? 'CHECKED' : '' %>> Now + <% !$cgi->param('delay') ? 'CHECKED' : '' %> \ + onclick="delay_changed()"> Now param('delay') ? 'CHECKED' : '' %>> In the future + <% $cgi->param('delay') ? 'CHECKED' : '' %> \ + onclick="delay_changed()"> In the future <& /elements/input-date-field.html, { 'name' => 'start_date', 'value' => ($cgi->param('start_date') || $cust_main->next_bill_date), @@ -64,8 +86,10 @@ <& /elements/standardize_locations.html, - 'form' => "OrderPkgForm", - 'callback' => 'document.OrderPkgForm.submit();', + 'form' => "OrderPkgForm", + 'with_census' => 1, + 'with_census_functions' => 1, + 'callback' => 'document.OrderPkgForm.submit()', &> 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); @@ -115,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"; }