summaryrefslogtreecommitdiff
path: root/httemplate/misc
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2017-05-11 15:48:24 -0700
committerIvan Kohler <ivan@freeside.biz>2017-05-11 15:48:24 -0700
commitd9541c5d440849911472b8850c380b9c6556d6fa (patch)
treefd3227fc8dbd629b4dbcc2228b9b528b5444d5bf /httemplate/misc
parent7ffb09d63b9e7e6f49867ada6ae07b06a167e8c1 (diff)
test billing events, RT#73949
Diffstat (limited to 'httemplate/misc')
-rw-r--r--httemplate/misc/test-part_event.html48
1 files changed, 48 insertions, 0 deletions
diff --git a/httemplate/misc/test-part_event.html b/httemplate/misc/test-part_event.html
new file mode 100644
index 000000000..e2d9d45bb
--- /dev/null
+++ b/httemplate/misc/test-part_event.html
@@ -0,0 +1,48 @@
+<& /elements/header.html, {
+ 'title_noescape' => 'Test billing events for '. encode_entities($cust_main->name),
+ }
+&>
+
+<A HREF="<%$p%>browse/part_event.html?eventtable=cust_main;test_eventtable_num=<% $custnum %>">Customer events<A>
+<BR><BR>
+<FORM METHOD="GET" ACTION="<%$p%>browse/part_event.html">
+Package events for
+<INPUT TYPE="hidden" NAME="eventtable" VALUE="cust_pkg">
+<& /elements/select-table.html,
+ 'table' => 'cust_pkg',
+ 'name_col' => 'pkg_label_long',
+ 'hashref' => { 'custnum' => $custnum, },
+ 'order_by' => 'ORDER BY pkgnum',
+ 'element_name' => 'test_eventtable_num',
+ 'disable_empty' => 1,
+&>
+<INPUT TYPE="submit" VALUE="Test package">
+</FORM>
+<BR>
+<FORM METHOD="GET" ACTION="<%$p%>browse/part_event.html">
+Invoice events for
+<INPUT TYPE="hidden" NAME="eventtable" VALUE="cust_bill">
+<& /elements/select-table.html,
+ 'table' => 'cust_bill',
+ 'name_col' => 'invnum',
+ 'hashref' => { 'custnum' => $custnum, },
+ 'order_by' => 'ORDER BY invnum',
+ 'element_name' => 'test_eventtable_num',
+ 'disable_empty' => 1,
+&>
+<INPUT TYPE="submit" VALUE="Test invoice">
+</FORM>
+<BR>
+
+<& /elements/footer.html &>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+$cgi->param('custnum') =~ /^(\d+)$/ or die 'unknown custnum';
+my $custnum = $1;
+
+my $cust_main = FS::cust_main->by_key($custnum);
+
+</%init>