Hi Somya,
You are correct about the picking up of the payment terms. It is picking payment terms from customer master data.
Ideally it should pick items based on Next Payment Date however since 'Customer Items Due By' is empty then it must be restricting the selection of the document based on your input in Posting Date or Docs entered up to Date. I will do one testing on it and come back to you on this. Also, you can try extending Posting Date / Docs entered up to and check if the document is getting picked.
Regards
Pankaj Pareek