1 package FS::part_referral;
7 @ISA = qw( FS::Record );
11 FS::part_referral - Object methods for part_referral objects
15 use FS::part_referral;
17 $record = new FS::part_referral \%hash
18 $record = new FS::part_referral { 'column' => 'value' };
20 $error = $record->insert;
22 $error = $new_record->replace($old_record);
24 $error = $record->delete;
26 $error = $record->check;
30 An FS::part_referral represents a referral - where a customer heard of your
31 services. This can be used to track the effectiveness of a particular piece of
32 advertising, for example. FS::part_referral inherits from FS::Record. The
33 following fields are currently supported:
37 =item refnum - primary key (assigned automatically for new referrals)
39 =item referral - Text name of this referral
49 Creates a new referral. To add the referral to the database, see L<"insert">.
53 sub table { 'part_referral'; }
57 Adds this referral to the database. If there is an error, returns the error,
58 otherwise returns false.
62 Currently unimplemented.
68 return "Can't (yet?) delete part_referral records";
69 #need to make sure no customers have this referral!
72 =item replace OLD_RECORD
74 Replaces OLD_RECORD with this one in the database. If there is an error,
75 returns the error, otherwise returns false.
79 Checks all fields to make sure this is a valid referral. If there is an error,
80 returns the error, otherwise returns false. Called by the insert and replace
88 $self->ut_numbern('refnum')
89 || $self->ut_text('referral')
97 $Id: part_referral.pm,v 1.1 1999-08-04 09:03:53 ivan Exp $
101 The delete method is unimplemented.
105 L<FS::Record>, L<FS::cust_main>, schema.html from the base documentation.