summaryrefslogtreecommitdiff
path: root/httemplate/search
diff options
context:
space:
mode:
authorjeff <jeff>2010-05-13 05:43:22 +0000
committerjeff <jeff>2010-05-13 05:43:22 +0000
commit0bdb687a64bc8340f9835bc0659be93166cbeb09 (patch)
tree8d308cc932f05d8fb832c87ee392e514fd80b46c /httemplate/search
parenta087f56c114ee266707275f1a5f2a94b60232865 (diff)
cope with poor tax liability report performance by allowing queuing of reports RT#8274
Diffstat (limited to 'httemplate/search')
-rw-r--r--httemplate/search/queue.html6
-rwxr-xr-xhttemplate/search/report_newtax.html2
-rwxr-xr-xhttemplate/search/report_queued_newtax.cgi16
3 files changed, 22 insertions, 2 deletions
diff --git a/httemplate/search/queue.html b/httemplate/search/queue.html
index 125a6f7f6..e5f7aed6a 100644
--- a/httemplate/search/queue.html
+++ b/httemplate/search/queue.html
@@ -50,10 +50,14 @@
|| ( ! $noactions
&& $status =~ /^failed/
|| $status =~ /^locked/
+ || $status =~ /^done/
);
if ( $changable ) {
+ $status .= qq! (!;
+ $status .=
+ qq! &nbsp;<A HREF="$p/misc/queue.cgi?jobnum=$jobnum&action=new">retry</A>&nbsp;|!
+ unless $status =~ /^done/;
$status .=
- qq! (&nbsp;<A HREF="$p/misc/queue.cgi?jobnum=$jobnum&action=new">retry</A>&nbsp;|!.
qq!&nbsp;<A HREF="$p/misc/queue.cgi?jobnum=$jobnum&action=del">remove</A>&nbsp;)!;
}
$status;
diff --git a/httemplate/search/report_newtax.html b/httemplate/search/report_newtax.html
index daf2d23b6..2588b48d3 100755
--- a/httemplate/search/report_newtax.html
+++ b/httemplate/search/report_newtax.html
@@ -1,6 +1,6 @@
<% include('/elements/header.html', 'Tax Report' ) %>
-<FORM ACTION="report_newtax.cgi" METHOD="GET">
+<FORM ACTION="report_queued_newtax.cgi" METHOD="GET">
<TABLE>
diff --git a/httemplate/search/report_queued_newtax.cgi b/httemplate/search/report_queued_newtax.cgi
new file mode 100755
index 000000000..1d5813ece
--- /dev/null
+++ b/httemplate/search/report_queued_newtax.cgi
@@ -0,0 +1,16 @@
+<% include("/elements/header.html", "Queue Tax Report") %>
+<% include("/elements/error.html") %>
+% unless ($error) {
+ <CENTER>
+ Report queued. Check the job queue for status.
+ </CENTER>
+% }
+<% include("/elements/footer.html") %>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
+
+my $error = FS::tax_rate::queue_liability_report($cgi);
+
+</%init>