VbzCart/tables/ord trx type

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< VbzCart‎ | tables
Revision as of 22:07, 11 September 2016 by Woozle (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

  • Purpose: Types of transactions for ord_trxact
  • Future: remove obsolete field "isShipg".

History

  • 2008-12-27 Adapted from MS Access version (table "TrxTypes")
  • 2009-07-07 Added to L48 version of database
  • 2016-09-11 Created Catg field per to-do note from 2011-03-31: "There needs to be a field which assigns each transaction to a single category so that when we do accounting summaries (e.g. the transaction listing for each order), we can show subtotals for each category (e.g. $a sale, $b shipping, $c paid). Right now we're using the isX fields to do this, which is klugey because a transaction type can be assigned to more than one."

Fields

  • Code: unique transaction-type code to be included in transaction listings because it seemed like a good idea at the time. It is probably useful in some way we don't ordinarily notice but would be problematic if absent.
  • Descr: brief reminder of what that transaction type is for. This is mainly for admin usage. When creating actual transactions, it's better to generate something more context-appropriate. That will become especially important if this code is ever translated into other languages.
  • Catg: code indicating how transactions of this type should be classified in a summary: 1 = SALE, 2 = SHIPPING, 3 = PAID
    • Do we need a 4 for "adjustments"? Let's say no for now...

SQL

<mysql>CREATE TABLE `ord_trx_type` (

 `ID`           INT NOT NULL AUTO_INCREMENT,
 `Code`         VARCHAR(15),
 `Descr`        VARCHAR(255),
 `Catg`         TINYINT NOT NULL,
 `isCash`       BIT COMMENT "is actual money being sent/recived",
 `isCard`       BIT COMMENT "is checkcard or credit card (TRUE requires isCash=TRUE)",
 `isCheck`      BIT COMMENT "is check or money order (TRUE requires isCash=TRUE)",
 `isShipg`      BIT COMMENT "is shipping charge/refund",
 PRIMARY KEY(`ID`)

) ENGINE = MYISAM;</mysql>