epogrebnyak / abacus

A small yet valid double-entry accounting system in Python and command line.
https://epogrebnyak.github.io/abacus/
GNU General Public License v3.0
59 stars 4 forks source link

Add medici-style entries #81

Closed epogrebnyak closed 3 months ago

epogrebnyak commented 3 months ago

Now write an entry:

// You can specify a Date object as the second argument in the book.entry() method if you want the transaction to be for a different date than today const journal = await myBook .entry("Received payment") .debit("Assets:Cash", 1000) .credit("Income", 1000, { client: "Joe Blow" }) .commit();

You can continue to chain debits and credits to the journal object until you are finished. The entry.debit() and entry.credit() methods both have the same arguments: (account, amount, meta).