summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-10-17 14:33:39 -0700
committerMark Wells <mark@freeside.biz>2013-10-17 14:33:39 -0700
commitc5faf08296702144c0b35ca857df1ca3313c37ff (patch)
treec178d4b9dd3dcf6686ebca0805e87e21e0fd0548 /FS
parent6264e71cd8138368e5ec3ef660f1c1eca9882f48 (diff)
daily sales/receipts report: fix customer class and date selection, #24853
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/Report/Table/Daily.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/FS/FS/Report/Table/Daily.pm b/FS/FS/Report/Table/Daily.pm
index 6087b0dcc..570fefe4d 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;
}