* Brandon Olivares <programmer2...@gmail.com> [2018-07-23 13:44]:
> I know I can do:
> 
> ledger bal ^income ^equity
> 
> But again the problem is, my opening balance also includes a transfer to a 
> liability, so that will throw off my amount.

So you want: all income and all equity but only if the transaction
doesn't involve a liability?  This can be done with:

    ledger bal "^income" "^equity" and not expr "any(account =~ /^Liability/)"

> Basically I want a way to get the amount of all inflows to all assets, which 
> was not transferred from another asset.

I don't know how to do this query.  If you wanted to query Bank:A and
ignore all transactions that involve Bank:B you could do:

    bal "Assets:Bank:A" and not expr "any(account =~ /^assets:bank:b/)"

but this isn't what you want.

How do you transfer from Bank:A to Bank:B?  It sounds you do a direct
transfer, but then you possibly end up with duplicate transactions.  I
do:

Assets:Bank:A -> Assets:Transfer -> Assets:Bank:B

then you could do:

    bal "Assets:Bank" and not expr "any(account =~ /^Assets:Transfer/)"

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to