Invoice payment amount calculation