per-agent disable_previous_balance, #15863
[freeside.git] / FS / FS / cust_note_class.pm
1 package FS::cust_note_class;
2
3 use strict;
4 use base qw( FS::class_Common );
5 use FS::cust_main_note;
6
7 =head1 NAME
8
9 FS::cust_note_class - Object methods for cust_note_class records
10
11 =head1 SYNOPSIS
12
13   use FS::cust_note_class;
14
15   $record = new FS::cust_note_class \%hash;
16   $record = new FS::cust_note_class { 'column' => 'value' };
17
18   $error = $record->insert;
19
20   $error = $new_record->replace($old_record);
21
22   $error = $record->delete;
23
24   $error = $record->check;
25
26 =head1 DESCRIPTION
27
28 An FS::cust_note_class object represents a customer note class. Every customer
29 note (see L<FS::cust_main_note) has, optionally, a note class. This class 
30 inherits from FS::class_Common.  The following fields are currently supported:
31
32 =over 4
33
34 =item classnum
35
36 primary key
37
38 =item classname
39
40 classname
41
42 =item disabled
43
44 disabled
45
46
47 =back
48
49 =head1 METHODS
50
51 =over 4
52
53 =item new HASHREF
54
55 Creates a new customer note class.  To add the note class to the database,
56 see L<"insert">.
57
58 Note that this stores the hash reference, not a distinct copy of the hash it
59 points to.  You can ask the object for a copy with the I<hash> method.
60
61 =cut
62
63 sub table { 'cust_note_class'; }
64 sub _target_table { 'cust_main_note'; }
65
66 =item insert
67
68 Adds this record to the database.  If there is an error, returns the error,
69 otherwise returns false.
70
71 =cut
72
73 =item delete
74
75 Delete this record from the database.
76
77 =cut
78
79 =item replace OLD_RECORD
80
81 Replaces the OLD_RECORD with this one in the database.  If there is an error,
82 returns the error, otherwise returns false.
83
84 =cut
85
86 =item check
87
88 Checks all fields to make sure this is a valid note class.  If there is
89 an error, returns the error, otherwise returns false.  Called by the insert
90 and replace methods.
91
92 =cut
93
94 =back
95
96 =head1 BUGS
97
98 =head1 SEE ALSO
99
100 L<FS::cust_main_note>, L<FS::Record>, schema.html from the base documentation.
101
102 =cut
103
104 1;
105