RT# 82949 - changes section name from fees to pricing, better opiton
[freeside.git] / httemplate / search / report_svc_export_test.cgi
1 <& /elements/header.html, $title &>
2
3 % #foreach my $group (keys(%$errors)) {
4 % foreach my $error (@$errors) {
5 % my $group = (keys %$error)[0];        
6 <TABLE>
7   <TR><TH ALIGN="left" COLSPAN="3"><FONT SIZE="+1">
8     Found <% $error->{$group}->{'count'} %> <% $error->{$group}->{'description'} %> attached to <% $export %> export.
9 % if ($error->{$group}->{'errors'}) {
10     <FONT COLOR="red">(<% scalar(keys %{$error->{$group}->{'errors'}}) %>) error(s)</FONT>
11 % }
12   </FONT></TH></TR>
13 % unless ($error->{$group}->{'errors'}) {
14     <TR><TD>&nbsp;</TD><TD COLSPAN=2><FONT COLOR="green">No errors found</FONT></TD></TR>
15 %}
16 % foreach my $e (keys(%{$error->{$group}->{'errors'}})) {
17     <TR><TD>&nbsp;</TD><TD COLSPAN=2>
18       <% $error->{$group}->{'errors'}->{$e}->{'description'} %>
19 %     if ($error->{$group}->{'errors'}->{$e}->{'link'}) {
20            <A HREF="<% $error->{$group}->{'errors'}->{$e}->{'link'} %>">(edit)</A>
21 %     }
22     </TD></TR>
23 %   foreach my $err (keys(%{$error->{$group}->{'errors'}->{$e}->{'errors'}})) {
24       <TR><TD>&nbsp;</TD><TD>&nbsp;</TD><TD><FONT COLOR="red" SIZE="-1"><% $error->{$group}->{'errors'}->{$e}->{'errors'}->{$err} %></FONT></TD></TR>
25 %   }
26 % }  
27 </TABLE>
28 % }
29 <& /elements/footer.html &>
30
31 <%init>
32
33 my $DEBUG = $cgi->param('debug') || 0;
34 my $conf = new FS::Conf;
35 my $export = $cgi->param('export');
36 my $title = $export." export test";
37
38 my $opts = { 'fsurl' => $fsurl, };
39
40 my $exports = FS::part_export::export_info();
41 my $class = "FS::part_export::$export" if $exports->{$export};
42 my $errors = $class->test_export_report($opts);
43
44 </%init>