code written for the condition to check the value is delivery in,out or all
code written for the condition to check the value is delivery in,out or all.if inoutflag is there then it will perform if condition for delivery in or out. otherwise it will perform else condition.
previously i had sent merge request but some changes were missing.Now this is overall completed.