|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.konakart.util.TaxUtils
public class TaxUtils
Utility methods for calculating tax
| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
log
the log |
static int |
TAX_ON_TOTAL
Quantity rule |
static int |
TAX_PER_ITEM
Quantity rule |
| Constructor Summary | |
|---|---|
TaxUtils()
|
|
| Method Summary | |
|---|---|
static java.math.BigDecimal |
getTaxAmount(java.math.BigDecimal taxRate,
java.math.BigDecimal cost,
int quantity,
int scale,
int rule)
Calculates the tax for one or more items |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.apache.commons.logging.Log log
public static final int TAX_ON_TOTAL
public static final int TAX_PER_ITEM
| Constructor Detail |
|---|
public TaxUtils()
| Method Detail |
|---|
public static java.math.BigDecimal getTaxAmount(java.math.BigDecimal taxRate,
java.math.BigDecimal cost,
int quantity,
int scale,
int rule)
taxRate - tax rate as a percentagecost - cost of a single itemquantity - Number of itemsscale - This is the scale used for the precision of the calculations. It is contained in
the ADMIN_CURRENCY_DECIMAL_PLACES configuration variable.rule - The rule to be used which should be either TAX_PER_ITEM or TAX_ON_TOTAL.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||