VbzCart/docs/tables/ctg prc funcs: Difference between revisions

From Woozle Writes Code
< VbzCart‎ | docs‎ | tables
Jump to navigation Jump to search
imported>Woozle
(7/2 implementation)
m (Woozle moved page VbzCart/VbzCart/tables/ctg prc funcs to VbzCart/docs/tables/ctg prc funcs without leaving a redirect: part 3/5)
 
(2 intermediate revisions by one other user not shown)
Line 2: Line 2:
* '''Purpose''': Repository of function parameters for calculating our retail price from the wholesale cost-to-us:
* '''Purpose''': Repository of function parameters for calculating our retail price from the wholesale cost-to-us:
*: retail = {(wholesale * '''PriceFactor''') + '''PriceAddend'''} rounded up to next '''PriceRound'''
*: retail = {(wholesale * '''PriceFactor''') + '''PriceAddend'''} rounded up to next '''PriceRound'''
* '''History''':
==History==
** '''2009-07-02''' finally implemented on L48 server
* '''2009-07-02''' finally implemented on L48 server
* '''2016-02-01''' {{l/vc/table|cat_supp}} now has ID_PriceFunc field, so reclassifying this as a ''local'' catalog table. Needs to be renamed '''cat_prc_funcs'''.
 
==SQL==
==SQL==
<section begin=sql /><mysql>CREATE TABLE `ctg_prc_funcs` (
<mysql>CREATE TABLE `ctg_prc_funcs` (
   ID          INT NOT NULL AUTO_INCREMENT,
   ID          INT NOT NULL AUTO_INCREMENT,
   Name        VARCHAR(63) NOT NULL COMMENT "descriptive name for this price function",
   Name        VARCHAR(63) NOT NULL COMMENT "descriptive name for this price function",
Line 15: Line 17:
)
)
ENGINE = MYISAM;</mysql>
ENGINE = MYISAM;</mysql>
<section end=sql />

Latest revision as of 01:56, 25 February 2024

About

  • Purpose: Repository of function parameters for calculating our retail price from the wholesale cost-to-us:
    retail = {(wholesale * PriceFactor) + PriceAddend} rounded up to next PriceRound

History

  • 2009-07-02 finally implemented on L48 server
  • 2016-02-01 Template:L/vc/table now has ID_PriceFunc field, so reclassifying this as a local catalog table. Needs to be renamed cat_prc_funcs.

SQL

<mysql>CREATE TABLE `ctg_prc_funcs` (

 ID          INT NOT NULL AUTO_INCREMENT,
 Name        VARCHAR(63) NOT NULL COMMENT "descriptive name for this price function",
 PriceFactor DECIMAL(9,2) COMMENT "amount by which to multiple wholesale cost",
 PriceAddend DECIMAL(9,2) COMMENT "amount by which to pad wholesale cost",
 PriceRound  DECIMAL(9,2) COMMENT "round-up-to-next this amount",
 Notes       VARCHAR(255) COMMENT "usage notes etc.",
 PRIMARY KEY(`ID`)

) ENGINE = MYISAM;</mysql>