When an automatic journal is run, the legislation code deduced from the context (usually the company code) leads to the appropriate formula.