X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2FREAL_cust_pkg.cgi;h=77ab1fe67069b16785f1f968281475df9dcc9db3;hp=18d4415c6d63db3c3052afa153df829b80bb8bce;hb=37591b61f8ad6fc5c5acb2fd8f520d2dbe4f1539;hpb=06a85a88bfdb0d3fc79ee055eb8327658dfe63ab diff --git a/httemplate/edit/REAL_cust_pkg.cgi b/httemplate/edit/REAL_cust_pkg.cgi index 18d4415c6..77ab1fe67 100755 --- a/httemplate/edit/REAL_cust_pkg.cgi +++ b/httemplate/edit/REAL_cust_pkg.cgi @@ -128,16 +128,19 @@ <% 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 +187,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 {