diff options
Diffstat (limited to 'httemplate/edit')
| -rwxr-xr-x | httemplate/edit/REAL_cust_pkg.cgi | 4 | ||||
| -rwxr-xr-x | httemplate/edit/cust_pay.cgi | 2 | ||||
| -rwxr-xr-x | httemplate/edit/process/REAL_cust_pkg.cgi | 10 | ||||
| -rwxr-xr-x | httemplate/edit/process/cust_main.cgi | 2 | ||||
| -rwxr-xr-x | httemplate/edit/process/cust_pay.cgi | 2 | ||||
| -rw-r--r-- | httemplate/edit/process/quick-charge.cgi | 2 | ||||
| -rw-r--r-- | httemplate/edit/process/quick-cust_pkg.cgi | 2 | 
7 files changed, 9 insertions, 15 deletions
| diff --git a/httemplate/edit/REAL_cust_pkg.cgi b/httemplate/edit/REAL_cust_pkg.cgi index 29c8ca63f..77ab1fe67 100755 --- a/httemplate/edit/REAL_cust_pkg.cgi +++ b/httemplate/edit/REAL_cust_pkg.cgi @@ -187,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 { diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index a6b73b13a..cc4ec605d 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -113,7 +113,7 @@ if ( $cgi->param('error') ) {    $paid     = $cgi->param('paid');    $payby    = $cgi->param('payby');    $payinfo  = $cgi->param('payinfo'); -  $_date    = $cgi->param('_date') ? str2time($cgi->param('_date')) : time; +  $_date    = $cgi->param('_date') ? parse_datetime($cgi->param('_date')) : time;  } elsif ( $cgi->param('custnum') =~ /^(\d+)$/ ) {    $link     = $cgi->param('popup') ? 'popup' : 'custnum';    $linknum  = $1; diff --git a/httemplate/edit/process/REAL_cust_pkg.cgi b/httemplate/edit/process/REAL_cust_pkg.cgi index b5796ebf5..570f0e031 100755 --- a/httemplate/edit/process/REAL_cust_pkg.cgi +++ b/httemplate/edit/process/REAL_cust_pkg.cgi @@ -19,13 +19,8 @@ die "access denied"  my $pkgnum = $cgi->param('pkgnum') or die;  my $old = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});  my %hash = $old->hash; -$hash{'start_date'} = $cgi->param('start_date') ? str2time($cgi->param('start_date')) : ''; -$hash{'setup'} = $cgi->param('setup') ? str2time($cgi->param('setup')) : ''; -$hash{'bill'} = $cgi->param('bill') ? str2time($cgi->param('bill')) : ''; -$hash{'last_bill'} = -  $cgi->param('last_bill') ? str2time($cgi->param('last_bill')) : ''; -$hash{'adjourn'} = $cgi->param('adjourn') ? str2time($cgi->param('adjourn')) : ''; -$hash{'expire'} = $cgi->param('expire') ? str2time($cgi->param('expire')) : ''; +$hash{$_}= $cgi->param($_) ? parse_datetime($cgi->param($_)) : '' +  foreach qw( start_date setup bill last_bill adjourn expire );  my @errors = (); @@ -47,7 +42,6 @@ my $error;  if ( @errors ) {    $error = join(',', @errors);  } else { -  warn join(',',%hash);    $new = new FS::cust_pkg \%hash;    $error = $new->replace($old);  } diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index f72ca0a81..1311ba4f3 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -98,7 +98,7 @@ foreach my $dfield (qw( birthdate signupdate )) {      } else { -      $parsed = str2time($value) +      $parsed = parse_datetime($value)          or $error ||= "Invalid $dfield: $value";      } diff --git a/httemplate/edit/process/cust_pay.cgi b/httemplate/edit/process/cust_pay.cgi index a310c5306..df506c677 100755 --- a/httemplate/edit/process/cust_pay.cgi +++ b/httemplate/edit/process/cust_pay.cgi @@ -39,7 +39,7 @@ $cgi->param('link') =~ /^(custnum|invnum|popup)$/  my $field = my $link = $1;  $field = 'custnum' if $field eq 'popup'; -my $_date = str2time($cgi->param('_date')); +my $_date = parse_datetime($cgi->param('_date'));  my $new = new FS::cust_pay ( {    $field => $linknum, diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi index 27921b8c3..484f6fcc6 100644 --- a/httemplate/edit/process/quick-charge.cgi +++ b/httemplate/edit/process/quick-charge.cgi @@ -58,7 +58,7 @@ unless ( $error ) {      'bill_now'      => scalar($cgi->param('bill_now')),      'invoice_terms' => scalar($cgi->param('invoice_terms')),      'start_date'    => ( scalar($cgi->param('start_date')) -                           ? str2time($cgi->param('start_date')) +                           ? parse_datetime($cgi->param('start_date'))                             : ''                         ),      'no_auto'       => scalar($cgi->param('no_auto')), diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index 202d0a3cf..2fde17f5e 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -54,7 +54,7 @@ my $cust_pkg = new FS::cust_pkg {    'custnum'              => $custnum,    'pkgpart'              => $pkgpart,    'start_date'           => ( scalar($cgi->param('start_date')) -                                ? str2time($cgi->param('start_date')) +                                ? parse_datetime($cgi->param('start_date'))                                  : ''                              ),    'no_auto'              => scalar($cgi->param('no_auto')), | 
