VbzCart/docs/tables/rstk req item: Difference between revisions

From Woozle Writes Code
< VbzCart‎ | docs‎ | tables
Jump to navigation Jump to search
imported>Woozle
m (→‎SQL: updated name of table)
imported>Woozle
(removed some fields which belong elsewhere)
Line 3: Line 3:
* '''Created''': 2008-11-07
* '''Created''': 2008-11-07
* To replace old [[../rstk_lines]] after data is migrated
* To replace old [[../rstk_lines]] after data is migrated
* Records restock contents by item; planned distribution to customers is in [[../rstk_ord_lines]]
* Records requested restock contents by item; planned distribution to customers is in [[../rstk_ord_lines]]
==SQL==
==SQL==
<section begin=sql /><mysql>CREATE TABLE `rstk_line_new` (
<section begin=sql /><mysql>CREATE TABLE `rstk_line_new` (
Line 17: Line 17:
   `QtyOrd`      INT COMMENT "quantity actually ordered",
   `QtyOrd`      INT COMMENT "quantity actually ordered",
   `QtyExp`      INT COMMENT "quantity actually expected, if supplier doesn't have enough available to fill the order",
   `QtyExp`      INT COMMENT "quantity actually expected, if supplier doesn't have enough available to fill the order",
   `isGone`      BOOL COMMENT "YES = item discontinued, no more available", /* data from invoice */
   `isGone`      BOOL COMMENT "YES = item discontinued, no more available", /* if info from source other than invoice */
  `InvcLineNo`  DECIMAL(3,3) COMMENT "line number (use decimals for multiple restock lines as single invoice line)",
  `InvcQtyOrd`  INT COMMENT "quantity ordered",
  `InvcQtySent` INT COMMENT "quantity shipped to us",
/* quantities - data from receiving the items */
  `QtyRecd`    INT COMMENT "quantity actually received",
  `QtyFiled`    INT COMMENT "quantity moved into stock",
/* cost information */
/* cost information */
   `CostExpPer`  DECIMAL(9,2) COMMENT "expected per-item cost",
   `CostExpPer`  DECIMAL(9,2) COMMENT "expected per-item cost",
  `CostInvPer`  DECIMAL(9,2) COMMENT "invoiced per-item cost",
  `CostInvTot`  DECIMAL(9,2) COMMENT "invoice line total (CostExpPer x InvcQtySent) for this item",
  `CostActTot`  DECIMAL(9,2) COMMENT "actual (best) line total as used for reconciling",
  `CostActBal`  DECIMAL(9,2) COMMENT "running total, calculated from CostActTot; may be unnecessary anywhere except Access",
   `Notes`      VARCHAR(255) COMMENT "human-entered notes on this line item",
   `Notes`      VARCHAR(255) COMMENT "human-entered notes on this line item",
   PRIMARY KEY(`ID`)
   PRIMARY KEY(`ID`)

Revision as of 19:29, 7 November 2008

About

SQL

<section begin=sql /><mysql>CREATE TABLE `rstk_line_new` (

  `ID`          INT NOT NULL AUTO_INCREMENT,
  `ID_Restock`  INT COMMENT "core_restock.ID of restock this item belongs to",
  `ID_Item`     INT COMMENT "cat_items.ID of item being restocked",
  `Descr`       VARCHAR(255) DEFAULT NULL COMMENT "Item description as given at time of shopping",

/* timestamps */

  `WhenCreated` DATETIME DEFAULT NULL "when this line was added",
  `WhenVoided`  DATETIME DEFAULT NULL "when this line was voided; not NULL = ignore this line",

/* quantities - data from creation of restock */

  `QtyNeed`     INT COMMENT "quantity needed, either for an order or to keep stock at desired level",
  `QtyOrd`      INT COMMENT "quantity actually ordered",
  `QtyExp`      INT COMMENT "quantity actually expected, if supplier doesn't have enough available to fill the order",
  `isGone`      BOOL COMMENT "YES = item discontinued, no more available", /* if info from source other than invoice */

/* cost information */

  `CostExpPer`  DECIMAL(9,2) COMMENT "expected per-item cost",
  `Notes`       VARCHAR(255) COMMENT "human-entered notes on this line item",
  PRIMARY KEY(`ID`)
)
ENGINE = MYISAM;</mysql>

<section end=sql />