VbzCart/docs/tables/ord pkgs

From Woozle Writes Code
< VbzCart‎ | docs‎ | tables
Revision as of 15:22, 27 December 2008 by imported>Woozle (extracted from VbzCart/tables)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

  • Purpose: Packages shipped in response to a customer order (Template:Vbzcart/table)
  • Refers to: Template:Vbzcart/table (parent), Template:Vbzcart/table
  • Notes:
    • The field "ArrivalNotes" should be added to the message log; leaving it out of the migration for this table.
    • WhenVoided: We're not deleting packages anymore. Instead, we mark an emptied, unsent package as "VOID", and log it in the container record. Voided package records can be re-used if they aren't assigned to a closed shipment; log the un-voiding prior to re-use. (Should there be a "WhenLocked" field to represent the shipment being closed? Maybe WhenFinished does this...) A package should never be voided without first zeroing stock in all line items.

SQL

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

 `ID`             INT NOT NULL AUTO_INCREMENT,
 `Seq`            INT COMMENT "number used to make user-friendly pkg #",
 `ID_Order`       INT NOT NULL COMMENT "core_orders.ID",
 `WhenStarted`    DATETIME COMMENT "when package record was created",
 `WhenFinished`   DATETIME, /* need to check code for actual purpose of field */
 `WhenChecked`    DATETIME, /* need to check code for actual purpose of field */
 `WhenVoided`     DATETIME COMMENT "when package was emptied; can be reused later",
 `isReturn`       BOOL COMMENT "TRUE = this package is being returned, not shipped out",
 `ID_Shipment`    INT COMMENT "ord_shipmt.ID",
 `ShipCost`       DECIMAL(9,2) COMMENT "cost of shipping (postage)",
 `PkgCost`        DECIMAL(9,2) COMMENT "cost of packaging / insurance",
 `ShipPounds`     FLOAT COMMENT "shipping weight in pounds (whole or fractional)",
 `ShipOunces`     FLOAT COMMENT "shipping weight in ounces, less ShipPounds",
 `ShipNotes`      VARCHAR(255) COMMENT "human-entered notes about this pkg",
 `ShipTracking`   VARCHAR(127) COMMENT "shipper's tracking number for pkg",
 `WhenArrived`    DATETIME COMMENT "when arrived at customer, if known",
 PRIMARY KEY(`ID`)

) ENGINE = MYISAM;</mysql> <section end=sql />