[freeside-commits] branch FREESIDE_3_BRANCH updated. c5faf08296702144c0b35ca857df1ca3313c37ff
Mark Wells
mark at 420.am
Thu Oct 17 14:33:56 PDT 2013
The branch, FREESIDE_3_BRANCH has been updated
via c5faf08296702144c0b35ca857df1ca3313c37ff (commit)
from 6264e71cd8138368e5ec3ef660f1c1eca9882f48 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c5faf08296702144c0b35ca857df1ca3313c37ff
Author: Mark Wells <mark at freeside.biz>
Date: Thu Oct 17 14:33:39 2013 -0700
daily sales/receipts report: fix customer class and date selection, #24853
diff --git a/FS/FS/Report/Table/Daily.pm b/FS/FS/Report/Table/Daily.pm
index 6087b0d..570fefe 100644
--- a/FS/FS/Report/Table/Daily.pm
+++ b/FS/FS/Report/Table/Daily.pm
@@ -27,6 +27,7 @@ FS::Report::Table::Daily - Tables of report data, indexed daily
'end_day' => 27,
#opt
'agentnum' => 54
+ 'cust_classnum' => [ 1,2,4 ],
'params' => [ [ 'paramsfor', 'item_one' ], [ 'item', 'two' ] ], # ...
'remove_empty' => 1, #collapse empty rows, default 0
'item_labels' => [ ], #useful with remove_empty
@@ -54,6 +55,8 @@ sub data {
my $emonth = $self->{'end_month'};
my $eyear = $self->{'end_year'};
my $agentnum = $self->{'agentnum'};
+ my $cust_classnum = $self->{'cust_classnum'} || [];
+ $cust_classnum = [ $cust_classnum ] if !ref($cust_classnum);
my %data;
@@ -83,6 +86,7 @@ sub data {
for ( $i = 0; $i < scalar(@items); $i++ ) {
my $item = $items[$i];
my @param = $self->{'params'} ? @{ $self->{'params'}[$col] }: ();
+ push @param, 'cust_classnum' => $cust_classnum if @$cust_classnum;
my $value = $self->$item($speriod, $eperiod, $agentnum, @param);
push @{$data{data}->[$col++]}, $value;
}
diff --git a/httemplate/elements/tr-input-beginning_ending.html b/httemplate/elements/tr-input-beginning_ending.html
index ffc9038..91f55eb 100644
--- a/httemplate/elements/tr-input-beginning_ending.html
+++ b/httemplate/elements/tr-input-beginning_ending.html
@@ -7,7 +7,7 @@
<TR>
<TD ALIGN="right">From date: </TD>
- <TD><INPUT TYPE="text" NAME="<% $opt{prefix} %>beginning" ID="<% $opt{prefix} %>beginning_text" VALUE="<% $from %>" SIZE=<%$size%> MAXLENGTH=<%$maxlength%>> <IMG SRC="<%$fsurl%>images/calendar.png" ID="<% $opt{prefix} %>beginning_button" STYLE="cursor: pointer" TITLE="Select date"><IMG SRC="<%$fsurl%>images/calendar-disabled.png" ID="<% $opt{prefix} %>beginning_disabled" STYLE="display:none"><BR><i>m/d/y<% $time_hint %></i></TD>
+ <TD><INPUT TYPE="text" NAME="<% $opt{prefix} %>beginning" ID="<% $opt{prefix} %>beginning_text" VALUE="<% time2str($date_format, $from) %>" SIZE=<%$size%> MAXLENGTH=<%$maxlength%>> <IMG SRC="<%$fsurl%>images/calendar.png" ID="<% $opt{prefix} %>beginning_button" STYLE="cursor: pointer" TITLE="Select date"><IMG SRC="<%$fsurl%>images/calendar-disabled.png" ID="<% $opt{prefix} %>beginning_disabled" STYLE="display:none"><BR><i>m/d/y<% $time_hint %></i></TD>
<SCRIPT TYPE="text/javascript">
Calendar.setup({
inputField: "<% $opt{prefix} %>beginning_text",
@@ -26,7 +26,7 @@
% }
<TD ALIGN="right">To date: </TD>
- <TD><INPUT TYPE="text" NAME="<% $opt{prefix} %>ending" ID="<% $opt{prefix} %>ending_text" VALUE="<% $to %>" SIZE=<%$size%> MAXLENGTH=<%$maxlength%>> <IMG SRC="<%$fsurl%>images/calendar.png" ID="<% $opt{prefix} %>ending_button" STYLE="cursor: pointer" TITLE="Select date"><IMG SRC="<%$fsurl%>images/calendar-disabled.png" ID="<% $opt{prefix} %>ending_disabled" STYLE="display:none"><BR><i>m/d/y<% $time_hint %></i></TD>
+ <TD><INPUT TYPE="text" NAME="<% $opt{prefix} %>ending" ID="<% $opt{prefix} %>ending_text" VALUE="<% time2str($date_format, $to) %>" SIZE=<%$size%> MAXLENGTH=<%$maxlength%>> <IMG SRC="<%$fsurl%>images/calendar.png" ID="<% $opt{prefix} %>ending_button" STYLE="cursor: pointer" TITLE="Select date"><IMG SRC="<%$fsurl%>images/calendar-disabled.png" ID="<% $opt{prefix} %>ending_disabled" STYLE="display:none"><BR><i>m/d/y<% $time_hint %></i></TD>
<SCRIPT TYPE="text/javascript">
Calendar.setup({
inputField: "<% $opt{prefix} %>ending_text",
diff --git a/httemplate/graph/report_money_time_daily.html b/httemplate/graph/report_money_time_daily.html
index a436d08..e80f586 100644
--- a/httemplate/graph/report_money_time_daily.html
+++ b/httemplate/graph/report_money_time_daily.html
@@ -4,12 +4,11 @@
<TABLE>
-<% include( '/elements/tr-input-beginning_ending.html',
+<& /elements/tr-input-beginning_ending.html,
'datesrequired' => 1,
- 'from' => time2str('%m/%d/%Y',$from),
- 'to' => time2str('%m/%d/%Y',time),
- )
-%>
+ 'from' => $from,
+ 'to' => time,
+&>
<% include('/elements/tr-select-agent.html',
'label' => 'For agent: ',
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Report/Table/Daily.pm | 4 ++++
httemplate/elements/tr-input-beginning_ending.html | 4 ++--
httemplate/graph/report_money_time_daily.html | 9 ++++-----
3 files changed, 10 insertions(+), 7 deletions(-)
More information about the freeside-commits
mailing list