diff options
Diffstat (limited to 'httemplate')
| -rwxr-xr-x | httemplate/edit/cust_main.cgi | 1 | ||||
| -rw-r--r-- | httemplate/edit/cust_main/birthdate.html | 14 | ||||
| -rwxr-xr-x | httemplate/edit/process/cust_main.cgi | 5 | ||||
| -rwxr-xr-x | httemplate/search/cust_main.html | 2 | ||||
| -rwxr-xr-x | httemplate/search/report_cust_main.html | 14 | ||||
| -rw-r--r-- | httemplate/view/cust_main/misc.html | 14 |
6 files changed, 48 insertions, 2 deletions
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 7b3e181a3..414043ed8 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -28,6 +28,7 @@ %# birthdate % if ( $conf->exists('cust_main-enable_birthdate') % || $conf->exists('cust_main-enable_spouse_birthdate') +% || $conf->exists('cust_main-enable_anniversary_date') % ) % { <BR> diff --git a/httemplate/edit/cust_main/birthdate.html b/httemplate/edit/cust_main/birthdate.html index 6d1c221aa..5ea8e1828 100644 --- a/httemplate/edit/cust_main/birthdate.html +++ b/httemplate/edit/cust_main/birthdate.html @@ -10,6 +10,7 @@ }) %> % } + % if ( $conf->exists('cust_main-enable_spouse_birthdate') ) { <% include( '/elements/tr-input-date-field.html', { 'name' => 'spouse_birthdate', @@ -21,6 +22,19 @@ }) %> % } + +% 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> diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 15dd4612c..0e383af12 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -93,9 +93,12 @@ $new->tagnum( [ $cgi->param('tagnum') ] ); 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})$/) { diff --git a/httemplate/search/cust_main.html b/httemplate/search/cust_main.html index e164b98f4..f75b45197 100755 --- a/httemplate/search/cust_main.html +++ b/httemplate/search/cust_main.html @@ -61,7 +61,7 @@ for my $param (qw( classnum refnum payby tagnum )) { # 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); diff --git a/httemplate/search/report_cust_main.html b/httemplate/search/report_cust_main.html index 39cf695d8..526bce26c 100755 --- a/httemplate/search/report_cust_main.html +++ b/httemplate/search/report_cust_main.html @@ -76,6 +76,20 @@ </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, diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html index 813881c26..5872beb81 100644 --- a/httemplate/view/cust_main/misc.html +++ b/httemplate/view/cust_main/misc.html @@ -130,6 +130,20 @@ % } +% 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> |
