Difference between revisions of "VbzCart/tables/ord hold 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
(extracted from VbzCart/tables)
 
("change" -> "hold")
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==About==
 
==About==
''to be documented''
+
* '''Purpose''': Admin-maintained table for different types of holds on orders (aka order pulls) and how the order itself is affected by each type
 +
* '''Relates to''': {{l/vbzcart/table|event_vc_ord_hold}}
 +
* '''Ancestor''': {{l/vbzcart/table|ord_pull_type}}
 +
==History==
 +
* '''2008-12-27''' Extracted from main "tables" listing, no design changes; no documentation yet, either
 +
* '''2009-07-12''' Removed isActive field; added "Hold" to field names for directional consistency (+1 always turns on an alert); preliminary documentation
 +
* '''2009-10-18'''
 +
** changing type for alert flags from TINYINT to TINYINT(1); the default seems to be TINYINT(4)
 +
*** BIT(2) would work, but there doesn't seem to be any clean way to represent -1
 +
** renaming from '''ord_event_type''' to '''ord_change_type'''; will eventually replace '''ord_pull_type'''
 +
* '''2017-06-01'''
 +
** Renamed '''Descr''' to '''About'''; changed ENGINE from MYISAM to InnoDB.
 +
** Added '''OptionGroup''' from {{l/vbzcart/table|ord_pull_type}}.
 +
* '''2017-06-02''' Renamed from {{l/vbzcart/table|ord_change_type}} to {{l/vbzcart/table|ord_hold_type}}; see {{l/vbzcart/table|event_vc_ord_hold}} for explanation/details.
 +
==Fields==
 +
* '''alert flags''': each one indicates a change to be made to the order status, which is recorded in {{l/vbzcart/table|event_vc_ord_change}}. See below for details.
 +
* '''OptionGroup''' - optional group section text for drop-down lists. Rows with the same text will be grouped together in drop-down lists.
 +
===alert flags===
 +
The alert flag fields each have 3 possible values:
 +
: '''0''' = no change
 +
: '''+1''' = FORBID / TURN ON ALERT
 +
: '''-1''' = ALLOW / TURN OFF ALERT
 +
 
 +
Each one affects the corresponding field in the order (not yet implemented as of 2009-07-12) as described above when an event of the type defined in this record occurs
 +
 
 +
If the order has any one of these flags set, then the order is "on hold".
 +
 
 +
The flags are (with their meanings when set TRUE in {{l/vbzcart/table|event_vc_ord_change}}):
 +
* '''doHoldRstk''' - set = do not base restock requests on this order's items
 +
* '''doHoldChrg''' - set = do not make any debits from the customer for this order (wait for confirmation)
 +
* '''doContact''' - set = contact the customer before proceeding (do we need a separate "no payment" flag?)
 +
* '''doExamine''' - set = something about this order needs further examination (explanation in event notes)
 +
* We may also want a "'''doHoldShip'''" flag, to indicate that shipping should be delayed
 +
* Eventually, maybe we need an ord_action table, listing all the possible actions which might be flagged (instead of having them as fixed fields). Or maybe that doesn't work.
  
2008-12-27 Are we actually using this, or is it part of the future online ordering system redesign?
 
 
==SQL==
 
==SQL==
<section begin=sql /><mysql>CREATE TABLE `ord_event_types` (
+
<mysql>CREATE TABLE `ord_hold_type` (
 
   `ID`          INT NOT NULL AUTO_INCREMENT,
 
   `ID`          INT NOT NULL AUTO_INCREMENT,
 
   `Display`      VARCHAR(63) COMMENT "brief name for this event type",
 
   `Display`      VARCHAR(63) COMMENT "brief name for this event type",
   `Descr`        VARCHAR(127) COMMENT "longer description of usage",
+
   `About`        VARCHAR(127) COMMENT "longer description of usage",
   `isActive`     BOOL COMMENT "TRUE = order is open or on hold",
+
   `OptionGroup` VARCHAR(45) DEFAULT NULL COMMENT "Optional grouping name",
/* these fields all have 3 possible values:
+
   `doHoldRstk` TINYINT(1) COMMENT "forbid(+1)/allow(-1) restocking this order's items",
0 = no change
+
   `doHoldChrg` TINYINT(1) COMMENT "forbid(+1)/allow(-1) charging bank card for this order",
-1 = FORBID / TURN OFF
+
   `doContact`  TINYINT(1) COMMENT "turn on(+1)/off(-1) need-to-contact flag for this order",
+1 = ALLOW / TURN ON
+
   `doExamine`  TINYINT(1) COMMENT "turn on(+1)/off(-1) need-to-examine flag for this order",
*/
 
   `doRestock` TINYINT COMMENT "allow/forbid restocking this order's items",
 
   `doCharge`   TINYINT COMMENT "allow/forbid charging bank card for this order",
 
   `doContact`  TINYINT COMMENT "turn on/off need-to-contact flag for this order",
 
   `doExamine`  TINYINT COMMENT "turn on/off need-to-examine flag for this order",
 
 
   PRIMARY KEY(`ID`)
 
   PRIMARY KEY(`ID`)
 
)
 
)
ENGINE = MYISAM;</mysql>
+
ENGINE = InnoDB;</mysql>
<section end=sql />
 

Latest revision as of 10:38, 2 June 2017

About

  • Purpose: Admin-maintained table for different types of holds on orders (aka order pulls) and how the order itself is affected by each type
  • Relates to: event_vc_ord_hold
  • Ancestor: ord_pull_type

History

  • 2008-12-27 Extracted from main "tables" listing, no design changes; no documentation yet, either
  • 2009-07-12 Removed isActive field; added "Hold" to field names for directional consistency (+1 always turns on an alert); preliminary documentation
  • 2009-10-18
    • changing type for alert flags from TINYINT to TINYINT(1); the default seems to be TINYINT(4)
      • BIT(2) would work, but there doesn't seem to be any clean way to represent -1
    • renaming from ord_event_type to ord_change_type; will eventually replace ord_pull_type
  • 2017-06-01
    • Renamed Descr to About; changed ENGINE from MYISAM to InnoDB.
    • Added OptionGroup from ord_pull_type.
  • 2017-06-02 Renamed from ord_change_type to ord_hold_type; see event_vc_ord_hold for explanation/details.

Fields

  • alert flags: each one indicates a change to be made to the order status, which is recorded in event_vc_ord_change. See below for details.
  • OptionGroup - optional group section text for drop-down lists. Rows with the same text will be grouped together in drop-down lists.

alert flags

The alert flag fields each have 3 possible values:

0 = no change
+1 = FORBID / TURN ON ALERT
-1 = ALLOW / TURN OFF ALERT

Each one affects the corresponding field in the order (not yet implemented as of 2009-07-12) as described above when an event of the type defined in this record occurs

If the order has any one of these flags set, then the order is "on hold".

The flags are (with their meanings when set TRUE in event_vc_ord_change):

  • doHoldRstk - set = do not base restock requests on this order's items
  • doHoldChrg - set = do not make any debits from the customer for this order (wait for confirmation)
  • doContact - set = contact the customer before proceeding (do we need a separate "no payment" flag?)
  • doExamine - set = something about this order needs further examination (explanation in event notes)
  • We may also want a "doHoldShip" flag, to indicate that shipping should be delayed
  • Eventually, maybe we need an ord_action table, listing all the possible actions which might be flagged (instead of having them as fixed fields). Or maybe that doesn't work.

SQL

<mysql>CREATE TABLE `ord_hold_type` (

 `ID`           INT NOT NULL AUTO_INCREMENT,
 `Display`      VARCHAR(63) COMMENT "brief name for this event type",
 `About`        VARCHAR(127) COMMENT "longer description of usage",
 `OptionGroup`  VARCHAR(45) DEFAULT NULL COMMENT "Optional grouping name",
 `doHoldRstk` TINYINT(1) COMMENT "forbid(+1)/allow(-1) restocking this order's items",
 `doHoldChrg` TINYINT(1) COMMENT "forbid(+1)/allow(-1) charging bank card for this order",
 `doContact`  TINYINT(1) COMMENT "turn on(+1)/off(-1) need-to-contact flag for this order",
 `doExamine`  TINYINT(1) COMMENT "turn on(+1)/off(-1) need-to-examine flag for this order",
 PRIMARY KEY(`ID`)

) ENGINE = InnoDB;</mysql>