So…
I've been doing some reading around this, and there are specific ways to
record these sorts of transactions in ledger.
*2024/04/01 * Acme Assets 7 ACM @ $10 Tax 3 ACM { = $10 }
IncomeP 2024/04/04 ACM $152024/04/04 ACM Spend Expenses 1 ACM
Assets*
- 7 ACM was purchased and is held
- 3 ACM was paid as tax at a fixed cost of 10 USD per ACM
Checkout 4.5.3 Fixing Lot Prices
<https://ledger-cli.org/doc/ledger3.html#Fixing-Lot-Prices>
Hope this helps
On Monday 20 May 2024 at 17:01:24 UTC+1 Pranshu Goyal wrote:
> This doesn't work as for the given example I expect Assets to be reported
> as $90 not $55. The reason being, after spending 1 ACM we have 6 ACM left
> in assets and the current price of ACM is $15. So 6 ACM should be reported
> as $90. Surprisingly in this example the Expenses is reported as $15 which
> matches the expectation.
>
> On Saturday 18 May 2024 at 20:43:10 UTC+5:30 Igbanam Ogbuluijah wrote:
>
>> Ah! I see what it is. — There's pricing information, but ledger doesn't
>> know what to do with it.
>>
>> I modified the ledger to add some transactions after the pricing
>> information changed.
>>
>>
>>
>>
>>
>>
>> *2024/04/01 * Acme Assets 7 ACM @ $10 Tax 3 ACM @ = $10
>> Income *
>>
>>
>>
>> *P 2024/04/04 ACM $152024/04/04 ACM Spend Expenses 1 ACM Assets*
>>
>> With this, when you run the balance report with *ledger -f file.ledger
>> balance -X $*, you see the price is used in the next transaction.
>>
>>
>>
>>
>>
>>
>> * $55 Assets $15 Expenses
>> $-100 Income $30 Tax--------------------
>> 0*
>>
>> Again, if there's some way to see the realtime value of a commodity, I
>> don't currently know this. But I've just realized if there's a transaction
>> after the pricing information, ledger will use that most recent pricing
>> information.
>>
>> Hope this helps clarify.
>>
>>
>> - Igbanam
>>
>> On Friday 5 April 2024 at 05:33:24 UTC+1 Pranshu Goyal wrote:
>>
>>> Let's consider this posting for a company's stock grant:
>>>
>>> *2024/04/01 * Acme*
>>>
>>> * Assets
>>> 7 ACM @ $10*
>>>
>>> * Tax
>>> 3 ACM @ = $10*
>>>
>>> * Income
>>> -$100*
>>>
>>>
>>>
>>> *P 2024/04/04 ACM $15*
>>>
>>>
>>> Here, the intention is to fix the price of stock used to pay tax, so
>>> balance reports in future report the same tax amount in dollar values even
>>> after stock price changes.
>>>
>>> Hence the command after price changes to $15:
>>>
>>> *ledger bal Tax -V*
>>>
>>> gives:
>>>
>>> *$30 Tax *
>>>
>>>
>>> Which follows the expectation. Now lets look at balance report for
>>> Assets asked after the price changed on 4th April 2024:
>>>
>>> *ledger bal Assets -V*
>>>
>>> this produces
>>>
>>> *$70 Assets*
>>>
>>>
>>> This in my opinion is unexpected behavior. I used fixed lot price
>>> syntax to fix the price for Tax but not for Assets, but it also fixed the
>>> price for assets. I'm not sure if I'm doing something wrong here or if it
>>> is a bug.
>>>
>>> Pranshu Goyal
>>>
>>>
--
---
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/17320448-1516-4695-af36-991997077612n%40googlegroups.com.