Hi Eugene,

I have a system that pretty much does this...
In Spain, bills generally get a 21% VAT tax added.
VAT can be of different percentatges, but this only complicates things, and I guess you'll be able to extend my example if you need to.

First of all, you need to set up some standard accounts for handling incoming/outgoing bills. You need to have an account for storing the tax you receive from the bills you issue.
Since this is something you owe to the government, it should be a liability.
Something like Liabilities:VATPayable

On the other side, you will receive bills for your expenses.
Since this contains VAT tax you already paid, it should be recorded as an asset account.
Something like Assets:VATReceivable

In my case, I want to record when I get or issue the bill, and also when I receive or pay money from it.

An entry for an issued bill, will be something like this:
2013-12-26 * (#BILL-0000001) ClientName
Assets:AccountsReceivable:ClientName 242,00 €
Income

The recorded amount includes the 21% VAT.
But this is not exactly correct. My income is 200,00 € and 42,00 € is the VAT I owe to the government. In Spain, once you issue a bill, you owe it to the government, independently of having received the money from your client or not. In order to correctly record this, I have set up an automatic transaction, which I have placed on the top of the file.

This transaction looks like this:
= Income
Liabilities:VATPayable (21/121)
Income

This basically translates to:
Every time you find a transaction that involves an account that starts with "Income", take the amount, multiply it by 21 and divide it by 121. Then you apply that amount to "Liabilities:VATPayable" and the reverse again to "Income". I guess you know that ledger does not have credit and debit accounts, and instead uses plus and minus and the standard accounting convention. This convention says Income gets smaller (big negative number) every time you "get" money.
Liabilities also get smaller every time you "owe" more money.

In this case, the transaction says "Income" gets -242,00 € for the issued bill.
The automatic transaction will apply -42,00 € to Liabilities:VATPayable
-242,00 x 21 / 121 = -42,00 €
And 42,00 € to "Income", leaving it at 200,00 €, which is the correct Income you want to have.


An expense on the other hand, gets a transaction like this:
2013-12-26 * ProviderName
Expenses:Providers:ProviderName 50,00 €
Assets:Bank:BankName

I don't use an "AccountsPayable" And Now yaccount for recording received bills, because I normally record a received bill in ledger when I already have paid for it, but doing so would be handled exactly the same as above.

The 50,00 € on "Expenses:Providers:ProviderName" are VAT inclusive.
That is not correct.
To correct that, I have an automatic transaction, that looks like this:

= Expenses:Providers
Assets:VATReceivable (21/121)
Expenses:Providers (-21/121)

What this does is every time it encounters a transaction involving an account that starts with "Expenses:Providers" it adds two lines more to the transaction. The first one increases my "Assets:VATReceivable" account. (This is VAT I paid to my provider, and which the government "owes" me.) The second decreases my "Expenses:Providers" account, because my real expense is the amount without VAT.

The only problem with this automatic transaction is that the decrease always goes to "Expenses:Providers" and not to "Expenses:Providers:ProviderName".
You will have to have that in mind when doing reports.
(Maybe John or somebody else can chip in some help to get that also working...)


And basically that is it.
Income and Expenses will show the correct amounts.
You can start doing all sorts of cool reports.
For example, "ledger bal VAT" will give you a balance of what you have to pay to the government. If the dates you use in the transaction correspond to the actual dates in the corresponding bills, you can do something like: "ledger -b 2013-10-01 -e 2013-12-31 reg VAT" and obtain the amount of VAT you will have to pay to the government in the last quarter of 2013.


I hope this gets you started...

Regards, Stefan Tunsch



El 26/12/13 10:44, John Wiegley escribió:
Eugene Dzhurinsky <[email protected]> writes:
I have the account "Income", which is used to aggregate all incoming payments
from various customers. Now I'd like to setup a rule, which would calculate
amount of taxes I need to pay in the current month.
So it should take into account only rolling income for current month.
How would I do that with ledger? Some rule to automatically transfer some
fund to dedicated "Tax" account and then simply run a report on this account
for the given month?
Ledger is really only designed for tracking the flow of money from account to
account; it's not really for doing complicated reports using those sums.
However, you could export the numbers that you need to work with, and then
import them into something else.  Unless anyone else has an idea of how this
might be accomplished with automated transactions.

John


--

--- You received this message because you are subscribed to the Google Groups "Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to