Merge pull request #31531 from nihantra/pur_inv_docstatus

fix: Set the condition to create a purchase receipt