public final class ProductCalculatePrice
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.Double |
calculatePrice(DataSource ds,
Product prod,
java.lang.String type,
java.lang.String size,
DBObject customer,
int postCode)
Handles the generation of the unit price based on the attributes selected
The unit price is retreived from the price matrix that matches the selection
In cases where their is no price matrix then the price is set to zero
which means that it must be manually overridden
|
protected static DBObject |
findClosestPriceMatrix(DataSource ds,
Product prod,
java.lang.String type,
java.lang.String size,
DBObject customer,
int postCode)
find Closest Price Matrix
|
public static java.lang.Double calculatePrice(DataSource ds, Product prod, java.lang.String type, java.lang.String size, DBObject customer, int postCode) throws java.lang.Exception
ds
- dsprod
- prodtype
- typenumUnits
- numUnitsnumBathrooms
- numBathroomscustomer
- customerpostCode
- postCodejava.lang.Exception
- a serious problemprotected static DBObject findClosestPriceMatrix(DataSource ds, Product prod, java.lang.String type, java.lang.String size, DBObject customer, int postCode) throws java.lang.Exception
ds
- the data sourceprod
- prodtype
- typenumUnits
- numUnitsnumBathrooms
- numBathroomscustomer
- customerpostCode
- postCodejava.lang.Exception
- a serious problemstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.