Difference between revisions of "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
Jump to navigation Jump to search
(future note about transaction categories)
(field usage notes)
Line 6: Line 6:
 
** '''2008-12-27''' Adapted from MS Access version (table "TrxTypes")
 
** '''2008-12-27''' Adapted from MS Access version (table "TrxTypes")
 
** '''2009-07-07''' Added to L48 version of database
 
** '''2009-07-07''' Added to L48 version of database
 +
==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.
 
==SQL==
 
==SQL==
<section begin=sql /><mysql>CREATE TABLE `ord_trx_type` (
+
<mysql>CREATE TABLE `ord_trx_type` (
 
   `ID`          INT NOT NULL AUTO_INCREMENT,
 
   `ID`          INT NOT NULL AUTO_INCREMENT,
 
   `Code`        VARCHAR(15),
 
   `Code`        VARCHAR(15),
Line 18: Line 21:
 
)
 
)
 
ENGINE = MYISAM;</mysql>
 
ENGINE = MYISAM;</mysql>
<section end=sql />
 

Revision as of 00:36, 5 September 2016

About

  • Purpose: Types of transactions for ord_trxact
  • Future:
    • 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.
  • History:
    • 2008-12-27 Adapted from MS Access version (table "TrxTypes")
    • 2009-07-07 Added to L48 version of database

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.

SQL

<mysql>CREATE TABLE `ord_trx_type` (

 `ID`           INT NOT NULL AUTO_INCREMENT,
 `Code`         VARCHAR(15),
 `Descr`        VARCHAR(255),
 `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>