Initial revision
[freeside.git] / htdocs / docs / man / cust_refund.txt
1 NAME
2     FS::cust_refund - Object method for cust_refund objects
3
4 SYNOPSIS
5       use FS::cust_refund;
6
7       $record = create FS::cust_refund \%hash;
8       $record = create FS::cust_refund { 'column' => 'value' };
9
10       $error = $record->insert;
11
12       $error = $new_record->replace($old_record);
13
14       $error = $record->delete;
15
16       $error = $record->check;
17
18 DESCRIPTION
19     An FS::cust_refund represents a refund. FS::cust_refund inherits
20     from FS::Record. The following fields are currently supported:
21
22     refundnum - primary key (assigned automatically for new refunds)
23     crednum - Credit (see the FS::cust_credit manpage)
24     refund - Amount of the refund
25     _date - specified as a UNIX timestamp; see the section on "time" in the perlfunc manpage.  Also see
26     the Time::Local manpage and the Date::Parse manpage for conversion functions.
27     payby - `CARD' (credit cards), `BILL' (billing), or `COMP' (free)
28     payinfo - card number, P.O.#, or comp issuer (4-8 lowercase alphanumerics; think username)
29     otaker - order taker (assigned automatically, see the FS::UID manpage)
30 METHODS
31     create HASHREF
32         Creates a new refund. To add the refund to the database, see
33         the section on "insert".
34
35     insert
36         Adds this refund to the database, and updates the credit
37         (see the FS::cust_credit manpage).
38
39     delete
40         Currently unimplemented (accounting reasons).
41
42     replace OLD_RECORD
43         Currently unimplemented (accounting reasons).
44
45     check
46         Checks all fields to make sure this is a valid refund. If
47         there is an error, returns the error, otherwise returns
48         false. Called by the insert method.
49
50 BUGS
51     It doesn't properly override FS::Record yet.
52
53     Delete and replace methods.
54
55 SEE ALSO
56     the FS::Record manpage, the FS::cust_credit manpage, schema.html
57     from the base documentation.
58
59 HISTORY
60     ivan@sisd.com 98-mar-18
61
62     ->create had wrong tablename ivan@sisd.com 98-jun-16 (finish
63     me!)
64
65     pod and finish up ivan@sisd.com 98-sep-21
66