},
{
+ 'key' => 'cust_main-enable_anniversary_date',
+ 'section' => 'UI',
+ 'description' => 'Enable tracking of an anniversary date with each customer record',
+ 'type' => 'checkbox',
+ },
+
+ {
'key' => 'cust_main-edit_calling_list_exempt',
'section' => 'UI',
'description' => 'Display the "calling_list_exempt" checkbox on customer edit.',
'stateid_state', 'varchar', 'NULL', $char_d, '', '',
'birthdate' ,@date_type, '', '',
'spouse_birthdate' ,@date_type, '', '',
+ 'anniversary_date' ,@date_type, '', '',
'signupdate',@date_type, '', '',
'dundate', @date_type, '', '',
'company', 'varchar', 'NULL', $char_d, '', '',
|| $self->ut_textn('custbatch')
|| $self->ut_name('last')
|| $self->ut_name('first')
- || $self->ut_snumbern('birthdate')
|| $self->ut_snumbern('signupdate')
+ || $self->ut_snumbern('birthdate')
+ || $self->ut_snumbern('spouse_birthdate')
+ || $self->ut_snumbern('anniversary_date')
|| $self->ut_textn('company')
|| $self->ut_anything('comments')
|| $self->ut_numbern('referral_custnum')
}
$cust_main{$_} = parse_datetime($cust_main{$_})
- foreach grep $cust_main{$_}, qw( birthdate spouse_birthdate );
+ foreach grep $cust_main{$_},
+ qw( birthdate spouse_birthdate anniversary_date );
my $invoicing_list = $cust_main{'invoicing_list'}
? [ delete $cust_main{'invoicing_list'} ]
listref of start date, end date
+=item anniversary_date
+
+listref of start date, end date
+
=item payby
listref
# dates
##
- foreach my $field (qw( signupdate birthdate spouse_birthdate )) {
+ foreach my $field (qw( signupdate birthdate spouse_birthdate anniversary_date )) {
next unless exists($params->{$field});
%# birthdate
% if ( $conf->exists('cust_main-enable_birthdate')
% || $conf->exists('cust_main-enable_spouse_birthdate')
+% || $conf->exists('cust_main-enable_anniversary_date')
% )
% {
<BR>
<% ntable("#cccccc", 2) %>
+
% # maybe put after the contact names?
+
% if ( $conf->exists('cust_main-enable_birthdate') ) {
<% include( '/elements/tr-input-date-field.html', {
'name' => 'birthdate',
})
%>
% }
+
% if ( $conf->exists('cust_main-enable_spouse_birthdate') ) {
<% include( '/elements/tr-input-date-field.html', {
'name' => 'spouse_birthdate',
})
%>
% }
+
+% if ( $conf->exists('cust_main-enable_anniversary_date') ) {
+ <% include( '/elements/tr-input-date-field.html', {
+ 'name' => 'anniversary_date',
+ 'value' => $cust_main->anniversary_date,
+ 'label' => 'Anniversary Date',
+ 'format' => ( $conf->config('date_format') || "%m/%d/%Y" ),
+ 'usedatetime' => 1,
+ 'noinit' => $noinit++,
+ })
+ %>
+% }
+
</TABLE>
<%init>
my %usedatetime = ( 'birthdate' => 1,
'spouse_birthdate' => 1,
+ 'anniversary_date' => 1,
);
-foreach my $dfield (qw( birthdate spouse_birthdate signupdate )) {
+foreach my $dfield (qw(
+ signupdate birthdate spouse_birthdate anniversary_date
+)) {
if ( $cgi->param($dfield) && $cgi->param($dfield) =~ /^([ 0-9\-\/]{0,10})$/) {
# parse dates
###
-foreach my $field (qw( signupdate birthdate spouse_birthdate )) {
+foreach my $field (qw( signupdate birthdate spouse_birthdate anniversary_date )) {
my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi, $field);
</TR>
% }
+% if ( $conf->exists('cust_main-enable_anniversary_date') ) {
+ <TR>
+ <TD ALIGN="right" VALIGN="center"><% mt('Anniversary Date') |h %></TD>
+ <TD>
+ <TABLE>
+ <& /elements/tr-input-beginning_ending.html,
+ prefix => 'anniversary_date',
+ layout => 'horiz',
+ &>
+ </TABLE>
+ </TD>
+ </TR>
+% }
+
<& /elements/tr-select-cust_tag.html,
'cgi' => $cgi,
'is_report' => 1,
% }
+% if ( $conf->exists('cust_main-enable_anniversary_date') ) {
+% my $dt = $cust_main->anniversary_date ne ''
+% ? DateTime->from_epoch( 'epoch' => $cust_main->anniversary_date,
+% 'time_zone' =>'floating',
+% )
+% : '';
+
+ <TR>
+ <TD ALIGN="right"><% mt('Anniversary Date') |h %></TD>
+ <TD BGCOLOR="#ffffff"><% $dt ? $dt->strftime($date_format) : '' %></TD>
+ </TR>
+
+% }
+
% if ( $conf->exists('cust_main-require_censustract') ) {
<TR>