Adding new elements to warehouse now adds them to the purchase menu as well.
Fixed dialog fields not being filled when new purchase button is pressed.