On Thu, 26 Jan 2023 at 23:12, Tavis Ormandy <[email protected]> wrote:

> Hello, I'm trying to start tracking my expenses with ledger, but I have
> a question about the best way to split transactions.
>
> Is there a variable I can reference that evaluates to the sum of
> postings so far?
>
> 2023/01/01 Department Store
>     Expenses:Clothing      $8.99             ; T-Shirt
>     Expenses:Household     $11.99            ; Light Bulbs
>     Expenses:Coffee        $3.99
>     Expenses:Entertainment $7.99             ; Book
>     Expenses:Groceries     ($100 - $8.99 - $11.99 - $3.99 - $7.99)  ; Ugly :(
>     Liabilities:Credit    $-100

You can just omit the amount in a single posting. It will be
calculated so that the whole transaction balances.

(Also be aware that you need at least two spaces between the account
name and amount.)

    2023/01/01 Department Store
        Expenses:Clothing        $8.99 ; T-Shirt
        Expenses:Household      $11.99 ; Light Bulbs
        Expenses:Coffee          $3.99
        Expenses:Entertainment   $7.99 ; Book
        Expenses:Groceries
        Liabilities:Credit    $-100

-- 

--- 
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/CAP_d_8U_Y1BXgJFjkhZ7fEWB6LrCmp3G1-8O9QD5_LjZBErZKA%40mail.gmail.com.

Reply via email to