purchases & order history

purchases can now be confirmed
warehouse state will be updated
order history is saved in order history table