Difference between revisions of "VbzCart/tables/rstk req item"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
m (minor doc correction)
(tidied obsolete markup; changed isGone)
Line 5: Line 5:
 
** '''2008-11-07''' Created for new restock process
 
** '''2008-11-07''' Created for new restock process
 
** '''2008-12-04''' Added '''QtyCust''' field to make it easier to tell how much immediate revenue a restock is likely to generate
 
** '''2008-12-04''' Added '''QtyCust''' field to make it easier to tell how much immediate revenue a restock is likely to generate
 +
** '''2014-12-14''' Changed '''isGone''' from BOOL (which apparently equates to TINYINT) to BIT.
 
* '''Notes''':
 
* '''Notes''':
 
** replaces part of {{vbzcart/table|rstk_lines}}
 
** replaces part of {{vbzcart/table|rstk_lines}}
 
==SQL==
 
==SQL==
<section begin=sql /><mysql>CREATE TABLE `rstk_req_item` (
+
<mysql>CREATE TABLE `rstk_req_item` (
 
   `ID_Restock`  INT COMMENT "rstk_req.ID of restock this item belongs to",
 
   `ID_Restock`  INT COMMENT "rstk_req.ID of restock this item belongs to",
 
   `ID_Item`    INT COMMENT "cat_items.ID of item being restocked",
 
   `ID_Item`    INT COMMENT "cat_items.ID of item being restocked",
Line 20: Line 21:
 
   `QtyOrd`      INT COMMENT "quantity actually ordered from supplier",
 
   `QtyOrd`      INT COMMENT "quantity actually ordered from supplier",
 
   `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 (if info from source other than invoice)",
+
   `isGone`      BIT COMMENT "YES = item discontinued, no more available (if info from source other than invoice)",
 
/* cost information */
 
/* cost information */
 
   `CostExpPer`  DECIMAL(9,2) COMMENT "expected per-item cost",
 
   `CostExpPer`  DECIMAL(9,2) COMMENT "expected per-item cost",
Line 27: Line 28:
 
  )
 
  )
 
  ENGINE = MYISAM;</mysql>
 
  ENGINE = MYISAM;</mysql>
<section end=sql />
 

Revision as of 23:17, 14 December 2014

About

  • Purpose: Stores requested restock contents by item; planned distribution to customers is in rstk_ord_line
  • History:
    • 2008-11-07 Created for new restock process
    • 2008-12-04 Added QtyCust field to make it easier to tell how much immediate revenue a restock is likely to generate
    • 2014-12-14 Changed isGone from BOOL (which apparently equates to TINYINT) to BIT.
  • Notes:
    • replaces part of
  1. REDIRECT Template:l/vc/table

SQL

<mysql>CREATE TABLE `rstk_req_item` (

  `ID_Restock`  INT COMMENT "rstk_req.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 COMMENT "when this line was added",
  `WhenVoided`  DATETIME DEFAULT NULL COMMENT "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",
  `QtyCust`     INT COMMENT "quantity needed just to fill customer orders",
  `QtyOrd`      INT COMMENT "quantity actually ordered from supplier",
  `QtyExp`      INT COMMENT "quantity actually expected, if supplier doesn't have enough available to fill the order",
  `isGone`      BIT 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_Restock`,`ID_Item`)
)
ENGINE = MYISAM;</mysql>