For whom is following from home, Sagar shared a minimal example with me in a private message (I don't know why, the example does not contain any personal information, AFAICT).

The issue is this:

2023-08-31 pad Assets:Debt:Friend Equity:Opening-Balance

2023-08-31 balance Assets:Debt:Friend  10000 PHP

The pad and balance directives have the same date. Benancount orders balance directives before any other directive. The balance directives are to be intended as "start of the day balance". The order in which the directives are processed is actually the reverse of how they are written, and thus the balance assertion fails and the pad is unused.

Moving the balance assertion to 2023-09-01 fixes the issue.

Cheers,
Dan


On 02/09/23 01:35, Sagar Shankar wrote:
Hi Dan,

Yes these are the only errors I get. Its confusing as you said because all the declarations seem completely fine to me

Thanks
Sagar

On Fri, Sep 1, 2023 at 7:17 PM Daniele Nicolodi <dani...@grinta.net <mailto:dani...@grinta.net>> wrote:

    On 01/09/23 00:58, Sagar Shankar wrote:
     > Hi all, just started using Beancount a few days back, had been using
     > Ledger before.
     >
     > I'm struggling to get a pad transaction working in my new
    beancount ledger.
     >
     > 1. create the pad transaction
     > 2023-08-01 pad Assets:Debt:Friend Equity:Opening-Balance
     >
     > 2. A few transactions on this Debt account follow
     > 2023-08-29 * "Paid to cash"
     >     Assets:Savings-60.45 USD
     >     Assets:Debt:Friend
     >
     > 2023-08-29 * "Paid for xyz on my behalf"
     >     Assets:Debt:Friend-342.56 USD
     >     Expenses:Something
     >
     > 3. Then I do a balance assertion, to update the balance to the
    correct
     > amount in my other account ledger
     > 2023-08-31 balance Assets:Debt:Friend1000 USD
     >
     > And then I get the following errors in Fava:
     > Unused Pad entry
     > Balance failed for 'Assets:Debt:Friend': expected so and so USD !=
     > accumulated XYZ USD (ABC too little)

    The example above works as expected for me. Your ledger must be invalid
    for some other reason. Are these the only errors you get?

    Cheers,
    Dan

-- 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/nD-1y0eLDis/unsubscribe
    <https://groups.google.com/d/topic/beancount/nD-1y0eLDis/unsubscribe>.
    To unsubscribe from this group and all its topics, send an email to
    beancount+unsubscr...@googlegroups.com
    <mailto:beancount%2bunsubscr...@googlegroups.com>.
    To view this discussion on the web visit
    
https://groups.google.com/d/msgid/beancount/8921f2fc-1bcf-40c9-71e5-561fc2552aa1%40grinta.net
 
<https://groups.google.com/d/msgid/beancount/8921f2fc-1bcf-40c9-71e5-561fc2552aa1%40grinta.net>.

--
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 beancount+unsubscr...@googlegroups.com <mailto:beancount+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAAP45exFubyccKf13hsmH3J9M6E%2BXUDXKAHc047rQDdJQ%3DgE5A%40mail.gmail.com <https://groups.google.com/d/msgid/beancount/CAAP45exFubyccKf13hsmH3J9M6E%2BXUDXKAHc047rQDdJQ%3DgE5A%40mail.gmail.com?utm_medium=email&utm_source=footer>.

--
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 beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/72d81f93-f8c2-e408-b1dc-f2c8e76ead17%40grinta.net.

Reply via email to