On 2022-02-19 Sat, Martin Blais wrote: > Can you share a minimal example input that will trigger this case? > Thank you, >
Sure. Assume this ledger: ;;=== plugin "beancount.plugins.tag_pending" 2022-01-01 open Assets:Reimbursable 2022-01-01 open Liabilities:CredCard1 2022-01-01 open Liabilities:CredCard2 2022-02-19 txn "A reimbursable expense" "" ^2022feb Assets:Reimbursable 50.00 USD Liabilities:CredCard1 2022-02-19 txn "Another reimbursable expense" "" ^2022feb Assets:Reimbursable 35.00 USD Liabilities:CredCard1 ;; 2022-02-19 txn "Another reimbursable expense" "charged to different card" ^2022feb ;; Assets:Reimbursable 30.00 USD ;; Liabilities:CredCard2 ;;=== And run this query: bean-query ledger.beancount "SELECT date,description,position WHERE account ~ 'reimbursable' and 'PENDING' IN tags" If you run it with the third transaction (charged to a different credit card) commented, then the report is empty. If you run it with the third transaction uncommented, then the report has the appropriate response. I know that folks are focussed on beancount 3 these days and that you might not want to spend time on this, so I should say that shortly after sending my previous message I realized that I can make this work by including an entry like the following each month: 2022-02-01 txn "Placeholder entry" "" ^2022feb Assets:Reimbursable 0.00 USD Liabilities:CredCard3 (It doesn't matter which credit card I use here, as long as it's different from the one used in the other transactions.) Hope this clarifies. John > > On Fri, Feb 4, 2022 at 2:43 PM [email protected] < > [email protected]> wrote: > >> I find the tags_pending plugin very helpful. It's generally quite reliable >> but there have been several instances in which liknked transactions were >> not appropriately tagged as PENDING. >> >> I now believe this occurs when it happens that every transaction linked >> with the same link includes the same two posting accounts. In such cases, >> the postings will always sum to zero. I see in the code comments that a >> single transaction with the link is always marked as PENDING, and I assume >> this is to make sure the initial entry in the series is marked as pending >> even though it totals to zero. >> >> I'm not a programmer . Does this diagnosis make sense? And is there a way >> to make the plugin work in this corner case? >> >> Thanks. >> >> -- >> 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/d1d8b6bf-3ba3-49ed-8ced-2ff3f657ffc1n%40googlegroups.com >> <https://groups.google.com/d/msgid/beancount/d1d8b6bf-3ba3-49ed-8ced-2ff3f657ffc1n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > > -- > You received this message because you are subscribed to a topic in the Google > Groups "Beancount" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/beancount/dQ3pwhdPBBc/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/beancount/CAK21%2BhOv%2BRE6mqWyyZ%3DFYevyp28fghqrzd-1jQbtaGhpta14Pw%40mail.gmail.com. -- 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/87czji8ikl.fsf%40johnrakestraw.com.
