X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fgraph%2Fmoney_time.cgi;h=1c7d54266c04d59e6ea6726b2374ab404438b235;hb=f8e7f53109f36e3c649dc509b61c75c3c44fb519;hp=14af0f2465bab67f63b5805e25a2d98e99d3c79a;hpb=654234a526b5447ec02970962cccb1cf879796c8;p=freeside.git
diff --git a/httemplate/graph/money_time.cgi b/httemplate/graph/money_time.cgi
index 14af0f246..1c7d54266 100644
--- a/httemplate/graph/money_time.cgi
+++ b/httemplate/graph/money_time.cgi
@@ -16,7 +16,7 @@ my $emonth = $cgi->param('emonth') || $curmon+1;
- Graphing monetary values over time
+ Sales, Credits and Receipts Summary
@@ -25,19 +25,26 @@ my $emonth = $cgi->param('emonth') || $curmon+1;
<%= 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',
- 'receipts' => 'Receipts',
+ 'payments' => 'Gross Receipts',
+ 'receipts' => 'Net Receipts',
);
my %color = (
'invoiced' => '9999ff', #light blue
'netsales' => '0000cc', #blue
'credits' => 'cc0000', #red
+ 'payments' => '99cc99', #light 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,
@@ -48,7 +55,6 @@ my $report = new FS::Report::Table::Monthly (
);
my $data = $report->data;
-
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) { %>
<%= $label{$row} %> |
+ <% my $link = exists($link{$row})
+ ? qq(
- $<%= sprintf("%.2f", $column) %>
+ <%= $link ? $link. 'begin='. shift(@speriod). ';end='. shift(@eperiod). '">' : '' %>$<%= sprintf("%.2f", $column) %><%= $link ? '' : '' %>
<% } %>