Hi Patrick
For internal consumtion you must use inventory/Setup/posting/posting - purchase tab - section purchase expenditure for expense. For project or program you must use Main account allocation rules, please see the follow blog for more information about this.
Regardss