X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2FREAL_cust_pkg.cgi;h=170281ba0e5b98bdbff10e94128aa39fab0f31a9;hp=18d4415c6d63db3c3052afa153df829b80bb8bce;hb=9324c64e784a866c4d615773c8ce5970cc0d6ed8;hpb=06a85a88bfdb0d3fc79ee055eb8327658dfe63ab diff --git a/httemplate/edit/REAL_cust_pkg.cgi b/httemplate/edit/REAL_cust_pkg.cgi index 18d4415c6..170281ba0 100755 --- a/httemplate/edit/REAL_cust_pkg.cgi +++ b/httemplate/edit/REAL_cust_pkg.cgi @@ -46,6 +46,7 @@ <% $cust_pkg->otaker %> + <& .row_display, cust_pkg=>$cust_pkg, column=>'order_date', label=>'Order' &> % if ( $cust_pkg->setup && ! $cust_pkg->start_date ) { <& .row_display, cust_pkg=>$cust_pkg, column=>'start_date', label=>'Start' &> % } else { @@ -55,12 +56,16 @@ <& .row_edit, cust_pkg=>$cust_pkg, column=>'setup', label=>'Setup' &> <& .row_edit, cust_pkg=>$cust_pkg, column=>'last_bill', label=>$last_bill_or_renewed &> <& .row_edit, cust_pkg=>$cust_pkg, column=>'bill', label=>$next_bill_or_prepaid_until &> - <& .row_display, cust_pkg=>$cust_pkg, column=>'adjourn', label=>'Adjournment', note=>'(will suspend this package when the date is reached)' &> - <& .row_display, cust_pkg=>$cust_pkg, column=>'susp', label=>'Suspension' &> +%#if ( $cust_pkg->contract_end or $part_pkg->option('contract_end_months',1) ) { + <& .row_edit, cust_pkg=>$cust_pkg, column=>'contract_end',label=>'Contract end' &> +%#} + <& .row_display, cust_pkg=>$cust_pkg, column=>'adjourn', label=>'Adjournment', note=>'(will suspend this package when the date is reached)' &> + <& .row_display, cust_pkg=>$cust_pkg, column=>'susp', label=>'Suspension' &> <& .row_display, cust_pkg=>$cust_pkg, column=>'expire', label=>'Expiration', note=>'(will cancel this package when the date is reached)' &> <& .row_display, cust_pkg=>$cust_pkg, column=>'cancel', label=>'Cancellation' &> + <%def .row_edit> <%args> $cust_pkg @@ -124,20 +129,23 @@
- + <% include('/elements/footer.html') %> +<%shared> + +my $conf = new FS::Conf; +my $date_format = $conf->config('date_format') || '%m/%d/%Y'; +my $format = $date_format. ' %T'; # %z (%Z)'; + + <%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Edit customer package dates'); -my $conf = new FS::Conf; -my $date_format = $conf->config('date_format') || '%m/%d/%Y'; - -my $format = $date_format. ' %T %z (%Z)'; my $error = ''; my( $pkgnum, $cust_pkg ); @@ -184,9 +192,9 @@ if ( $cgi->param('error') ) { $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); die "No package!" unless $cust_pkg; - foreach my $col (qw( setup last_bill bill adjourn expire )) { + foreach my $col (qw( start_date setup last_bill bill adjourn expire )) { my $value = $cgi->param($col); - $cust_pkg->set( $col, $value ? str2time($value) : '' ); + $cust_pkg->set( $col, $value ? parse_datetime($value) : '' ); } } else {