import torrus 1.0.9
[freeside.git] / httemplate / edit / process / cust_main.cgi
index f72ca0a..24cecea 100755 (executable)
@@ -73,6 +73,12 @@ if ( defined($cgi->param('same')) && $cgi->param('same') eq "Y" ) {
   );
 }
 
+if ( $cgi->param('no_credit_limit') ) {
+  $new->setfield('credit_limit', '');
+}
+
+$new->tagnum( [ $cgi->param('tagnum') ] );
+
 my %usedatetime = ( 'birthdate' => 1 );
 
 foreach my $dfield (qw( birthdate signupdate )) {
@@ -98,7 +104,7 @@ foreach my $dfield (qw( birthdate signupdate )) {
 
     } else {
 
-      $parsed = str2time($value)
+      $parsed = parse_datetime($value)
         or $error ||= "Invalid $dfield: $value";
 
     }
@@ -245,6 +251,11 @@ if ( $new->custnum eq '' ) {
     $new->payinfo($new_account.'@'.$new_aba);
   }
 
+  if ( ! $conf->exists('cust_main-edit_signupdate') or
+       ! $new->signupdate ) {
+    $new->signupdate($old->signupdate);
+  }
+
   warn "$me calling $new -> replace( $old, \ @invoicing_list )" if $DEBUG;
   local($FS::cust_main::DEBUG) = $DEBUG if $DEBUG;
   local($FS::Record::DEBUG)    = $DEBUG if $DEBUG;