frappe / books

Free Accounting Software
https://frappe.io/books
GNU Affero General Public License v3.0
2.68k stars 614 forks source link

feature: accounting for taxes on payments #755

Closed mildred closed 6 months ago

mildred commented 9 months ago

In France, in some circumstances, tax are due not on invoicing but when the invoice is paid.

When the invoice is submitted, the following transaction shall be recorded

account debit credit
4111-customer 120
706-services 100
44574-Tax invoiced 20

Then, when the invoice is paid, the following transaction shall be recorded

account debit credit
4111-customer 120
5121-Bank 120
44574-Tax invoiced 20
44571-Tax collected 20

How to implement that? I suggest the tax template should for each row gain a new optional account as the destination to move the tax funds when the payment is submitted.

ALTER TABLE TaxDetail ADD COLUMN `payment_account` text default null;

If the payment account is not specified, then the current behavior continues. If the payment_account is specified, the extra transaction is added when there is a payment submitted.