[freeside-commits] freeside/FS/FS Schema.pm, 1.276, 1.277 prospect_main.pm, 1.3, 1.4
Ivan,,,
ivan at wavetail.420.am
Sun Mar 20 17:55:14 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv9432/FS/FS
Modified Files:
Schema.pm prospect_main.pm
Log Message:
residential prospects, RT#7111
Index: Schema.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Schema.pm,v
retrieving revision 1.276
retrieving revision 1.277
diff -u -w -d -r1.276 -r1.277
--- Schema.pm 19 Mar 2011 02:00:07 -0000 1.276
+++ Schema.pm 21 Mar 2011 00:55:11 -0000 1.277
@@ -982,12 +982,14 @@
'columns' => [
'prospectnum', 'serial', '', '', '', '',
'agentnum', 'int', '', '', '', '',
- 'company', 'varchar', '', $char_d, '', '',
- #'disabled', 'char', 'NULL', 1, '', '',
+ 'company', 'varchar', 'NULL', $char_d, '', '',
+ 'add_date', @date_type, '', '',
+ 'disabled', 'char', 'NULL', 1, '', '',
+ 'custnum', 'int', 'NULL', '', '', '',
],
'primary_key' => 'prospectnum',
'unique' => [],
- 'index' => [ [ 'company' ], [ 'agentnum' ], ],
+ 'index' => [ [ 'company' ], [ 'agentnum' ], [ 'disabled' ] ],
},
#eventually use for billing & ship from cust_main too
Index: prospect_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/prospect_main.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- prospect_main.pm 13 Mar 2011 19:45:37 -0000 1.3
+++ prospect_main.pm 21 Mar 2011 00:55:12 -0000 1.4
@@ -203,7 +203,7 @@
my $error =
$self->ut_numbern('prospectnum')
|| $self->ut_foreign_key('agentnum', 'agent', 'agentnum' )
- || $self->ut_text('company')
+ || $self->ut_textn('company')
;
return $error if $error;
@@ -216,7 +216,12 @@
sub name {
my $self = shift;
- $self->company; #at least until this is nullable
+ return $self->company if $self->company;
+
+ my $contact = ($self->contact)[0]; #first contact? good enough for now
+ return $contact->line if $contact;
+
+ $self->prospectnum;
}
=item contact
More information about the freeside-commits
mailing list