Deposits And OverPayments
From PhpCOIN Documentation
The simplest way to handle customer deposits (and overpayments) is with a negative amount invoice, which phpCOIN v1.6 and higher will treat (and label) as a "Credit Memo".
Recording a Deposit
To record the deposit, create an invoice:
1: Set the "status" as "credit memo" ~ this will prevent phpCOIN from nagging the customer about it.
2: Set the three dates (issued, due, paid) as the date you received the deposit.
3: Add an invoice item for the deposit as a negative amount (rather than the normal positive amount), and make the description something like "Deposit on Account".
4: Save the invoice.
The "Credit Memo" will show on the invoices list as a negative-balance invoice until such time as you apply it to an outstanding invoice. As you apply part of it the "amount" will reduce to zero, so when it is fully applied it will appear in the invoices list as a "credit memo" for zero dollars (yen/reals/etc.)
The customer's account balance will show a negative amount owed to you. This is correct, the customer has given you money that he/she does not owe yet, so you owe him/her the amount of the deposit.
Do NOT "receive payment" against this credit memo. The only thing we want to show in the invoices transactions table for a credit memo is the amount currently outstanding.
Applying a Credit Memo To An Invoice
When the customer has an invoice that this credit memo should be applied to, you need to do two things:
1: When you pay the new invoice, make the payment of type "credit memo", not cash or whatever the customer paid the deposit with. On the payment note put "Credit Memo xxxxx applied" where xxxxx is the number of the Credit Memo you created above.
2: Edit the credit memo to add another item. Make the description something like "Applied To Invoice yyyyy" where yyyyy is the new invoice number that you created in step 1, and make the amount a regular positive amount to match whatever should be applied to the invoice. This will reduce the "amount" of the deposit that the customer has, and when the deposit has been applied in its entirety against invoices, the "amount" will be zero
Sample Credit Memo
Here is a credit memo "items" page that has an invoice applied against it. The invoice is for less that the deposit, so the "amount" is still a negative number ~ which means that we still owe the client some money. The "transaction" amount was -20 before we applied the invoice against it, so now it is only -5 (20 deposit less 15 invoice):