X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2FREAL_cust_pkg.cgi;h=99e911ae5999fb39c6a0892de03e766a12a3c2a5;hb=63973c641c4be00765fa27e55c57cc5b9aa4da19;hp=fea85456f540212e1b26946d9f7ce162700e50aa;hpb=5e05724a635a22776f1b973f5d7e77989da4e048;p=freeside.git diff --git a/httemplate/edit/REAL_cust_pkg.cgi b/httemplate/edit/REAL_cust_pkg.cgi index fea85456f..99e911ae5 100755 --- a/httemplate/edit/REAL_cust_pkg.cgi +++ b/httemplate/edit/REAL_cust_pkg.cgi @@ -9,6 +9,29 @@ +
<% include('/elements/footer.html') %> +<%shared> -<%once> +my $conf = new FS::Conf; +my $date_format = $conf->config('date_format') || '%m/%d/%Y'; -#my $format = "%c %z (%Z)"; -my $format = "%m/%d/%Y %T %z (%Z)"; +my $format = $date_format. ' %T'; # %z (%Z)'; -#false laziness w/view/cust_main/packages.html -#my( $billed_or_prepaid, - -%once> +%shared> <%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Edit customer package dates'); + my $error = ''; my( $pkgnum, $cust_pkg ); if ( $cgi->param('error') ) { $pkgnum = $cgi->param('pkgnum'); - if ( $cgi->param('error') eq '_bill_areyousure' ) { - if ( $cgi->param('bill') =~ /^([\s\d\/\:\-\(\w\)]*)$/ ) { - my $bill = $1; - $cgi->param('error', ''); - $error = "You are attempting to set the next bill date to $bill, which is - in the past. This will charge the customer for the interval - from $bill until now. Are you sure you want to do this? ". - ''; - } + + if ( $cgi->param('error') =~ /^_/ ) { + + my @errors = (); + my %errors = map { $_=>1 } split(',', $cgi->param('error')); + $cgi->param('error', ''); + $error = join('