From 30c3ff2acf90e1386fae00759078899c859faf36 Mon Sep 17 00:00:00 2001 From: jeff Date: Tue, 3 Oct 2006 22:44:28 +0000 Subject: Enhanced customer notes --- httemplate/view/cust_main/notes.html | 74 ++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100755 httemplate/view/cust_main/notes.html (limited to 'httemplate/view/cust_main/notes.html') diff --git a/httemplate/view/cust_main/notes.html b/httemplate/view/cust_main/notes.html new file mode 100755 index 000000000..c1a33b020 --- /dev/null +++ b/httemplate/view/cust_main/notes.html @@ -0,0 +1,74 @@ +% +% my $conf = new FS::Conf; +% +% $cgi->param('custnum') =~ /^(\d+)$/ +% or die "No customer specified (bad URL)!"; +% my $custnum = $1; +% +% my $cust_main = qsearchs('cust_main', {'custnum' => $custnum} ); +% die "Custimer not found!" unless $cust_main; +% +% my (@notes) = $cust_main->notes(); +% if ( scalar(@notes) ) { + + + + + +%#<% include('/elements/table-grid.html') %> +% my $bgcolor1 = '#eeeeee'; +% my $bgcolor2 = '#ffffff'; +% my $bgcolor = ''; +% +% foreach my $note (@notes) { +% +% if ( $bgcolor eq $bgcolor1 ) { +% $bgcolor = $bgcolor2; +% } else { +% $bgcolor = $bgcolor1; +% } +% +% + + + <% note_datestr($note,$conf,$bgcolor) %> + + + + +% } #end display notes + +
+  <%$note->otaker%>  + +  <%$note->comments%> +
+% } else { + +
+% } +% +%#subroutines +% +%sub note_datestr { +% my($note, $conf, $bgcolor) = @_ or return ''; +% my $format=qq{%b}. +% qq{ %o,}. +% qq{ %Y }; +% $format .= qq{ %l}. +% qq{:}. +% qq{%M}. +% qq{ %P } +% if $conf->exists('cust_main_note-display_times'); +% ( my $strip = time2str($format, $note->_date) ) =~ s/ (\d)/$1/g; +% $strip; +% } +% + -- cgit v1.2.1