diff options
Diffstat (limited to 'httemplate/misc')
| -rw-r--r-- | httemplate/misc/cust-part_pkg.cgi | 10 | ||||
| -rw-r--r-- | httemplate/misc/order_pkg.html | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/httemplate/misc/cust-part_pkg.cgi b/httemplate/misc/cust-part_pkg.cgi index dcd033ff2..4662be15e 100644 --- a/httemplate/misc/cust-part_pkg.cgi +++ b/httemplate/misc/cust-part_pkg.cgi @@ -23,12 +23,18 @@ my @part_pkg = qsearch({ 'order_by' => 'ORDER BY pkg', }); -my @return = map { warn $_->can_start_date; +my $date_format = FS::Conf->new->config('date_format') || '%m/%d/%Y'; + +my @return = map { + my $start_date = $_->default_start_date($cust_main); + $start_date = time2str($date_format, $start_date) + if $start_date; ( $_->pkgpart, $_->pkg_comment, $_->can_discount, $_->can_start_date, - ); + $start_date, + ) } #sort { $a->pkg_comment cmp $b->pkg_comment } @part_pkg; diff --git a/httemplate/misc/order_pkg.html b/httemplate/misc/order_pkg.html index 2332f2028..f174dd913 100644 --- a/httemplate/misc/order_pkg.html +++ b/httemplate/misc/order_pkg.html @@ -38,9 +38,12 @@ <& /elements/input-date-field.html,{ 'name' => 'start_date', 'format' => $date_format, - 'value' => $start_date, + 'value' => '', 'noinit' => 1, } &> + <IMG SRC = "<%$fsurl%>images/calendar-disabled.png" + ID = "start_date_button_disabled" + STYLE = "display:none"> <FONT SIZE=-1>(<% mt('leave blank to start immediately') |h %>)</FONT> </TD> </TR> @@ -164,11 +167,6 @@ if ( $cgi->param('lock_pkgpart') ) { my $pkgpart = $part_pkg ? $part_pkg->pkgpart : scalar($cgi->param('pkgpart')); my $format = $date_format. ' %T %z (%Z)'; #false laziness w/REAL_cust_pkg.cgi? -my $start_date = ''; -if( ! $conf->exists('order_pkg-no_start_date') ) { - $start_date = $cust_main->next_bill_date; - $start_date = $start_date ? time2str($format, $start_date) : ''; -} my $svcpart = scalar($cgi->param('svcpart')); |
