How to implement such a mechanism?

Two types of Items arrive at the warehouse.

  1. Raw materials
  2. Packing
    I have to create a document “Purchase Receipt” , but before that I have to fill out various custom documents depending on the type of raw material.
    And the Purchase Receipt document should not be saved until the parent documents are filled.

what is the best way to create such a confinement?

I would like to implement this depending on what type of Item I choose in the document “Purchase Receipt”.

Do I must to change for this doctype “Item” ?