Difference between revisions of "VbzCart/tables/ord lines"
Jump to navigation
Jump to search
(extracted from "tables" page) |
m (getting rid of section tags) |
||
Line 7: | Line 7: | ||
** The fields '''VbzUser''' and '''Machine''' should probably go away; that sort of thing should be in an event log. These fields were only ever used during migration, and no timestamp was stored here along with the migration note, so they should just be deleted. | ** The fields '''VbzUser''' and '''Machine''' should probably go away; that sort of thing should be in an event log. These fields were only ever used during migration, and no timestamp was stored here along with the migration note, so they should just be deleted. | ||
==SQL== | ==SQL== | ||
− | + | <mysql>CREATE TABLE `ord_lines` ( | |
`ID` INT NOT NULL AUTO_INCREMENT, | `ID` INT NOT NULL AUTO_INCREMENT, | ||
`ID_Order` INT NOT NULL COMMENT "core_orders.ID", | `ID_Order` INT NOT NULL COMMENT "core_orders.ID", | ||
Line 26: | Line 26: | ||
) | ) | ||
ENGINE = MYISAM;</mysql> | ENGINE = MYISAM;</mysql> | ||
− |
Revision as of 17:51, 23 February 2014
About
- Purpose: what's inside each order
- Refers to:
- REDIRECT Template:l/vc/table (parent), cat_item
- Notes:
- For installations without legacy data to accomodate, the following fields should probably be NOT NULL: CatNum, Descr, QtyOrd, Price, ShipPkg, ShipItem, WhenAdded
- The whole isShipEst thing is awkward and not very useful. We might just want to ditch it and state that all shipping charges are subject to revision but we will wait for customer approval if the shipping charge is over the price quoted.
- The fields VbzUser and Machine should probably go away; that sort of thing should be in an event log. These fields were only ever used during migration, and no timestamp was stored here along with the migration note, so they should just be deleted.
SQL
<mysql>CREATE TABLE `ord_lines` (
`ID` INT NOT NULL AUTO_INCREMENT, `ID_Order` INT NOT NULL COMMENT "core_orders.ID", `Seq` INT DEFAULT NULL COMMENT "sequence in which items were added to order", `ID_Item` INT NOT NULL COMMENT "cat_item.ID", `CatNum` VARCHAR(63) DEFAULT NULL COMMENT "catalog number as ordered", `Descr` VARCHAR(255) DEFAULT NULL COMMENT "description as ordered", `QtyOrd` INT DEFAULT NULL COMMENT "quantity ordered", `Price` DECIMAL(9,2) DEFAULT NULL COMMENT "price quoted for this item", `ShipPkg` DECIMAL(9,2) DEFAULT NULL COMMENT "per-package shipping quoted", `ShipItm` DECIMAL(9,2) DEFAULT NULL COMMENT "per-item shipping quoted", `isShipEst` BOOL DEFAULT FALSE COMMENT "TRUE = shipping charge is an estimate", `WhenAdded` DATETIME DEFAULT NULL COMMENT "when this item was added to the order", `Notes` VARCHAR(255) DEFAULT NULL COMMENT "admin-added notes", `VbzUser` VARCHAR(127) COMMENT "VbzCart username, for when we have a user system", `Machine` VARCHAR(64) COMMENT "network name (or IP address) of machine which added this line", PRIMARY KEY(`ID`) ) ENGINE = MYISAM;</mysql>