Re: Understanding primary commodities

2021-12-10 Thread Martin Michlmayr
* psionl0  [2021-12-10 00:32]:
> "I thought that by adding the ; [=DATE] in methods 2 and 3 I was recording 
> the day the paypal account was settled, am I wrong?"
> You are putting the date in a comment which means it has no effect on the 
> reports that Ledger generates.

It's actually valid syntax for an aux date on a posting; you have to
use --effective to use the aux date.

# ledger -f e reg payp
2021-05-20 Starbucks   Assets:Paypal-90.00 EUR   -90.00 EUR
   Assets:Paypal 90.00 EUR0
   Assets:Paypal-80.00 GBP   -80.00 GBP
# ledger -f e reg payp --effective
2021-05-22 Starbucks   Assets:Paypal-90.00 EUR   -90.00 EUR
2021-05-31 Starbucks   Assets:Paypal 90.00 EUR0
^^
2021-05-22 Starbucks   Assets:Paypal-80.00 GBP   -80.00 GBP

-- 
Martin Michlmayr
https://www.cyrius.com/

-- 

--- 
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 ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/YbNcu0sBnLiv91Hk%40jirafa.cyrius.com.


Re: Understanding primary commodities

2021-12-10 Thread psionl0
"I thought that by adding the ; [=DATE] in methods 2 and 3 I was recording 
the day the paypal account was settled, am I wrong?"
You are putting the date in a comment which means it has no effect on the 
reports that Ledger generates. It is not necessarily wrong but I prefer to 
see a one to one correspondence between Ledger transactions and entries in 
external (bank) accounts. It makes reconciliation much easier.

"In fact I meant the Paypal account because in this scenario I actually 
have an AED account in my Paypal wallet that I periodically top-up. 
Therefore, when I want to settle the transaction, I basically do an 
internal exchange conversion within my Paypal wallet"
Maybe you should do your transaction like this?:
2021/04/01 * Currency Exchange
Assets:Paypal:EUR  25.00 EUR @@ 100.00 AED
Assets:Paypal:AED



On Friday, December 10, 2021 at 2:40:21 AM UTC+8 POliveira wrote:

> Thanks.
>
> "[...] I prefer method 1 since it correctly records the day the paypal 
> account is settled"
> I thought that by adding the ; [=DATE] in methods 2 and 3 I was recording 
> the day the paypal account was settled, am I wrong? 
>
> "Note that the Currency Exchange transaction is wrong because it suggests 
> that Paypal provided the AED for you to settle the Paypal account. It is 
> more likely that you got the AED from your bank account to settle the 
> paypal account."
> In fact I meant the Paypal account because in this scenario I actually 
> have an AED account in my Paypal wallet that I periodically top-up. 
> Therefore, when I want to settle the transaction, I basically do an 
> internal exchange conversion within my Paypal wallet.
>
> On Thu, Dec 9, 2021 at 11:42 AM psionl0  wrote:
>
>> For my 2 cents, I prefer method 1 since it correctly records the day the 
>> paypal account is settled. Note that the Currency Exchange transaction is 
>> wrong because it suggests that Paypal provided the AED for you to settle 
>> the Paypal account. It is more likely that you got the AED from your bank 
>> account to settle the paypal account.
>> So the transaction should look like
>> 2021/04/01 * Currency Exchange
>> Assets:Paypal 25.00 EUR @@ 100.00 AED
>> Assets:Bank
>>
>>
>> On Thursday, December 9, 2021 at 8:27:53 AM UTC+8 Martin Michlmayr wrote:
>>
>>> I don't have time to think through your samples right now and I hope 
>>> someone else will respond. 
>>>
>>> However, I wanted to mention Peter Selinger's tutorial on multiple 
>>> currency accounting: 
>>> https://www.mathstat.dal.ca/~selinger/accounting/tutorial.html 
>>>
>>> Reading/applying this has been on my TODO list for years, but I'm 
>>> being told it's a good way to handle transactions with multiple 
>>> currencies. 
>>>
>>> (If anyone uses this and wants to comment, I'd appreciate it.) 
>>>
>>> -- 
>>> Martin Michlmayr 
>>> https://www.cyrius.com/ 
>>>
>> -- 
>>
>> --- 
>> 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 ledger-cli+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ledger-cli/cf24589d-6e0a-4289-a1a4-c140ea60f12dn%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 

--- 
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 ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/704543cc-7c85-4cee-8c95-5312c2bfd3d8n%40googlegroups.com.


Re: Understanding primary commodities

2021-12-09 Thread Stanko Trček
Thanks, for Peter Selinger's tutorial link.

četrtek, 9. december 2021 ob 01:27:53 UTC+1 je oseba Martin Michlmayr 
napisala:

> I don't have time to think through your samples right now and I hope
> someone else will respond.
>
> However, I wanted to mention Peter Selinger's tutorial on multiple
> currency accounting:
> https://www.mathstat.dal.ca/~selinger/accounting/tutorial.html
>
> Reading/applying this has been on my TODO list for years, but I'm
> being told it's a good way to handle transactions with multiple
> currencies.
>
> (If anyone uses this and wants to comment, I'd appreciate it.)
>
> -- 
> Martin Michlmayr
> https://www.cyrius.com/
>

-- 

--- 
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 ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/d6a34e22-30ea-4e90-9311-82ce53a329ben%40googlegroups.com.


Re: Understanding primary commodities

2021-12-09 Thread Paulo Oliveira
Thanks.

"[...] I prefer method 1 since it correctly records the day the paypal
account is settled"
I thought that by adding the ; [=DATE] in methods 2 and 3 I was recording
the day the paypal account was settled, am I wrong?

"Note that the Currency Exchange transaction is wrong because it suggests
that Paypal provided the AED for you to settle the Paypal account. It is
more likely that you got the AED from your bank account to settle the
paypal account."
In fact I meant the Paypal account because in this scenario I actually have
an AED account in my Paypal wallet that I periodically top-up. Therefore,
when I want to settle the transaction, I basically do an internal exchange
conversion within my Paypal wallet.

On Thu, Dec 9, 2021 at 11:42 AM psionl0  wrote:

> For my 2 cents, I prefer method 1 since it correctly records the day the
> paypal account is settled. Note that the Currency Exchange transaction is
> wrong because it suggests that Paypal provided the AED for you to settle
> the Paypal account. It is more likely that you got the AED from your bank
> account to settle the paypal account.
> So the transaction should look like
> 2021/04/01 * Currency Exchange
> Assets:Paypal 25.00 EUR @@ 100.00 AED
> Assets:Bank
>
>
> On Thursday, December 9, 2021 at 8:27:53 AM UTC+8 Martin Michlmayr wrote:
>
>> I don't have time to think through your samples right now and I hope
>> someone else will respond.
>>
>> However, I wanted to mention Peter Selinger's tutorial on multiple
>> currency accounting:
>> https://www.mathstat.dal.ca/~selinger/accounting/tutorial.html
>>
>> Reading/applying this has been on my TODO list for years, but I'm
>> being told it's a good way to handle transactions with multiple
>> currencies.
>>
>> (If anyone uses this and wants to comment, I'd appreciate it.)
>>
>> --
>> Martin Michlmayr
>> https://www.cyrius.com/
>>
> --
>
> ---
> 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 ledger-cli+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ledger-cli/cf24589d-6e0a-4289-a1a4-c140ea60f12dn%40googlegroups.com
> 
> .
>

-- 

--- 
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 ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/CAOi8OUKWRZvaQ16urs91dp2ypzA3PZ5C3iHyJMFs%2BMRRc6ZhZg%40mail.gmail.com.


Re: Understanding primary commodities

2021-12-08 Thread psionl0
For my 2 cents, I prefer method 1 since it correctly records the day the 
paypal account is settled. Note that the Currency Exchange transaction is 
wrong because it suggests that Paypal provided the AED for you to settle 
the Paypal account. It is more likely that you got the AED from your bank 
account to settle the paypal account.
So the transaction should look like
2021/04/01 * Currency Exchange
Assets:Paypal 25.00 EUR @@ 100.00 AED
Assets:Bank


On Thursday, December 9, 2021 at 8:27:53 AM UTC+8 Martin Michlmayr wrote:

> I don't have time to think through your samples right now and I hope
> someone else will respond.
>
> However, I wanted to mention Peter Selinger's tutorial on multiple
> currency accounting:
> https://www.mathstat.dal.ca/~selinger/accounting/tutorial.html
>
> Reading/applying this has been on my TODO list for years, but I'm
> being told it's a good way to handle transactions with multiple
> currencies.
>
> (If anyone uses this and wants to comment, I'd appreciate it.)
>
> -- 
> Martin Michlmayr
> https://www.cyrius.com/
>

-- 

--- 
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 ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/cf24589d-6e0a-4289-a1a4-c140ea60f12dn%40googlegroups.com.


Re: Understanding primary commodities

2021-12-08 Thread Martin Michlmayr
I don't have time to think through your samples right now and I hope
someone else will respond.

However, I wanted to mention Peter Selinger's tutorial on multiple
currency accounting:
https://www.mathstat.dal.ca/~selinger/accounting/tutorial.html

Reading/applying this has been on my TODO list for years, but I'm
being told it's a good way to handle transactions with multiple
currencies.

(If anyone uses this and wants to comment, I'd appreciate it.)

-- 
Martin Michlmayr
https://www.cyrius.com/

-- 

--- 
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 ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/YbFNgCScR5BNObiV%40jirafa.cyrius.com.


Re: Understanding primary commodities

2021-12-07 Thread POliveira
Allow me to add some more complexity.
To test these samples when a sequence of transaction occurs, wherein the 
exchange rate might actually change over time, I've created a sample with 3 
purchases in 3 different currencies (BRL, USD, and GBP). Default paypal 
account is EUR (all payments are automatically converted into EUR), but I 
want to settle in AED, locking the currency exchange rate in a way that 
does not expose me to that currency price anymore.
To be more realistic, let's say I do that sort of "hedging" for only 2 out 
of my 3 purchases (sometimes I forget to settle).
I found yet a 3rd possible way to represent this.

Option #1

2021/03/31 * KFC
Expenses:Food 150.00 BRL {=0.6667 AED}
Assets:Paypal-25.00 EUR

2021/04/01 * Currency Exchange
Assets:Paypal 25.00 EUR
Assets:Paypal -100.00 AED

2021/04/20 * Starbucks
Expenses:Food   30.00 USD
Assets:Paypal-20.00 EUR

2021/04/28 * McDonalds
Expenses:Food   50.00 GBP {=5.4 AED}
Assets:Paypal-60.00 EUR

2021/04/29 * Currency Exchange
Assets:Paypal 60.00 EUR
Assets:Paypal  -270.00 AED

Option #2

2021/03/31 * KFC
Expenses:Food 150.00 BRL @@ 100 AED
Assets:Paypal-25.00 EUR
Assets:Paypal 25.00 EUR ; [=2021/04/01]
Assets:Paypal  -100.00 AED ; [=2021/04/01]

2021/04/20 * Starbucks
Expenses:Food   30.00 USD
Assets:Paypal-20.00 EUR

2021/04/28 *  McDonalds
Expenses:Food   50.00 GBP @@ 270 AED
Assets:Paypal-60.00 EUR
Assets:Paypal 60.00 EUR ; [=2021/04/29]
Assets:Paypal  -270.00 AED ; [=2021/04/29]

Option #3 (new)

2021/03/31 * KFC
Expenses:Food 150.00 BRL {=0.6667 AED} @@ 25 EUR
Assets:Paypal-25.00 EUR
Assets:Paypal 25.00 EUR @@ 100 AED ; [=2021/04/01]
Assets:Paypal  -100.00 AED ; [=2021/04/01]

2021/04/20 * Starbucks
Expenses:Food   30.00 USD
Assets:Paypal-20.00 EUR

2021/04/28 *  McDonalds
Expenses:Food   50.00 GBP {=5.4 AED} @@ 60 EUR
Assets:Paypal-60.00 EUR
Assets:Paypal 60.00 EUR @@ 270 AED ; [=2021/04/29]
Assets:Paypal -270.00 AED ; [=2021/04/29]

My question remains:
1) What is the difference between the above options?
2) What is the best way to record these transactions?

Many thanks, Paulo
On Tuesday, December 7, 2021 at 10:52:46 PM UTC+4 POliveira wrote:

> Dear all,
> I have been playing around with commodities because I frequently spend 
> money in different currencies and I then settle it with an internal 
> currency exchange within my own accounts.
>
> I would like to understand if the following 2 samples are exactly 
> equivalent or, otherwise, what distinguishes them.
>
> Sample #1
>
> 2021/05/20=2021/05/22 * Starbucks
> Expenses:Food 100.00 USD {=0.8 GBP}
> Assets:Paypal-90.00 EUR
>
> 2021/05/31 * Currency Exchange
> ; Starbucks payment settlement
> Assets:Paypal 90.00 EUR
> Assets:Paypal-80.00 GBP
>
> Sample #2
>
> 2021/05/20=2021/05/22 * Starbucks
> Expenses:Food 100.00 USD @@ 80.00 GBP
> Assets:Paypal-90.00 EUR
> Assets:Paypal 90.00 EUR ; [=2021/05/31]
> Assets:Paypal-80.00 GBP
>
> What I am trying to record here is the following:
> On May 21 I use my paypal card to pay a bill of 100 USD at Starbucks.
> My paypal's default account is EUR, therefore it debits 90 EUR from my 
> wallet (automatic conversion).
> My income is in GBP so I rather settle my expenses in that same currency, 
> therefore I do a currency conversion within my Paypall app, buying 90 EUR 
> with 80 GBP. Because this is a manual process, sometimes it happens only a 
> few days later (on May 31 in this example).
>
> Would you agree with my way of recording these transaction or would you do 
> it differently?
>
> Many thanks, POliveira
>

-- 

--- 
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 ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/6ed686e2-b064-45cf-b853-bcd9df6b4db0n%40googlegroups.com.


Understanding primary commodities

2021-12-07 Thread POliveira
Dear all,
I have been playing around with commodities because I frequently spend 
money in different currencies and I then settle it with an internal 
currency exchange within my own accounts.

I would like to understand if the following 2 samples are exactly 
equivalent or, otherwise, what distinguishes them.

Sample #1

2021/05/20=2021/05/22 * Starbucks
Expenses:Food 100.00 USD {=0.8 GBP}
Assets:Paypal-90.00 EUR

2021/05/31 * Currency Exchange
; Starbucks payment settlement
Assets:Paypal 90.00 EUR
Assets:Paypal-80.00 GBP

Sample #2

2021/05/20=2021/05/22 * Starbucks
Expenses:Food 100.00 USD @@ 80.00 GBP
Assets:Paypal-90.00 EUR
Assets:Paypal 90.00 EUR ; [=2021/05/31]
Assets:Paypal-80.00 GBP

What I am trying to record here is the following:
On May 21 I use my paypal card to pay a bill of 100 USD at Starbucks.
My paypal's default account is EUR, therefore it debits 90 EUR from my 
wallet (automatic conversion).
My income is in GBP so I rather settle my expenses in that same currency, 
therefore I do a currency conversion within my Paypall app, buying 90 EUR 
with 80 GBP. Because this is a manual process, sometimes it happens only a 
few days later (on May 31 in this example).

Would you agree with my way of recording these transaction or would you do 
it differently?

Many thanks, POliveira

-- 

--- 
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 ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/84e8d510-2dc2-4921-b4fa-3a4232500111n%40googlegroups.com.