Difference between revisions of "VbzCart/tables/rstk rcd"

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: 3 "When" fields (how did I manage to leave these out? what else have I forgotten?))
(→‎SQL: +InvcCondition)
Line 12: Line 12:
 
   `WhenReceived`  DATETIME DEFAULT NULL COMMENT "when package was received from supplier",
 
   `WhenReceived`  DATETIME DEFAULT NULL COMMENT "when package was received from supplier",
 
   `WhenDebited`    DATETIME DEFAULT NULL COMMENT "when charge for order was debited",
 
   `WhenDebited`    DATETIME DEFAULT NULL COMMENT "when charge for order was debited",
/* eventually there will be a table of carriers so we can retrieve tracking info or at least pull it up from the web */
 
 
   `TrackingCode`  VARCHAR(63)  COMMENT "carrier's tracking number",
 
   `TrackingCode`  VARCHAR(63)  COMMENT "carrier's tracking number",
 
   `TotalCalcMerch` DECIMAL(9,2) COMMENT "total cost of merchandise calculated from contents of received restock",
 
   `TotalCalcMerch` DECIMAL(9,2) COMMENT "total cost of merchandise calculated from contents of received restock",
  /* amounts from supplier invoice */
+
/* from supplier invoice */
 
   `TotalInvMerch`  DECIMAL(9,2) COMMENT "total cost of merchandise invoiced",
 
   `TotalInvMerch`  DECIMAL(9,2) COMMENT "total cost of merchandise invoiced",
 
   `TotalInvShip`  DECIMAL(9,2) COMMENT "total shipping cost invoiced",
 
   `TotalInvShip`  DECIMAL(9,2) COMMENT "total shipping cost invoiced",
 
   `TotalInvAdj`    DECIMAL(9,2) COMMENT "total invoice adjustments",
 
   `TotalInvAdj`    DECIMAL(9,2) COMMENT "total invoice adjustments",
/* Final = Merch + Ship + Adj */
 
 
   `TotalInvFinal`  DECIMAL(9,2) COMMENT "final total on invoice (must match amt paid)",
 
   `TotalInvFinal`  DECIMAL(9,2) COMMENT "final total on invoice (must match amt paid)",
 +
  `InvcCondition`  INT DEFAULT NULL COMMENT "do we have all the paperwork for this invoice?",
 
   `PayMethod`      VARCHAR(63)  COMMENT "how payment was made, if not same as restock request",
 
   `PayMethod`      VARCHAR(63)  COMMENT "how payment was made, if not same as restock request",
 
   `Notes`          TEXT DEFAULT NULL COMMENT "human-entered notes",
 
   `Notes`          TEXT DEFAULT NULL COMMENT "human-entered notes",
Line 27: Line 26:
 
  ENGINE = MYISAM;</mysql>
 
  ENGINE = MYISAM;</mysql>
 
<section end=sql />
 
<section end=sql />
 +
* '''TrackingCode''': eventually there will be a table of carriers so we can retrieve tracking info or at least pull it up from the web
 +
* '''TotalInvFinal''': Final = Merch + Ship + Adj
 +
* '''InvcCondition''': 0 = absent, 1 = partial, 2 = complete

Revision as of 11:49, 10 November 2008

About

SQL

<mysql>CREATE TABLE `rstk_rcd` (

  `ID`             INT NOT NULL AUTO_INCREMENT,
  `ID_Restock`     INT COMMENT "rstk_req.ID of restock this shipment fulfills",
  `SuppInvcNum`    VARCHAR(63)  COMMENT "supplier's invoice number",
  `CarrierDescr`   VARCHAR(63)  COMMENT "shipping carrier (UPS, USPS...)",
  `WhenShipped`    DATETIME DEFAULT NULL COMMENT "when supplier shipped the package",
  `WhenReceived`   DATETIME DEFAULT NULL COMMENT "when package was received from supplier",
  `WhenDebited`    DATETIME DEFAULT NULL COMMENT "when charge for order was debited",
  `TrackingCode`   VARCHAR(63)  COMMENT "carrier's tracking number",
  `TotalCalcMerch` DECIMAL(9,2) COMMENT "total cost of merchandise calculated from contents of received restock",

/* from supplier invoice */

  `TotalInvMerch`  DECIMAL(9,2) COMMENT "total cost of merchandise invoiced",
  `TotalInvShip`   DECIMAL(9,2) COMMENT "total shipping cost invoiced",
  `TotalInvAdj`    DECIMAL(9,2) COMMENT "total invoice adjustments",
  `TotalInvFinal`  DECIMAL(9,2) COMMENT "final total on invoice (must match amt paid)",
  `InvcCondition`  INT DEFAULT NULL COMMENT "do we have all the paperwork for this invoice?",
  `PayMethod`      VARCHAR(63)  COMMENT "how payment was made, if not same as restock request",
  `Notes`          TEXT DEFAULT NULL COMMENT "human-entered notes",
  PRIMARY KEY(`ID`)
)
ENGINE = MYISAM;</mysql>

  • TrackingCode: eventually there will be a table of carriers so we can retrieve tracking info or at least pull it up from the web
  • TotalInvFinal: Final = Merch + Ship + Adj
  • InvcCondition: 0 = absent, 1 = partial, 2 = complete