[freeside-devel] cust_refund?
Jason Spence
thalakan at frys.com
Wed Feb 7 15:14:22 PST 2001
On Wed, Feb 07, 2001 at 11:07:03AM -0800, ivan said:
> On Mon, Feb 05, 2001 at 12:00:52AM -0800, Jason Spence wrote:
> > I'm doing work on creating a proration system for Freeside. I'm a
> > little confused on the role of cust_refund (as opposed to
> > cust_credit).
>
> Accounting is fun. Think "bill" vs. "payment". A bill is to a payment as
> a credit is to a refund. Also, a bill is to a credit as a payment is to a
> refund.
>
> cust_bill - an invoice, the declaration that a customer owes you money.
> cust_pay - a payment, the transfer of funds from the customer to you
>
> cust_credit - a credit, the declaration that you owe a customer money. the
> equivalent of a negative cust_bill record.
> cust_refund - a refund, the transfer of funds from you to the customer.
> equivalent of a negative cust_pay record.
Ahhh. This makes much more sense. I like this so much that I will
even create a patch to current CVS with this information. Attached.
> > I can't seem to find a place in the code where
> > cust_refund objects are created, only a place where they are printed
> > (in cust_main.cgi). Can someone enlighten me?
>
> Current web interface doesn't have a way to create refunds.
Oh, good! I'm not going crazy :)
> The hooks are in htdocs/edit/cust_credit.cgi and
> htdocs/edit/process/cust_credit.cgi. Since a refund corresponds to
> an actual trasnfer of money to the customer - either via a credit
> card transaction, cutting the customer a check, or handing them cash
> - creating a cust_refund record should be integrated with your
> internal methods for doing such a thing.
Yes, I agree. I think that this should really be integrated with the
ledger stuff, though.
- Jason
-------------- next part --------------
diff -urN freeside/htdocs/docs/schema.html my-freeside/htdocs/docs/schema.html
--- freeside/htdocs/docs/schema.html Wed Feb 7 15:10:30 2001
+++ my-freeside/htdocs/docs/schema.html Tue Nov 7 07:00:37 2000
@@ -17,9 +17,7 @@
<li>typenum - primary key
<li>atype - name of this agent type
</ul>
- <li><a name="cust_bill">cust_bill</a> - Invoices. Declarations that
-customers owe you money. The specific charges are itemized in
-cust_bill_pkg.
+ <li><a name="cust_bill">cust_bill</a> - Invoices
<ul>
<li>invnum - primary key
<li>custnum - <a href="#cust_main">customer</a>
@@ -37,8 +35,7 @@
<li>sdate - starting date
<li>edate - ending date
</ul>
- <li><a name="cust_credit">cust_credit</a> - Credits. The equivalent
-of a negative cust_bill record.
+ <li><a name="cust_credit">cust_credit</a> - Credits
<ul>
<li>crednum - primary key
<li>custnum - <a href="#cust_main">customer</a>
@@ -90,8 +87,7 @@
<li>country
<li>tax - % rate
</ul>
- <li><a name="cust_pay">cust_pay</a> - Payments. Money being
-transferred from the customer to you.
+ <li><a name="cust_pay">cust_pay</a> - Payments
<ul>
<li>paynum - primary key
<li>invnum - <a href="#cust_bill">invoice</a>
@@ -131,8 +127,7 @@
<li>cancel - (past) cancellation date
<li>otaker - order taker
</ul>
- <li><a name="cust_refund">cust_refund</a> - Refunds, the transfer of
-funds from you to the customer. Equivalent to a negative cust_pay record.
+ <li><a name="cust_refund">cust_refund</a> - Refunds
<ul>
<li>refundnum - primary key
<li>crednum - <a href="#cust_credit">credit</a>
More information about the freeside-devel
mailing list