projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This commit was generated by cvs2svn to compensate for changes in r3880,
[freeside.git]
/
httemplate
/
graph
/
money_time.cgi
diff --git
a/httemplate/graph/money_time.cgi
b/httemplate/graph/money_time.cgi
index
14af0f2
..
1c7d542
100644
(file)
--- a/
httemplate/graph/money_time.cgi
+++ b/
httemplate/graph/money_time.cgi
@@
-16,7
+16,7
@@
my $emonth = $cgi->param('emonth') || $curmon+1;
<HTML>
<HEAD>
<HTML>
<HEAD>
- <TITLE>
Graphing monetary values over time
</TITLE>
+ <TITLE>
Sales, Credits and Receipts Summary
</TITLE>
</HEAD>
<BODY BGCOLOR="#e8e8e8">
<IMG SRC="money_time-graph.cgi?<%= $cgi->query_string %>" WIDTH="976" HEIGHT="384">
</HEAD>
<BODY BGCOLOR="#e8e8e8">
<IMG SRC="money_time-graph.cgi?<%= $cgi->query_string %>" WIDTH="976" HEIGHT="384">
@@
-25,19
+25,26
@@
my $emonth = $cgi->param('emonth') || $curmon+1;
<%= table('e8e8e8') %>
<%
<%= table('e8e8e8') %>
<%
-my @items = qw( invoiced netsales credits receipts );
+my @items = qw( invoiced netsales credits
payments
receipts );
my %label = (
'invoiced' => 'Gross Sales',
'netsales' => 'Net Sales',
'credits' => 'Credits',
my %label = (
'invoiced' => 'Gross Sales',
'netsales' => 'Net Sales',
'credits' => 'Credits',
- 'receipts' => 'Receipts',
+ 'payments' => 'Gross Receipts',
+ 'receipts' => 'Net Receipts',
);
my %color = (
'invoiced' => '9999ff', #light blue
'netsales' => '0000cc', #blue
'credits' => 'cc0000', #red
);
my %color = (
'invoiced' => '9999ff', #light blue
'netsales' => '0000cc', #blue
'credits' => 'cc0000', #red
+ 'payments' => '99cc99', #light green
'receipts' => '00cc00', #green
);
'receipts' => '00cc00', #green
);
+my %link = (
+ 'invoiced' => "${p}search/cust_bill.html?",
+ 'credits' => "${p}search/cust_credit.html?",
+ 'payments' => "${p}search/cust_pay.cgi?magic=_date;",
+);
my $report = new FS::Report::Table::Monthly (
'items' => \@items,
my $report = new FS::Report::Table::Monthly (
'items' => \@items,
@@
-48,7
+55,6
@@
my $report = new FS::Report::Table::Monthly (
);
my $data = $report->data;
);
my $data = $report->data;
-
my @mon = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
%>
my @mon = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
%>
@@
-64,9
+70,15
@@
my @mon = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
<% foreach my $row (@items) { %>
<TR><TH><FONT COLOR="#<%= $color{$row} %>"><%= $label{$row} %></FONT></TH>
<% foreach my $row (@items) { %>
<TR><TH><FONT COLOR="#<%= $color{$row} %>"><%= $label{$row} %></FONT></TH>
+ <% my $link = exists($link{$row})
+ ? qq(<A HREF="$link{$row})
+ : '';
+ my @speriod = @{$data->{speriod}};
+ my @eperiod = @{$data->{eperiod}};
+ %>
<% foreach my $column ( @{$data->{$row}} ) { %>
<TD ALIGN="right" BGCOLOR="#ffffff">
<% foreach my $column ( @{$data->{$row}} ) { %>
<TD ALIGN="right" BGCOLOR="#ffffff">
- <
FONT COLOR="#<%= $color{$row} %>">$<%= sprintf("%.2f", $column) %></FONT
>
+ <
%= $link ? $link. 'begin='. shift(@speriod). ';end='. shift(@eperiod). '">' : '' %><FONT COLOR="#<%= $color{$row} %>">$<%= sprintf("%.2f", $column) %></FONT><%= $link ? '</A>' : '' %
>
</TD>
<% } %>
</TR>
</TD>
<% } %>
</TR>