On Sun, Sep 24, 2017 at 6:42 AM, Ivanov Dmitry <[email protected]> wrote: > Suppose, we have the following ledger file: > > 2017-03-01 * > Assets:Bank account $1000 > Equity:Opening Balances > > 2017-03-02 > Expenses:Materials $200 > Assets:Bank account > > 2017-03-04 > Expenses:Salary $300 > Assets:Bank account > > 2017-03-04 > Assets:Bank account $600 > Income > > Can ledger calculate the profit earned by formula: -Income - Sum(Expenses)? > > So, it will be: Profit = -(-600) - 500 = 600 - 500 = 100
You can use the “ledger register” command with a query to limit the report to income and expenses accounts. $ ledger -f test.ledger reg '^Expenses|^Income' 2017-03-02 <Unspecified payee> Expenses:Materials $200 $200 2017-03-04 <Unspecified payee> Expenses:Salary $300 $500 2017-03-04 <Unspecified payee> Income $-600 $-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]. For more options, visit https://groups.google.com/d/optout.
