From df4a30e2813c3be288747cd2a5fa2fa3ed15a248 Mon Sep 17 00:00:00 2001 From: jeff Date: Tue, 24 Oct 2006 18:26:38 +0000 Subject: [PATCH] add customer signup date --- FS/FS/Schema.pm | 3 ++- FS/FS/cust_main.pm | 3 +++ httemplate/view/cust_main/misc.html | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) 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 @@ <% $cust_main->otaker %> + + Signup Date + <% $cust_main->signupdate ? time2str($date_format, $cust_main->signupdate) : '' %> + + % if ( $conf->exists('cust_main-enable_birthdate') ) { -- 2.11.0