X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fchange_pkg.cgi;h=923be71b141e7589c20b6335bdc4d46a2a46237d;hb=98ea745e4b55a38ad8b5ba3749c56327d641d65d;hp=03e336cba070460d339b7d34626ddab0c5ebe1a0;hpb=3d0a1bb06b895c5be6e3f0517d355442a6b1e125;p=freeside.git diff --git a/httemplate/misc/change_pkg.cgi b/httemplate/misc/change_pkg.cgi index 03e336cba..923be71b1 100755 --- a/httemplate/misc/change_pkg.cgi +++ b/httemplate/misc/change_pkg.cgi @@ -1,7 +1,6 @@ -<& /elements/header-popup.html, mt("Change Package") &> +<& /elements/header-popup.html, mt($title) &> - <& /elements/error.html &>
@@ -23,6 +22,10 @@ 'cust_main' => $cust_main, &> + <& /elements/tr-input-pkg-quantity.html, + 'curr_value' => $cust_pkg->quantity + &> + <& /elements/tr-select-cust_location.html, 'cgi' => $cgi, 'cust_main' => $cust_main, @@ -30,6 +33,21 @@ + + + + + + +
Apply this change: param('delay') ? 'CHECKED' : '' %>> now param('delay') ? 'CHECKED' : '' %>> in the future + <& /elements/input-date-field.html, { + 'name' => 'start_date', + 'value' => ($cgi->param('start_date') || $cust_main->next_bill_date), + } &> +
+ <& /elements/standardize_locations.html, 'form' => "OrderPkgForm", 'callback' => 'document.OrderPkgForm.submit();', @@ -74,4 +92,15 @@ my $cust_main = $cust_pkg->cust_main my $part_pkg = $cust_pkg->part_pkg; +my $title = "Change Package"; + +# 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($_)); + } + $title = "Edit Scheduled Package Change"; +}