>>>>> "MC" == Michael Cooper <myth...@gmail.com> writes:

MC> for transaction in transactions_from(some_file):
MC>     transaction.check_assertions()
MC>     book.apply_automated(transaction)
MC>     book.add(transaction)

Yes, this is how it should be.  In the parser we find:

    void instance_t::xact_directive(char * line, std::streamsize len)
    {
      if (xact_t * xact = parse_xact(line, len, top_account())) {
        unique_ptr<xact_t> manager(xact);
    
        if (context.journal->add_xact(xact)) {
          manager.release();        // it's owned by the journal now
          context.count++;
        }
      } else {
        throw parse_error(_("Failed to parse transaction"));
      }
    }

This is run whenever a transaction is parsed.  It's current.journal->add_xact
that does the processing of automated transactions before adding it to the
journal.

Just to check: Do your automated transaction occur earlier in the Ledger file
than the transactions in question?

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2

-- 

--- 
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 ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to