In every sales order there will be field where expiry date of order should stored if that date is passed user cannot create delivery of that sales order.