If you need your expenses denominated in Rs (eg for tax purposes) then you 
can expand the currency conversions as shown:

2023/07/18 * OpenAI Invoice
    liabilities:vendors:openai              $ -14.83
    expenses:programming

2023/07/24 * OpenAI Payment Receipt
    liabilities:card:icici                  $ -14.83
    liabilities:vendors:openai

2023/07/24 * Currency Conversion
    liabilities:card:icici                  Rs -1267.82
    liabilities:card:icici                  $ 14.83
    expenses:programming                    $ -14.83
    expenses:programming                    Rs 1267.82

2023/08/08 * OpenAI Invoice
    liabilities:vendors:openai               $ -0.79
    expenses:programming

2023/08/15 * OpenAI Payment Receipt
    liabilities:card:icici                   $ -0.79
    liabilities:vendors:openai

2023/08/15 * Currency Conversion
    liabilities:card:icici                  Rs -68.36
    liabilities:card:icici                  $ 0.79
    expenses:programming                    $ -0.79
    expenses:programming                    Rs 68.36

2023/09/13 * OpenAI Invoice
    liabilities:vendors:openai              $ -10.67
    expenses:programming

2023/10/03 * OpenAI Payment Receipt
    liabilities:card:icici                  $ -10.67
    liabilities:vendors:openai

2023/10/03 * Currency Conversion
    liabilities:card:icici                  Rs -924.11
    liabilities:card:icici                  $ 10.67
    expenses:programming                    $ -10.67
    expenses:programming                    Rs 924.11

$ ledger -f vedang3.txt bal | cat
          Rs 2260.29  expenses:programming
         Rs -2260.29  liabilities:card:icici
--------------------
                   0

You can also add in any fees that icici charged you for the conversions. 
You can still get the total amount spent in $ and the Rs that it cost you 
by running a balance filtering on expenses (or icici card) AND Currency 
Conversion:

$ ledger -f vedang3.txt bal expenses and @currency | cat
            $ -26.29
          Rs 2260.29  expenses:programming


On Tuesday, February 6, 2024 at 10:22:20 AM UTC+8 Vedang wrote:

> Thank you! The second approach works for me! I can only see the
> clearance information in the credit card statement, so I don't have
> that data immediately after making the payment.
>
> Can you also please explain why the change in representation fixes the
> problem? Running `ledger -X Rs reg` shows me that Commodity
> Revaluation is still happening, but I guess the new style of writing
> transactions pushed the revaluation data to the
> `liabilities:card:icici` account instead?
>
> On Tue, Feb 6, 2024 at 6:12 AM psionl0 <[email protected]> wrote:
> >
> > How about modifying the transactions this way?
> > 2023/07/18 * OpenAI Invoice
> > liabilities:vendors:openai $ -14.83
> > expenses:programming
> >
> > 2023/07/24 * OpenAI Payment Receipt
> > liabilities:card:icici Rs -1267.82
> > liabilities:vendors:openai $ 14.83
> >
> > 2023/08/08 * OpenAI Invoice
> > liabilities:vendors:openai $ -0.79
> > expenses:programming
> >
> > 2023/08/15 * OpenAI Payment Receipt
> > liabilities:card:icici Rs -68.36
> > liabilities:vendors:openai $ 0.79
> >
> > 2023/09/13 * OpenAI Invoice
> > liabilities:vendors:openai $ -10.67
> > expenses:programming
> >
> > 2023/10/03 * OpenAI Payment Receipt
> > liabilities:card:icici Rs -924.11
> > liabilities:vendors:openai $ 10.67
> >
> > Then when you run a balance report you get the following:
> > $ ledger -f vedang.txt bal | cat
> > $ 26.29 expenses:programming
> > Rs -2260.29 liabilities:card:icici
> > --------------------
> > $ 26.29
> > Rs -2260.29
> >
> > You can also keep the currency conversions in-card (handy if the 
> clearance date is different to the payment date)
> > 2023/07/18 * OpenAI Invoice
> > liabilities:vendors:openai $ -14.83
> > expenses:programming
> >
> > 2023/07/24 * OpenAI Payment Receipt
> > liabilities:card:icici $ -14.83
> > liabilities:vendors:openai
> >
> > 2023/07/24 * Currency Conversion
> > liabilities:card:icici Rs -1267.82
> > liabilities:card:icici $ 14.83
> >
> > 2023/08/08 * OpenAI Invoice
> > liabilities:vendors:openai $ -0.79
> > expenses:programming
> >
> > 2023/08/15 * OpenAI Payment Receipt
> > liabilities:card:icici $ -0.79
> > liabilities:vendors:openai
> >
> > 2023/08/15 * Currency Conversion
> > liabilities:card:icici Rs -68.36
> > liabilities:card:icici $ 0.79
> >
> > 2023/09/13 * OpenAI Invoice
> > liabilities:vendors:openai $ -10.67
> > expenses:programming
> >
> > 2023/10/03 * OpenAI Payment Receipt
> > liabilities:card:icici $ -10.67
> > liabilities:vendors:openai
> >
> > 2023/10/03 * Currency Conversion
> > liabilities:card:icici Rs -924.11
> > liabilities:card:icici $ 10.67
> >
> >
> > $ ledger -f vedang2.txt bal | cat
> > $ 26.29 expenses:programming
> > Rs -2260.29 liabilities:card:icici
> > --------------------
> > $ 26.29
> > Rs -2260.29
> > On Monday, February 5, 2024 at 5:57:26 PM UTC+8 Vedang Manerikar wrote:
> >>
> >> Hello All,
> >>
> >> This is the first time I am posting, so if this question is already 
> answered previously, I'm sorry for the noise and please direct me to it. I 
> did some searching but could not find it.
> >>
> >> I live in India and the default currency I want to see reports in is Rs 
> (Rupees). Payments to international service providers happens in $, and 
> then on my credit card statement I see the actual amount I was charged in 
> Rupees. Here are some example transactions:
> >>
> >> 2023/07/18 * OpenAI Invoice
> >> liabilities:vendors:openai $ -14.83
> >> expenses:programming
> >>
> >> 2023/07/24 * OpenAI Payment Receipt
> >> liabilities:card:icici $ -14.83 @@ Rs 1267.82
> >> liabilities:vendors:openai
> >>
> >> 2023/08/08 * OpenAI Invoice
> >> liabilities:vendors:openai $ -0.79
> >> expenses:programming
> >>
> >> 2023/08/15 * OpenAI Payment Receipt
> >> liabilities:card:icici $ -0.79 @@ Rs 68.36
> >> liabilities:vendors:openai
> >>
> >> 2023/09/13 * OpenAI Invoice
> >> liabilities:vendors:openai $ -10.67
> >> expenses:programming
> >>
> >> 2023/10/03 * OpenAI Payment Receipt
> >> liabilities:card:icici $ -10.67 @@ Rs 924.11
> >> liabilities:vendors:openai
> >>
> >> Here, OpenAI sends me an invoice in $, I make the payment on my credit 
> card in $, and then I look at the credit card statement to see how much I 
> was actually charged in Rs by the bank and note that amount down.
> >>
> >> The problem is that I'd like `ledger -X Rs bal 
> liabilities:vendors:openai` to show that I owe 0 Rs to pay back to OpenAI, 
> but it does not do so due to the fluctuating $ price.
> >>
> >> How do I do this?
> >>
> >> I've read the commodities and lot-prices sections of the manual, but 
> perhaps I didn't understand them correctly. The changing rate of the $ is 
> important information that I want to capture, but it's equally important 
> that the liabilities:vendors account be balanced properly.
> >>
> >> Thanks,
> >> Vedang
> >
> > --
> >
> > ---
> > You received this message because you are subscribed to a topic in the 
> Google Groups "Ledger" group.
> > To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/ledger-cli/PjqvqTL52s0/unsubscribe.
> > To unsubscribe from this group and all its topics, send an email to 
> [email protected].
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ledger-cli/abddc688-26e7-406c-ab9f-869161d04fccn%40googlegroups.com
> .
>
>
>
> -- 
> Cheers,
> Vedang
>
> https://vedang.me
> @vedang on fosstodon.org
>

-- 

--- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/0292cc84-aec1-4242-ba21-6972668f5e9an%40googlegroups.com.

Reply via email to