VbzCart/docs/tables/stk bins: Difference between revisions
Jump to navigation
Jump to search
imported>Woozle (notes about isForShip) |
imported>Woozle (new field: WhenCounted; some tidying) |
||
| Line 7: | Line 7: | ||
*** A. FALSE = do not ship this item, even though we have it on site (why would this happen? not sure if needed) | *** A. FALSE = do not ship this item, even though we have it on site (why would this happen? not sure if needed) | ||
*** B. FALSE = this bin is not physically accessible to the shipping department; items must be shipped by someone at that location or sent here to be shipped from this location. This meaning should actually be reflected by the Warehouse set in {{vbzcart|table|stk_places}}, but that's going to take a little thinking to implement that properly because it's hierarchical. Administrators operating at a given location should only be able to move items into (or out of) bins ''at that location''. Right now, we just globally say that some bins are unreachable: not as good, but much easier to implement. Fix later. | *** B. FALSE = this bin is not physically accessible to the shipping department; items must be shipped by someone at that location or sent here to be shipped from this location. This meaning should actually be reflected by the Warehouse set in {{vbzcart|table|stk_places}}, but that's going to take a little thinking to implement that properly because it's hierarchical. Administrators operating at a given location should only be able to move items into (or out of) bins ''at that location''. Right now, we just globally say that some bins are unreachable: not as good, but much easier to implement. Fix later. | ||
* '''History''': | |||
** '''2011-04-01''' added '''WhenCounted''' field -- for some reason, I thought this field was already here, but obviously it needs to be so we can track which bins are due for inventorying | |||
==SQL== | ==SQL== | ||
<section begin=sql /><mysql>DROP TABLE IF EXISTS `stk_bins`; | <section begin=sql /><mysql>DROP TABLE IF EXISTS `stk_bins`; | ||
CREATE TABLE `stk_bins` ( | CREATE TABLE `stk_bins` ( | ||
`ID` | `ID` INT(11) NOT NULL auto_increment, | ||
`ID_Place` | `ID_Place` INT(11) NOT NULL COMMENT 'stk_places.ID', | ||
`Code` | `Code` VARCHAR(15) NOT NULL COMMENT 'code name, e.g. NC01 -- must appear on outside of box', | ||
`Descr` | `Descr` VARCHAR(63) DEFAULT NULL COMMENT 'brief summary of contents', | ||
`WhenCreated` | `WhenCreated` DATETIME DEFAULT NULL COMMENT 'date when container was added to the database', | ||
`WhenVoided` | `WhenVoided` DATETIME DEFAULT NULL COMMENT 'date when container was destroyed or removed from usage', | ||
`WhenTainted` | `WhenTainted` DATETIME DEFAULT NULL COMMENT "if NOT NULL, this bin needs re-inventorying", | ||
`isForSale` | `WhenCounted` DATETIME DEFAULT NULL COMMENT "timestamp of when bin's contents were last inventoried", | ||
`isForShip` | `isForSale` TINYINT(1) DEFAULT NULL COMMENT "TRUE = this item is visible to customers as stock", | ||
`Notes` | `isForShip` TINYINT(1) DEFAULT NULL COMMENT "TRUE = this item is available for filling orders", | ||
PRIMARY KEY | `Notes` TEXT, | ||
PRIMARY KEY (`ID`) | |||
) ENGINE=MyISAM AUTO_INCREMENT=111 DEFAULT CHARSET=latin1;</mysql> | ) ENGINE=MyISAM AUTO_INCREMENT=111 DEFAULT CHARSET=latin1;</mysql> | ||
<section end=sql /> | <section end=sql /> | ||
Revision as of 18:30, 1 April 2011
About
- Purpose: containers in which stock may be found
- Refers to: Template:Vbzcart
- Fields:
- WhenCreated can be NOT NULL if you don't have any legacy data to deal with.
- isForShip eventually got added because I kept forgetting to use WhenVoided, and I finally decided that it wasn't redundant to have a flag specifically for this attribute. It has two meanings which may eventually need to be separated into separate fields:
- A. FALSE = do not ship this item, even though we have it on site (why would this happen? not sure if needed)
- B. FALSE = this bin is not physically accessible to the shipping department; items must be shipped by someone at that location or sent here to be shipped from this location. This meaning should actually be reflected by the Warehouse set in Template:Vbzcart, but that's going to take a little thinking to implement that properly because it's hierarchical. Administrators operating at a given location should only be able to move items into (or out of) bins at that location. Right now, we just globally say that some bins are unreachable: not as good, but much easier to implement. Fix later.
- History:
- 2011-04-01 added WhenCounted field -- for some reason, I thought this field was already here, but obviously it needs to be so we can track which bins are due for inventorying
SQL
<section begin=sql /><mysql>DROP TABLE IF EXISTS `stk_bins`; CREATE TABLE `stk_bins` (
`ID` INT(11) NOT NULL auto_increment, `ID_Place` INT(11) NOT NULL COMMENT 'stk_places.ID', `Code` VARCHAR(15) NOT NULL COMMENT 'code name, e.g. NC01 -- must appear on outside of box', `Descr` VARCHAR(63) DEFAULT NULL COMMENT 'brief summary of contents', `WhenCreated` DATETIME DEFAULT NULL COMMENT 'date when container was added to the database', `WhenVoided` DATETIME DEFAULT NULL COMMENT 'date when container was destroyed or removed from usage', `WhenTainted` DATETIME DEFAULT NULL COMMENT "if NOT NULL, this bin needs re-inventorying", `WhenCounted` DATETIME DEFAULT NULL COMMENT "timestamp of when bin's contents were last inventoried", `isForSale` TINYINT(1) DEFAULT NULL COMMENT "TRUE = this item is visible to customers as stock", `isForShip` TINYINT(1) DEFAULT NULL COMMENT "TRUE = this item is available for filling orders", `Notes` TEXT, PRIMARY KEY (`ID`)
) ENGINE=MyISAM AUTO_INCREMENT=111 DEFAULT CHARSET=latin1;</mysql> <section end=sql />