Optimal order quantity under advance sales and permissible delays in payments