While trying to Copy Document to Return a purchase bill from Purchase Credit Memo, I get the Error message saying 'No. must have a value in purchase line' as shown in the photo. I would really appreciate if someone could help me solve this problem.

There is a empty line with Item only in the purchased document as seen in the picture below so, i think this is the problem but I don't know how to fix that.