summaryrefslogtreecommitdiff
path: root/httemplate/misc/test-part_event.html
blob: e2d9d45bb3563f02421b11c3105f45db47c8a793 (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
45
46
47
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>