1 <% include('elements/browse.html',
2 'title' => "Remote POP accounts for $svc_label: $svc_value",
3 'name_singular' => 'Remote POP account',
4 'html_init' => $html_init,
5 'query' => { 'table' => 'acct_snarf',
6 'hashref' => { 'svcnum' => $svcnum },
7 #'order_by' => 'ORDER BY priority DESC',
9 'count_query' => $count_query,
22 'fields' => [ 'snarfname',
25 sub { FS::acct_snarf->check_freq_labels->{shift->check_freq} },
32 'links' => [ $edit_sub, $edit_sub, $edit_sub, '',
33 '', '', '', '', $del_sub ],
38 $cgi->param('svcnum') =~ /^(\d+)$/ or die 'no svcnum';
41 #agent virt so you can't do cross-agent snarfing
42 my $cust_svc = qsearchs('cust_svc', { 'svcnum' => $svcnum })
43 or die 'unknown svcnum';
44 my $part_svc = $cust_svc->part_svc;
46 my $count_query = "SELECT COUNT(*) FROM acct_snarf WHERE svcnum = $svcnum";
48 my($svc_label, $svc_value, $svcdb) = $cust_svc->label;
50 my $view = FS::UI::Web::svc_url( 'm' => $m,
52 'part_svc' => $part_svc,
57 qq(<A HREF="$view">View this $svc_label</A><BR><BR>).
58 qq!<A HREF="${p}edit/acct_snarf.html?svcnum=$svcnum">Add new remote POP account</A><BR>!.
62 function areyousure_delete(href) {
63 areyousure(href,"Are you sure you want to delete this remote POP account?");
65 function areyousure(href,message) {
66 if (confirm(message) == true)
67 window.location.href = href;
72 my $edit_sub = [ $p.'edit/acct_snarf.html?', 'snarfnum' ];
74 my $snarfnum = shift->snarfnum;
75 [ "javascript:areyousure_delete('${p}misc/delete-acct_snarf.html?$snarfnum')", '' ];