Multiple choice knapsack dynamic problem

Giving a the following:

A list of a store items $ T=\{t_1, t_2,…,t_n\}$ .

A list of prices of each item $ P=\{p_1, p_2,…,p_n\}$ .

A list of quantities of each item $ Q=\{q_1, q_2,…,q_n\}$ respectively.

And total bill $ M$ .

Our goal is to find any possible list of items that its total value is equal to $ M$ using dynamic problem.

My question does 0/1 weighted Knapsack problem help, where $ M$ can be the capacity of the knapsack, and the weight of each item equal to the quantity of the item. If there is any other better approach I would appreciate any references.