That's a fun query. This may you started (can use in fava's query). Include
or remove "desc" to sort the non-zero (un-paid) invoices into view.
select links, sum(position) as balance
where account ~ "Liabilities:Invoices"
group by links
order by balance desc
You might also use transaction flags. This still requires editing old
transactions, but "!" is intended for use with incomplete transactions
<https://beancount.github.io/docs/beancount_language_syntax.html#transactions>.
Other characters can be used as well, say "%". Search these out with fava
filter *flag:"%"*
2024-05-01 % "Invoice"
Liabilities:Invoices
Expenses:Expense 123 USD
Paul
On Friday, May 31, 2024 at 9:52:07 AM UTC-4 [email protected] wrote:
I'm not sure if this is expressible in BQL (I'm not at my computer right
now to try this out), but conceptually you could write a query that sums up
the amount of each posting from your "Accounts Receivable" account, grouped
by tag. Then filters out tags that don't match your invoice tag pattern,
and then filters out groups that have a zero sum.
If this isn't expressible in BQL, you could use beancount's Python API to
do this in Python with probably only a few lines of code.
Gary
On Friday, May 31, 2024 at 3:07:34 PM UTC+2 Maurice de Laat wrote:
Hello all!
First message, let me start by thanking for such a wonderful piece of
software!
Currently seeking my way through beancount and fava and wondering what
would be a good way to find invoices that have yet to be payed.
I could tag an incoming or outgoing invoice with p.e. "^tobepayed", and
remove that tag when the invoice is being payed, but that would mean that I
would have to change a previous transaction's tag which seems as not the
most practical thing to do.
Currently I do have an unique tag for each invoice which is being used when
the invoice is received as well as when the invoice is being payed. It
would be great if I could use these tags to find the invoices yet to be
payed.
Any thoughts?
Thank you!
Maurice
--
You received this message because you are subscribed to the Google Groups
"Beancount" 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/beancount/f973f028-a4fe-47e7-95d8-7e37acee3f6an%40googlegroups.com.