Difference between revisions of "VbzCart/tables/ord pkg lines"

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
(extracted from VbzCart/tables)
 
(added 2 fields for recording what was charged)
Line 4: Line 4:
 
* '''Fields''':
 
* '''Fields''':
 
** '''QtyFromStock''' may be an obsolete field, as ''all'' package quantities should now come from stock.
 
** '''QtyFromStock''' may be an obsolete field, as ''all'' package quantities should now come from stock.
 +
* '''History''':
 +
** '''2010-10-19''' Adding CostShItm and CostSale fields to record prices charged (parallels ShipCost and PkgCost in {{vbzcart/table|ord_pkgs}}
 
==SQL==
 
==SQL==
 
<section begin=sql /><mysql>CREATE TABLE `ord_pkg_lines` (
 
<section begin=sql /><mysql>CREATE TABLE `ord_pkg_lines` (
Line 15: Line 17:
 
   `QtyNotAvail`  INT COMMENT "quantity which can't be filled",
 
   `QtyNotAvail`  INT COMMENT "quantity which can't be filled",
 
   `QtyFromStock` INT COMMENT "quantity which was moved from stock",
 
   `QtyFromStock` INT COMMENT "quantity which was moved from stock",
 +
  `CostSale`    DECIMAL(9,2) DEFAULT NULL COMMENT "price charged for this item",
 +
  `CostShItm`    DECIMAL(9,2) DEFAULT NULL COMMENT "per-item shipping cost charged",
 
   `Notes`        VARCHAR(255),
 
   `Notes`        VARCHAR(255),
 
   PRIMARY KEY(`ID`)
 
   PRIMARY KEY(`ID`)

Revision as of 20:35, 19 October 2010

About

  • Purpose: What's in an order package (
  1. REDIRECT Template:l/vc/table)
  • Refers to: ord_pkgs (parent), ord_lines, cat_items
  • Fields:
    • QtyFromStock may be an obsolete field, as all package quantities should now come from stock.
  • History:
    • 2010-10-19 Adding CostShItm and CostSale fields to record prices charged (parallels ShipCost and PkgCost in ord_pkgs

SQL

<mysql>CREATE TABLE `ord_pkg_lines` (

 `ID`           INT NOT NULL AUTO_INCREMENT,
 `ID_Pkg`       INT NOT NULL COMMENT "ord_pkgs.ID",
 `ID_OrdLine`   INT COMMENT "ord_lines.ID",
 `ID_Item`      INT NOT NULL COMMENT "cat_items.ID",
 `QtyShipped`   INT COMMENT "quantity shipped/charged in this package",
 `QtyExtra`     INT COMMENT "quantity tossed in as freebies in this pkg",
 `QtyKilled`    INT COMMENT "quantity fulfilled by being cancelled",
 `QtyNotAvail`  INT COMMENT "quantity which can't be filled",
 `QtyFromStock` INT COMMENT "quantity which was moved from stock",
 `CostSale`     DECIMAL(9,2) DEFAULT NULL COMMENT "price charged for this item",
 `CostShItm`    DECIMAL(9,2) DEFAULT NULL COMMENT "per-item shipping cost charged",
 `Notes`        VARCHAR(255),
 PRIMARY KEY(`ID`)

) ENGINE = MYISAM;</mysql>