4 %my $conf = new FS::Conf;
6 %my($query) = $cgi->keywords;
9 %my $svc_forward = qsearchs('svc_forward',{'svcnum'=>$svcnum});
10 %die "Unknown svcnum" unless $svc_forward;
12 %my $cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum});
13 %my $pkgnum = $cust_svc->getfield('pkgnum');
14 %my($cust_pkg, $custnum);
16 % $cust_pkg=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
17 % $custnum=$cust_pkg->getfield('custnum');
23 %my $part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } )
24 % or die "Unkonwn svcpart";
26 %print header('Mail Forward View', menubar(
27 % ( ( $pkgnum || $custnum )
28 % ? ( "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
30 % : ( "Cancel this (unaudited) mail forward" =>
31 % "${p}misc/cancel-unaudited.cgi?$svcnum" )
36 %my($srcsvc,$dstsvc,$dst) = (
37 % $svc_forward->srcsvc,
38 % $svc_forward->dstsvc,
41 %my $src = $svc_forward->dbdef_table->column('src') ? $svc_forward->src : '';
43 %my $svc = $part_svc->svc;
47 % my $svc_acct = qsearchs('svc_acct',{'svcnum'=>$srcsvc})
48 % or die "Corrupted database: no svc_acct.svcnum matching srcsvc $srcsvc";
49 % $source = $svc_acct->email;
56 % my $svc_acct = qsearchs('svc_acct',{'svcnum'=>$dstsvc})
57 % or die "Corrupted database: no svc_acct.svcnum matching dstsvc $dstsvc";
58 % $destination = $svc_acct->email;
60 % $destination = $dst;
63 %print qq!<A HREF="${p}edit/svc_forward.cgi?$svcnum">Edit this information</A>!.
64 % ntable("#cccccc",2).
65 % '<TR><TD ALIGN="right">Service number</TD>'.
66 % qq!<TD BGCOLOR="#ffffff">$svcnum</TD></TR>!.
67 % '<TR><TD ALIGN="right">Service</TD>'.
68 % qq!<TD BGCOLOR="#ffffff">$svc</TD></TR>!.
69 % qq!<TR><TD ALIGN="right">Email to</TD>!.
70 % qq!<TD BGCOLOR="#ffffff">$source</TD></TR>!.
71 % qq!<TR><TD ALIGN="right">Forwards to </TD>!.
72 % qq!<TD BGCOLOR="#ffffff">$destination</TD></TR>!;
74 %foreach (sort { $a cmp $b } $svc_forward->virtual_fields) {
75 % print $svc_forward->pvf($_)->widget('HTML', 'view', $svc_forward->getfield($_)),
80 % '<BR>'. joblisting({'svcnum'=>$svcnum}, 1).