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/c8afb1e6-882e-43e9-9b6c-75b777664152n%40googlegroups.com.

Reply via email to