updated as of: June 3, 2014

last author: Andy Theuninck

last author: Andy Theuninck

CORE supports a number of ways of calculating an item's price beyond simply assigning an item a static price. These methods do not all have a direct user interface in Fannie so this document will include discussion of the underlying database.

There are two sets of four columns used for price calculations. The first
set is for regular pricing: *pricemethod, normal_price, groupprice, and quantity*.
The second set is for sale pricing: *specialpricemethod, special_price,
specialgroupprice, and specialquantity*. The remainder of the document will use
the first set of column names for brevity. The second set are exactly equivalent,
respectively, for sale items. One other column of note is *mixmatchcode*
which is used to define groups of items.

**Basic Price Method**(pricemethod #0)- The most common pricing method and widely supported through Fannie.
- The item price is simply
*normal_price*.

**Group Price Method**(pricemethod #1)- Non-strict volume pricing
- Example: three for a dollar:
- pricemethod = 1
- normal_price is irrelevant
- groupprice = 1.00
- quantity = 3

- Each item will ring up at
*groupprice*divided by*quantity*. Buying a complete set is not required.

**Quantity Enforced Group Price Method**(pricemethod #2)- Strict volume pricing
- Example: three for a dollar:
- pricemethod = 2
- normal_price = 0.40
- groupprice = 1.00
- quantity = 3

- Each full set will ring up at the group price. In the example,
the first item would ring in at $0.40 (
*normal_price*), the second item would also ring in at $0.40 (*normal_price*), and the third item would ring in at $0.20 (the value required to reach the correct*groupprice*for the set). - Items with the same
*mixmatchcode*are considered equivalent and will all count towards the required*quantity*.

**Split AB Group Price Method**(pricemethod #3)- Buy item A, save on item B
- Example: buy two sodas, save $0.50 on bottle opener
- Soda:
- pricemethod = 3
- normal_price = regular retail price
- groupprice = 0.50
- quantity = 3
- mixmatchcode = 123

- Bottle opener:
- pricemethod = 3
- normal_price = regular retail price
- groupprice = 0.50
- quantity = 3
- mixmatchcode = -123

- Soda:
- All items will ring in at
*normal_price*. When a full set is reached,**two**separate discount records are added. The discount is split evenly. One record has the department value for item A and one record has the department value for item B. - The
*groupprice*column contains the total discount amount - The
*quantity*column contains the number of item A required plus one. The requirement for item B is always considered one item. - The
*mixmatchcode*defines which item(s) are considered A and which item(s) are considered B. This value must be numeric with the positive code for A and the negative code for B.

**AB Group Price Method**(pricemethod #4)- Buy item A, save on item B
- This is identical to
*Split AB Group Price*except only a single discount record is added for each complete set. The department value for item B is always used for the discount.

**Big Group Price Method**(pricemethod #5)- Buy a number of different items, save on another item
- This is an expanded version of AB pricing. The customer has to buy item A, item B, item C, etc to get the discount.
- The sets of items are defined using
*mixmatchcode*. The first ten characters should be the same for all items, followed by an underscore, followed by either*d*to denote the discounted item or*q*and an integer to denote the qualifying item. - All items ring in at
*normal_price*. - A separate discount record for
*groupprice*is added when all items have been purchased - The
*quantity*column defines the number of qualifying items. If*quantity*is three and*mixmatchcode*starts with myBigGroup, the customer needs to buy at least one item each with myBigGroup_q0, myBigGroup_q1, myBigGroup_q2, and myBigGroup_d.

**More Than Quantity Price Method**(pricemethod #6)- Save X% if purchasing Y or more items
- Example: buy 12 or more bottles of wine, save 5%
- pricemethod = 6
- normal_price = regular retail price
- groupprice = 0.05
- quantity = 12

- Items with the same
*mixmatchcode*are considered equivalent *groupprice*is interpreted as a percentage.- All items are discounted once the threshold is reached, not just the final one (e.g., the 12th bottle in the example)