Using POSper/Developer guide/Database-Table descriptions/posper stockdiary

posper_stockdiary

edit


This table describes a number of units of a product at a location

Column Name Data Type Null Allowed? Key? Comments
id VARCHAR(255) No Primary UUID instead of int
version INT(11) No This is used by hibernate to track table versions
price DOUBLE No The price of this product
reason int(11) No This is used to describe what happened. Either stock went up or stock went down. If stock went up, the allowed reasons are purchase (we bought stuff), refund (we sold stuff but it was returned back to us and we refunded the money), or movement (moved from another warehouse). If stock went down, the allowed reasons are purchase (we sold stuff), refund (we returned stock for a refund; perhaps we didn't need it or it was defective), or movement (to another warehouse).
units DOUBLE No Number of units of the product
date DATETIME No The date/time when this item took place
product_id VARCHAR(255) No Foreign Key This links to the product being described
location_id VARCHAR(255) No Foreign Key This links to the location being described