summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjeff <jeff>2006-10-24 18:26:38 +0000
committerjeff <jeff>2006-10-24 18:26:38 +0000
commitdf4a30e2813c3be288747cd2a5fa2fa3ed15a248 (patch)
tree1810f69b95bd2b624a74988132421399163f04b2
parent221ab7ff23a7d18668f589a4382780b00b351f12 (diff)
add customer signup date
-rw-r--r--FS/FS/Schema.pm3
-rw-r--r--FS/FS/cust_main.pm3
-rw-r--r--httemplate/view/cust_main/misc.html5
3 files changed, 10 insertions, 1 deletions
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index d6725fc5f..99f88735a 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -408,7 +408,8 @@ sub tables_hashref {
# 'middle', 'varchar', 'NULL', $char_d, '', '',
'first', 'varchar', '', $char_d, '', '',
'ss', 'varchar', 'NULL', 11, '', '',
- 'birthdate',@date_type, '', '',
+ 'birthdate' ,@date_type, '', '',
+ 'signupdate',@date_type, '', '',
'company', 'varchar', 'NULL', $char_d, '', '',
'address1', 'varchar', '', $char_d, '', '',
'address2', 'varchar', 'NULL', $char_d, '', '',
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index 153fc63e1..febeb13f5 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -397,6 +397,8 @@ sub insert {
warn " inserting $self\n"
if $DEBUG > 1;
+ $self->signupdate(time) unless $self->signupdate;
+
my $error = $self->SUPER::insert;
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
@@ -1210,6 +1212,7 @@ sub check {
|| $self->ut_name('last')
|| $self->ut_name('first')
|| $self->ut_snumbern('birthdate')
+ || $self->ut_snumbern('signupdate')
|| $self->ut_textn('company')
|| $self->ut_text('address1')
|| $self->ut_textn('address2')
diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html
index fdc5ba4ea..414ef44a8 100644
--- a/httemplate/view/cust_main/misc.html
+++ b/httemplate/view/cust_main/misc.html
@@ -91,6 +91,11 @@
<TD BGCOLOR="#ffffff"><% $cust_main->otaker %></TD>
</TR>
+ <TR>
+ <TD ALIGN="right">Signup Date</TD>
+ <TD BGCOLOR="#ffffff"><% $cust_main->signupdate ? time2str($date_format, $cust_main->signupdate) : '' %></TD>
+ </TR>
+
% if ( $conf->exists('cust_main-enable_birthdate') ) {
<TR>