Difference between revisions of "VbzCart/tables/rstk ord line"

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
(→‎SQL: changed indexes - ID_RstkReq+ID_Order+ID_Item, since ID_OrdItem isn't always available)
(status update)
Line 1: Line 1:
 +
[[category:VbzCart/tables]]
 
==About==
 
==About==
[[category:VbzCart/tables]]
+
* '''Status''': Uncertain. Not used at present, but looks potentially useful. Won't know if it's needed until we're back in production again.
* '''Created''': 2008-11-07
+
* '''Purpose''': Planned distribution of restock items to customer orders. This is more of a historical-log-and-search kind of record than something which is actually part of the process. (Should we get rid of it at some point?)
* Distribution of restock items to customer orders (planned). This is more of a historical-log-and-search kind of record than something which is actually part of the process. (Should we get rid of it at some point?)
+
** Search for <s>every time a particular item was restock-requested,</s> and which orders we were trying to fill
** Search for every time a particular item was restock-requested, and which orders we were trying to fill
+
*** Note that other tables already provide the first piece of information.
 
** Search for every time we tried to restock-request items for a particular order
 
** Search for every time we tried to restock-request items for a particular order
** Shows which items in a restock request are for customers; remainder are for stock
+
** <s>Shows which items in a restock request are for customers; remainder are for stock</s>
 +
*** Existing fields in restock requests already include this information.
 +
==Fields==
 +
* '''ID_OrdLine''' is sort of opportunistic &ndash; it isn't always available in legacy data. The functions using this new set of data schemas should always fill it in, however.
 +
==History==
 +
* '''2008-11-07''': Created, according to an earlier note on this page -- but the data goes back to 2002, so there was obviously something preceding it.
 +
* '''2016-03-03''': Determined that it is not currently being used anywhere, but not discarding yet.
 
==SQL==
 
==SQL==
<section begin=sql /><mysql>CREATE TABLE `rstk_ord_line` (
+
<mysql>CREATE TABLE `rstk_ord_line` (
 
   `ID_RstkReq` INT NOT NULL COMMENT "restock request (rstk_req.ID) which is being used to fulfill the customer's order",
 
   `ID_RstkReq` INT NOT NULL COMMENT "restock request (rstk_req.ID) which is being used to fulfill the customer's order",
 
   `ID_Order`  INT NOT NULL COMMENT "customer order (core_orders.ID) which is being fulfilled by this restock request line",
 
   `ID_Order`  INT NOT NULL COMMENT "customer order (core_orders.ID) which is being fulfilled by this restock request line",
Line 17: Line 24:
 
  )
 
  )
 
  ENGINE = MYISAM;</mysql>
 
  ENGINE = MYISAM;</mysql>
<section end=sql />
 
==Notes==
 
* '''ID_OrdLine''' is sort of opportunistic &ndash; it isn't always available in legacy data. The functions using this new set of data schemas should always fill it in, however.
 

Revision as of 23:46, 3 March 2016

About

  • Status: Uncertain. Not used at present, but looks potentially useful. Won't know if it's needed until we're back in production again.
  • Purpose: Planned distribution of restock items to customer orders. This is more of a historical-log-and-search kind of record than something which is actually part of the process. (Should we get rid of it at some point?)
    • Search for every time a particular item was restock-requested, and which orders we were trying to fill
      • Note that other tables already provide the first piece of information.
    • Search for every time we tried to restock-request items for a particular order
    • Shows which items in a restock request are for customers; remainder are for stock
      • Existing fields in restock requests already include this information.

Fields

  • ID_OrdLine is sort of opportunistic – it isn't always available in legacy data. The functions using this new set of data schemas should always fill it in, however.

History

  • 2008-11-07: Created, according to an earlier note on this page -- but the data goes back to 2002, so there was obviously something preceding it.
  • 2016-03-03: Determined that it is not currently being used anywhere, but not discarding yet.

SQL

<mysql>CREATE TABLE `rstk_ord_line` (

  `ID_RstkReq` INT NOT NULL COMMENT "restock request (rstk_req.ID) which is being used to fulfill the customer's order",
  `ID_Order`   INT NOT NULL COMMENT "customer order (core_orders.ID) which is being fulfilled by this restock request line",
  `ID_OrdLine` INT DEFAULT NULL COMMENT "specific order line (ord_lines.ID) being fulfilled",
  `ID_Item`    INT NOT NULL COMMENT "item which is being requested to fill the customer's order",
  `QtyOrd`     INT NOT NULL COMMENT "Quantity of item allocated to this order",
  `Notes`      VARCHAR(255) COMMENT "human-entered notes on this allocation item",
  PRIMARY KEY(`ID_RstkReq`,`ID_Order`, `ID_Item`)
)
ENGINE = MYISAM;</mysql>