From: Mark Wells Date: Thu, 17 Oct 2013 21:33:46 +0000 (-0700) Subject: daily sales/receipts report: fix customer class and date selection, #24853 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=d32ed470ba0869a4005c0c577b98246c48f8be7d 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 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; } diff --git a/httemplate/elements/tr-input-beginning_ending.html b/httemplate/elements/tr-input-beginning_ending.html index ffc903875..91f55eb69 100644 --- a/httemplate/elements/tr-input-beginning_ending.html +++ b/httemplate/elements/tr-input-beginning_ending.html @@ -7,7 +7,7 @@ From date: - MAXLENGTH=<%$maxlength%>>
m/d/y<% $time_hint %> + MAXLENGTH=<%$maxlength%>>
m/d/y<% $time_hint %>