Richard, I have tested ledger on my example. Once can see input file in Appendix B <https://docs.google.com/document/d/1z57E8KZ9hIF71s39dDKaE5ow1N7BdJ-eX8y2BFjR9kc/edit#heading=h.rbdsv2jo0h1k> of my document
It looks like ledger is able to do calculation they I would have expected them to be done. Which is cool! But, as you said yourself, it is not possible to make ledger put in all in one report and to show overall balance One would have to query ledger is different ways and paste together different parts of different reports, to get the situation as presented in Appendix A <https://docs.google.com/document/d/1z57E8KZ9hIF71s39dDKaE5ow1N7BdJ-eX8y2BFjR9kc/edit#heading=h.ibvb27d8cznn> To get Gain due to commodity price change (trading account) ledger -f InputFile.txt bal Assets Liabilities --unrealized -X EUR EUR2048 Assets:Payment EUR-736 Equity:Unrealized Gains -------------------- EUR1312 Note: the fact that ledger puts Assets / Liabilities and Unrealized gain in the same report and shows balance between then does not seem to make sense for me at the moment. It is not clear, what the resulting balance EUR1312 is meant to show. Any way, the unrealized gain is calculated as per Appendix A <https://docs.google.com/document/d/1z57E8KZ9hIF71s39dDKaE5ow1N7BdJ-eX8y2BFjR9kc/edit#heading=h.ibvb27d8cznn> To see the latest balance sheet-like report ledger -f InputFile.txt bal Assets Liabilities -X EUR EUR2048 Assets:Payment To see the Expenses and Income and their balance ledger -f InputFile.txt bal Expenses Income -X EUR -H EUR288 Expenses:Shopping EUR-600 Income:Salary -------------------- EUR-312 Note: it there would be a way to add unrealized gains in this report, but NOT to include Assets and Liabilities, this would be exactly what I am looking for in terms of Income statement-like report, which shows all changes in one report To list all changes to Assets and Liabilities including “Gain due to commodity price change” ledger -f InputFile.txt reg Assets Liabilities -X EUR 18-Jan-01 Opening balance Assets:Payment EUR1000 EUR1000 18-Feb-01 Commodities revalued <Revalued> EUR200 EUR1200 18-Feb-02 Step 2 Shopping 1 Assets:Payment EUR-120 EUR1080 18-Feb-03 Step 3. Salary 1 Assets:Payment EUR600 EUR1680 18-Feb-04 Commodities revalued <Revalued> EUR280 EUR1960 18-Feb-05 step 5. Shopping wi.. Liabilities:CreditCard EUR-168 EUR1792 18-Feb-06 Commodities revalued <Revalued> EUR256 EUR2048 18-Feb-07 Step 7. Payment to .. Liabilities:CreditCard EUR192 EUR2240 Assets:Payment EUR-192 EUR2048 On Monday, March 11, 2019 at 11:05:26 AM UTC+1, Richard Lawrence wrote: > > Hi Chary and all, > > I don't have time for a long reply but here are some quick thoughts: > > Chary Chary <[email protected] <javascript:>> writes: > > > > The approach is quite simple > > > > 1. > > > > Expenses are tracked at the historical exchange rate (e.i. at the > > exchange rate, available during transaction). When exchange rate > changes, > > Expenses and Income do not get re-calculated. > > > > This is believed to be inline with conventional wisdom , that if you > have > > consumed pizza for 10 USD, there is no reason to re-calculate how much > this > > pizza is worth now in EUR, when USD/EUR exchange rate changed. It only > > makes sense to know how much that pizza was worth in EUR, when you > consumed > > it. > > This sounds like ledger's -H/--historical flag. > > > 1. > > > > Assets and Liabilities on the other side are recalculated with every > > event of exchange rate change. > > > > This is also inline with conventional wisdom. If you own 1000 of > Currency / > > stock XYZ and all of a sudden this currency became more expensive (just > > think of Bitcoin), this means you actually got reacher and you want to > see > > it. > > This sounds like ledger's -X/--exchange flag, in combination with price > declarations. > > > 1. > > > > The exchange rate changes are taken care in the following way: > > > > A special Commodity Revaluation transaction is logged. Following the > > principle of double-entry accounting > > > > - > > > > one shoulder of transaction is logged to corresponding Asset and / or > > Liability accounts to adjust these accounts to new exchange rate. > > - > > > > another shoulder is logged to special Gain due to commodity price > change (trading > > account, using Peter Selinger’s terminology). > > > I *think* these commodity revaluation transactions are the same as those > generated automatically (which you can see in the register report) when > you run with -X. (If not, you may need to do something to model these > transactions in your journal file the way you want them, perhaps with > some combination of costs ('@' syntax), lot prices ('{ }' syntax), and > (real or virtual) accounts to track the gains and losses.) > > So do the following commands show you the answers to the questions that > you're looking for? > > 1) ledger reg -H Expenses Income > 2) ledger reg Assets Liabilities -X 'USD' # or whatever currency > > I realize that these are not balance reports where the totals are > grouped by account (but then again, neither is your spreadsheet). But > do they give you all the information you need to see how you got from > one balance sheet to a later one? > > It would be helpful if you could enter the data in your spreadsheet into > a ledger journal file and then see if/how these reports from ledger > differ from what you expect, based on your own spreadsheet. > > -- > Best, > Richard > -- --- 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/d/optout.
