[FIX] Patch from Alessandro Camilli for invoice payments, PEP8