More elaborate logic to determine invoice partner