[freeside-commits] freeside/httemplate/search 477.html, 1.7.2.1, 1.7.2.2 477partV.html, 1.3.4.1, 1.3.4.2 report_477.html, 1.5.2.1, 1.5.2.2
Erik Levinson
levinse at wavetail.420.am
Sat Jun 4 22:41:51 PDT 2011
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail.420.am:/tmp/cvs-serv28878/httemplate/search
Modified Files:
Tag: FREESIDE_2_1_BRANCH
477.html 477partV.html report_477.html
Log Message:
FCC form 477 part II and V issues, RT13057
Index: 477.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/477.html,v
retrieving revision 1.7.2.1
retrieving revision 1.7.2.2
diff -u -w -d -r1.7.2.1 -r1.7.2.2
--- 477.html 25 Apr 2011 04:00:04 -0000 1.7.2.1
+++ 477.html 5 Jun 2011 05:41:48 -0000 1.7.2.2
@@ -93,6 +93,16 @@
&FS::Report::FCC_477::save_fcc477map("part1_row_option_$i",$upload[$i]);
}
+my @part2a_row_option = $cgi->param('part2a_row_option');
+for(my $i=0; $i < scalar(@part2a_row_option); $i++) {
+ &FS::Report::FCC_477::save_fcc477map("part2a_row_option_$i",$part2a_row_option[$i]);
+}
+
+my @part2b_row_option = $cgi->param('part2b_row_option');
+for(my $i=0; $i < scalar(@part2b_row_option); $i++) {
+ &FS::Report::FCC_477::save_fcc477map("part2b_row_option_$i",$part2b_row_option[$i]);
+}
+
my $url_mangler = sub {
my $part = shift;
my $url = $cgi->url('-path_info' => 1, '-full' => 1);
Index: report_477.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_477.html,v
retrieving revision 1.5.2.1
retrieving revision 1.5.2.2
diff -u -w -d -r1.5.2.1 -r1.5.2.2
--- report_477.html 25 Apr 2011 04:00:03 -0000 1.5.2.1
+++ report_477.html 5 Jun 2011 05:41:48 -0000 1.5.2.2
@@ -121,6 +121,7 @@
%>
<TR id='partIIA' style="display:none"><TD>Part IIA</TD><TD><TABLE>
+% $i = 0;
% foreach my $option ( @FS::Report::FCC_477::part2aoption ) {
<TR>
<TH><% $option %></TH>
@@ -130,10 +131,13 @@
'name_col' => 'name',
'hashref' => { 'disabled' => '' },
'element_name' => 'part2a_row_option',
+ 'curr_value' =>
+ FS::Report::FCC_477::restore_fcc477map("part2a_row_option_$i"),
)
%>
</TD>
</TR>
+% $i++
% }
</TABLE></TD></TR>
@@ -146,6 +150,7 @@
%>
<TR id='partIIB' style="display:none"><TD>Part IIB</TD><TD><TABLE>
+% $i = 0;
% foreach my $option ( @FS::Report::FCC_477::part2boption ) {
<TR>
<TH><% $option %></TH>
@@ -155,10 +160,13 @@
'name_col' => 'name',
'hashref' => { 'disabled' => '' },
'element_name' => 'part2b_row_option',
+ 'curr_value' =>
+ FS::Report::FCC_477::restore_fcc477map("part2b_row_option_$i"),
)
%>
</TD>
</TR>
+% $i++
% }
</TABLE></TD></TR>
@@ -185,8 +193,22 @@
'label' => 'Enable part V?',
'field' => 'part',
'value' => 'V',
+ 'onchange' => 'partchange(this)',
+ )
+ %>
+ <TR id='partV' style="display:none">
+ <TD>Part V</TD>
+ <TD>
+ <% include( '/elements/select-table.html',
+ 'table' => 'part_pkg_report_option',
+ 'name_col' => 'name',
+ 'hashref' => { 'disabled' => '' },
+ 'element_name' => 'partv_report_option',
)
%>
+ </TD>
+ </TR>
+
<% include( '/elements/tr-checkbox.html',
'label' => 'Enable part VI?',
Index: 477partV.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/477partV.html,v
retrieving revision 1.3.4.1
retrieving revision 1.3.4.2
diff -u -w -d -r1.3.4.1 -r1.3.4.2
--- 477partV.html 25 Apr 2011 04:00:03 -0000 1.3.4.1
+++ 477partV.html 5 Jun 2011 05:41:48 -0000 1.3.4.2
@@ -30,24 +30,26 @@
$search_hash{$_} = $cgi->param($_) if $cgi->param($_);
}
$search_hash{'classnum'} = [ $cgi->param('classnum') ];
+$search_hash{report_option} = $cgi->param('partv_report_option')
+ if $cgi->param('partv_report_option');
my $sql_query = FS::cust_pkg->search( { %search_hash, 'fcc_line' > 1 });
-$sql_query->{select} = 'DISTINCT zip';
+$sql_query->{select} = 'DISTINCT substr(zip,1,5) as zip';
$sql_query->{extra_sql} =~ s/ORDER BY [.\w]+//;
push @sql_query, $sql_query;
push @count_query, delete($sql_query->{'count_query'});
-$count_query[0] =~ s/count\(\*\)/count(DISTINCT zip)/;
+$count_query[0] =~ s/COUNT\(\*\)/count(DISTINCT substr(zip,1,5))/;
$count_query[0] =~ s/ORDER BY [.\w]+//;
-$search_hash{classnum} = $cgi->param('part2a_classnum')
- if $cgi->param('part2a_classnum');
+$search_hash{report_option} = $cgi->param('partv_report_option')
+ if $cgi->param('partv_report_option');
$sql_query = FS::cust_pkg->search( { %search_hash } );
-$sql_query->{select} = 'DISTINCT zip';
+$sql_query->{select} = 'DISTINCT substr(zip,1,5) as zip';
$sql_query->{extra_sql} =~ s/ORDER BY [.\w]+//;
push @sql_query, $sql_query;
push @count_query, delete($sql_query->{'count_query'});
-$count_query[1] =~ s/count\(\*\)/count(DISTINCT zip)/;
+$count_query[1] =~ s/COUNT\(\*\)/count(DISTINCT substr(zip,1,5))/;
$count_query[1] =~ s/ORDER BY [.\w]+//;
my $count_query = join(' UNION ', @count_query);
More information about the freeside-commits
mailing list