Since you mention SWI-Prolog, why not
?- use_module(library(clpfd)).
and library(lambda)
?- Total = 1505, Prices = [215, 275, 335, 355, 420, 580], maplist(\P^A^M^(P*A #= M, A #>=0),Prices,Amounts,Ms), sum(Ms, #=, Total).
By indicating this, all the variables in the Amounts list are in the final range. Therefore, there is no need to "do the math" for the upper bound (which is often wrong in any case). To see specific solutions, marking / 2 is required:
?- Total = 1505, Prices = [215, 275, 335, 355, 420, 580], maplist(\P^A^M^(P*A #= M, A #>=0),Prices,Amounts,Ms), sum(Ms, #=, Total), labeling([], Amounts). Total = 1505, Prices = [215,275,335,355,420,580], Amounts = [1,0,0,2,0,1], Ms = [215,0,0,710,0,580] ; Total = 1505, Prices = [215,275,335,355,420,580], Amounts = [7,0,0,0,0,0], Ms = [1505,0,0,0,0,0].