1) in the store order summary, you should not be assigning a value to the OrderID column
the order ID column should be set up in the MySQL database to be an Auto Incrementing column meaning the database will automatically set the value.
2) in the order summary behavior, the name of the session being created is OrderNumber
In the Store Order details, you have set the DetailOrderID column to use the session_id(), it needs to be set to use the OrderNumber session variable.