Usually I would suggest to log the purchase in a separate table and use a query to subtract the amount sold since the inventory was last recorded from the original amount without actually updating the inventory in the product database itself. It is a cleaner way to handle returns and doesn't have you constantly updating the product database.This is what we do in Powerstore, and in general what I have found to be the cleanest method to do inventory control.

There is an unknown error when i try to connect to a database. What am I supposed to put into the fields? I put the username password and the host IP address including the database name which i have already set up. does the connection name have to be something specific? I've tried my database name which is "test" and I have tried "my username"_test. and it still won't connect. What could be wrong?


