Invoice accounting
The GL lines Sales and Purchase Invoices post, plus advances, write-offs, returns, POS payments, opening invoices and invoice discounting.
A submitted Sales Invoice or Purchase Invoice posts its GL Entry and Payment Ledger Entry rows. Cancel reverses them as described in General ledger. How orders turn into invoices is in Selling and Buying.
The lines an invoice posts
A Sales Invoice debits the customer on Debit To and credits each row's income account and each tax row's account. A Purchase Invoice does the opposite on Credit To and the rows' expense accounts. A rounding adjustment gets its own line.
A Sales Invoice of 10,000 plus 18% tax:
| Account | Debit | Credit |
|---|---|---|
| Debtors - AT | 11,800 | |
| Output Tax - AT | 1,800 | |
| Sales - AT | 10,000 |
On a Purchase Invoice, a stock item's expense goes to Stock Received But Not Billed, which clears the Purchase Receipt's credit there.
The system sets Outstanding Amount and Status. Payments move them through the Payment Ledger rows. A daily job marks an invoice Overdue when less is paid than the Payment Schedule rows already due. The statuses are Draft, Unpaid, Partly Paid, Overdue, Paid, Return, Credit Note Issued (Debit Note Issued on a Purchase Invoice), Internal Transfer and Cancelled.
Update Stock
With Update Stock ticked, a Sales Invoice moves the rows' stock out of the Source Warehouse on submit, as a Delivery Note does, and the GL books the cost of goods sold. Each stock row needs a warehouse. A Purchase Invoice with Update Stock brings the stock in and posts it to the warehouses' inventory accounts. It is refused when a Purchase Receipt already exists for the rows.
Advances
An advance is the unallocated part of a Payment Entry or a journal's advance row. The Advances table takes them.
- Tick Allocate Advances Automatically (FIFO) (Set Advances and Allocate (FIFO) on a Purchase Invoice) to fill the table from the party's advances, oldest first. Otherwise press Get Advances Received.
- Only Include Allocated Payments keeps only payments made against the invoice's orders.
- Submit allocates each row's Allocated Amount to the invoice, and Outstanding Amount drops by Total Advance.
Write-off and paid invoices
A Purchase Invoice with Is Paid takes a Mode of Payment, Cash/Bank Account and Paid Amount. It posts a debit to the supplier and a credit to the cash or bank account. A Write Off Amount debits the supplier and credits the Write Off Account.
On a Sales Invoice the write-off fields work only with Include Payment (POS) ticked. Write Off Outstanding Amount writes off whatever the payments leave.
Credit and debit notes
A credit note is a Sales Invoice with Is Return (Credit Note), negative quantities and Return Against naming the original. A Purchase Invoice return is a debit note.
- With Update Outstanding for Self on (the default), the return keeps its own negative outstanding amount. Off, its party line goes against the original and lowers that invoice's outstanding amount. A return larger than the original's outstanding amount turns the flag back on.
- Is Rate Adjustment Entry (Debit Note) charges the party more, with positive rows or a zero quantity.
POS payments on a Sales Invoice
Include Payment (POS) adds the Payments table (Sales Invoice Payment rows of Mode of Payment, Account and Amount). The invoice then has no payment schedule.
| Account | Debit | Credit |
|---|---|---|
| Cash - AT | 12,000 | |
| Debtors - AT | 12,000 | |
| Debtors - AT | 200 | |
| Cash - AT | 200 |
These lines come on top of the invoice's own lines, for a customer paying 12,000 cash on an 11,800 invoice. The second pair pays back the 200 change from Account for Change Amount, which is then required. Invoices made by a POS Closing Entry are cancelled through that closing entry only. Its Sales Invoices table (Sales Invoice Reference rows) is covered in POS.
Timesheets
Set Project and the Time Sheets table (Sales Invoice Timesheet rows) fills from its unbilled time logs on save. A log billed already is refused. Submit marks each log billed and updates the Timesheet's billed totals, and cancel clears them. The form has no Fetch Timesheet button yet.
Opening Invoice Creation Tool
Use it to load invoices still open in your previous system. Pick Company, Invoice Type (Sales or Purchase) and add one Invoices row per open invoice: Party ID, Posting Date, Due Date, Outstanding Amount and Temporary Opening Account.
The erp.opening_invoice_creation_tool.make_invoices RPC turns each row into a submitted invoice with Is Opening Entry set to Yes and one item line on the temporary account. The tool has no form button yet. Fifty rows or more run as a job chain. An opening invoice for 50,000 owed by a customer posts Debtors - AT 50,000 debit against Temporary Opening - AT.
- The company needs a Temporary account, or the tool refuses with "Please add a Temporary Opening account in Chart of Accounts".
- Each row needs a party (Create Missing Party makes one from Party Name), Outstanding Amount and a Temporary Opening Account of type Temporary.
- The previous system's Invoice Number goes into the invoice's remarks.
Invoice Discounting
Invoice Discounting pledges Sales Invoices to a bank for a short-term loan. Create > Invoice Discounting appears on a submitted Sales Invoice with something outstanding that is not a return and not discounted already.
erp.invoice_discounting.create_disbursement_entry drafts a Journal Entry: Bank Account debited the total less Bank Charges, Bank Charges Account debited the charges, Short Term Loan Account credited the total, and each invoice moved from the credit account to Accounts Receivable Discounted Account. Its submit makes the loan Disbursed, and an open invoice's status gains " and Discounted", such as Unpaid and Discounted.erp.invoice_discounting.close_loan drafts the repayment: the loan debited, the bank credited. Before Loan End Date, whatever the invoices still owe moves to Accounts Receivable Unpaid Account. Its submit makes the loan Settled.A payment against a discounted invoice books the discounted account while the loan is Disbursed and the unpaid account once it is Settled. An invoice can sit in one Invoice Discounting at a time, and a row's Outstanding Amount cannot exceed the invoice's.