%
#
use strict;
use vars qw( $cgi $p $part_referral );
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use FS::UID qw(cgisuidsetup);
use FS::Record qw(qsearch);
use FS::CGI qw(header menubar popurl table);
use FS::part_referral;
$cgi = new CGI;
&cgisuidsetup($cgi);
$p = popurl(2);
print $cgi->header( '-expires' => 'now' ), header("Referral Listing", menubar(
'Main Menu' => $p,
# 'Add new referral' => "../edit/part_referral.cgi",
)), "Where a customer heard about your service. Tracked for informational purposes.
", &table(), <
Referral |
END
foreach $part_referral ( sort {
$a->getfield('refnum') <=> $b->getfield('refnum')
} qsearch('part_referral',{}) ) {
my($hashref)=$part_referral->hashref;
print <
$hashref->{refnum} |
$hashref->{referral} |
END
}
print <
Add new referral |