Possible duplicate of this question?
I think this answer solves your problem.
I copy here an python implementation of the solution. But the original answer offers way more choices. The complexity of the algorithm grows quite fast (exponential), so be careful before using it for bigger problems than N=16.
Just enter all your invoices in the list and one of your payment as the second parameter. You will get all combinations of invoices that give the given payment, and the other payment is simply the missing elements of the list. There may be more than one solution.
def subset_sum(numbers, target, partial=[]):
s = sum(partial)
# check if the partial sum is equals to target
if s == target:
print("sum(%s)=%s" % (partial, target))
if s >= target:
return # if we reach the number why bother to continue
for i in range(len(numbers)):
n = numbers[i]
remaining = numbers[i+1:]
subset_sum(remaining, target, partial + [n])
subset_sum([31,19,80,48,52,70,10,13,12,54,23,45,34,26,51,23,100],193)