Difference between revisions of "VbzCart/tables/ctg prc funcs"

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
(New page: ==About== * '''Purpose''': Repository of function parameters for calculating our retail price from the wholesale cost-to-us: *: retail = {(wholesale * '''PriceFactor''') + '''PriceAddend''...)
 
(7/2 implementation)
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''':
 +
** '''2009-07-02''' finally implemented on L48 server
 
==SQL==
 
==SQL==
 
<section begin=sql /><mysql>CREATE TABLE `ctg_prc_funcs` (
 
<section begin=sql /><mysql>CREATE TABLE `ctg_prc_funcs` (

Revision as of 23:45, 2 July 2009

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

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>