summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2001-08-11 05:52:15 +0000
committerivan <ivan>2001-08-11 05:52:15 +0000
commit6f36d35b9db86ad5b9e42edc27c14b14444771a5 (patch)
tree48da44077673ede6a2210f58c3df73ec37dba29a
parent251030ed112d091a77a71299043cf46d88914bc5 (diff)
add comments field, fix ship_ address handling (don't consider a value for
ship_state field to mean something meaningful is in ship_*)
-rw-r--r--FS/FS/cust_main.pm17
1 files changed, 12 insertions, 5 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index e6b7531c4..eb265820f 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -187,6 +187,8 @@ FS::Record. The following fields are currently supported:
=item otaker - order taker (assigned automatically, see L<FS::UID>)
+=item comments - comments (optional)
+
=back
=head1 METHODS
@@ -420,6 +422,7 @@ sub check {
|| $self->ut_text('city')
|| $self->ut_textn('county')
|| $self->ut_textn('state')
+ || $self->ut_anything('comments')
;
#barf. need message catalogs. i18n. etc.
$error .= "Please select a referral."
@@ -465,11 +468,15 @@ sub check {
;
return $error if $error;
+ my @addfields = qw(
+ last first company address1 address2 city county state zip
+ country daytime night fax
+ );
+
if ( defined $self->dbdef_table->column('ship_last') ) {
- if ( grep { $self->getfield($_) ne $self->getfield("ship_$_") }
- qw( last first company address1 address2 city county state zip
- country daytime night fax )
- ) # if any address fields differ
+ if ( grep { $self->getfield($_) ne $self->getfield("ship_$_") } @addfields
+ && grep $self->getfield("ship_$_"), grep $_ ne 'state', @addfields
+ )
{
my $error =
$self->ut_name('ship_last')
@@ -1193,7 +1200,7 @@ sub check_invoicing_list {
=head1 VERSION
-$Id: cust_main.pm,v 1.15 2001-07-30 10:41:44 ivan Exp $
+$Id: cust_main.pm,v 1.16 2001-08-11 05:52:15 ivan Exp $
=head1 BUGS