summaryrefslogtreecommitdiff
path: root/httemplate/search/report_svc_export_test.cgi
blob: b02f0e2166c234eca72c94c5b42ee7f4a558d94a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<& /elements/header.html, $title &>

% #foreach my $group (keys(%$errors)) {
% foreach my $error (@$errors) {
% my $group = (keys %$error)[0];	
<TABLE>
  <TR><TH ALIGN="left" COLSPAN="3"><FONT SIZE="+1">
    Found <% $error->{$group}->{'count'} %> <% $error->{$group}->{'description'} %> attached to <% $export %> export.
% if ($error->{$group}->{'errors'}) {
    <FONT COLOR="red">(<% scalar(keys %{$error->{$group}->{'errors'}}) %>) error(s)</FONT>
% }
  </FONT></TH></TR>
% unless ($error->{$group}->{'errors'}) {
    <TR><TD>&nbsp;</TD><TD COLSPAN=2><FONT COLOR="green">No errors found</FONT></TD></TR>
%}
% foreach my $e (keys(%{$error->{$group}->{'errors'}})) {
    <TR><TD>&nbsp;</TD><TD COLSPAN=2>
      <% $error->{$group}->{'errors'}->{$e}->{'description'} %>
%     if ($error->{$group}->{'errors'}->{$e}->{'link'}) {
	   <A HREF="<% $error->{$group}->{'errors'}->{$e}->{'link'} %>">(edit)</A>
%     }
    </TD></TR>
%   foreach my $err (keys(%{$error->{$group}->{'errors'}->{$e}->{'errors'}})) {
      <TR><TD>&nbsp;</TD><TD>&nbsp;</TD><TD><FONT COLOR="red" SIZE="-1"><% $error->{$group}->{'errors'}->{$e}->{'errors'}->{$err} %></FONT></TD></TR>
%   }
% }  
</TABLE>
% }
<& /elements/footer.html &>

<%init>

my $DEBUG = $cgi->param('debug') || 0;
my $conf = new FS::Conf;
my $export = $cgi->param('export');
my $title = $export." export test";

my $opts = { 'fsurl' => $fsurl, };

my $exports = FS::part_export::export_info();
my $class = "FS::part_export::$export" if $exports->{$export};
my $errors = $class->test_export_report($opts);

</%init>