diff options
author | ivan <ivan> | 2002-02-26 11:30:25 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-02-26 11:30:25 +0000 |
commit | 1fdd857c556d4e6ee7e2b577085ede891dd41506 (patch) | |
tree | d87bf74ee3a665fe370062a167113709c95010d8 | |
parent | 69044f612f6e9695b52fa922df0de0ea957fcafd (diff) |
fix nasty logic error triggered by changing a ship_ field from something TO
identical to the corresponding non-ship_ field. ouch.
-rw-r--r-- | FS/FS/cust_main.pm | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index e0796f4f1..125332c9d 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -512,6 +512,8 @@ and repalce methods. sub check { my $self = shift; + warn "BEFORE: \n". $self->_dump; + my $error = $self->ut_numbern('custnum') || $self->ut_number('agentnum') @@ -553,7 +555,9 @@ sub check { $self->ss("$1-$2-$3"); } - unless ( $import ) { + +# bad idea to disable, causes billing to fail because of no tax rates later +# unless ( $import ) { unless ( qsearchs('cust_main_county', { 'country' => $self->country, 'state' => '', @@ -566,7 +570,7 @@ sub check { 'country' => $self->country, } ); } - } +# } $error = $self->ut_phonen('daytime', $self->country) @@ -583,7 +587,7 @@ sub check { if ( defined $self->dbdef_table->column('ship_last') ) { if ( grep { $self->getfield($_) ne $self->getfield("ship_$_") } @addfields - && grep $self->getfield("ship_$_"), grep $_ ne 'state', @addfields + && grep { $self->getfield("ship_$_") ne '' } @addfields ) { my $error = @@ -694,6 +698,8 @@ sub check { $self->otaker(getotaker); + warn "AFTER: \n". $self->_dump; + ''; #no error } |