In Purchase reciept how this acheive

Hello Team,

"Assuming all the items have been assinged an inspection template

Make a checkbox for temporary inward

when checkbox is not flagged (default), accepted warehouse should be

Lab and purchase receipt cannot be submitted without creating quality inspection

if checkbox is flagged, Perchase Receipt can be submitted without any inspection and

user can change the accepted warehouse."

Can any one help me …how this achecive by using custom script…
Need help

Thanks