public class TaxUtility
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
NUMBEROFTAXCODES
constant to indicate number of taxcodes, currently, there are 5.
|
static boolean |
refetchNumTax |
Modifier and Type | Method and Description |
---|---|
boolean |
compareTaxattrValue(MboRemote firstMbo,
java.lang.String taxattr,
MboRemote secondMbo)
Compare two MBOs tax related fields are same value or not.
|
int |
getNumberofTaxes()
Return number of taxes using in the system.
|
java.lang.String[] |
getTaxCodeOrder(MboRemote mbo)
get Tax taxcode order
|
double[] |
getTaxesArray(MboRemote mbo)
Get Tax1-TaxN to a double array array.
|
java.lang.String[] |
getTaxExemptOrder(MboRemote mbo)
get Tax taxexampt order
|
static TaxUtility |
getTaxUtility()
Returns the static instance of this class.
|
void |
nullAllTaxcodes(MboRemote mbo,
java.lang.String taxattr)
Null all tax fields
|
void |
nullAllTaxcodes(MboRemote mbo,
java.lang.String taxattr,
long accessModifier)
Null all tax fields
|
void |
refetchNumtax()
Force taxUtil to refetch the number of taxes
|
void |
resetTaxOrder()
reset Tax exampt and tax code hierarchy order.
|
void |
setBaseTaxes(MboRemote mbofrom,
MboRemote mbo,
java.lang.String fromTaxAttr,
java.lang.String taxAttr,
double exchangeRate,
long accessModifier)
Calculate Tax Cost
|
void |
setTaxattrFieldFlag(MboRemote mbo,
java.lang.String taxattr,
long flag,
boolean state)
Set Tax attribute field flag.
|
void |
setTaxattrValue(MboRemote mbo,
java.lang.String taxattr,
boolean booleanValue,
boolean checkDefaultValue)
Set boolean value to all tax related fields.
|
void |
setTaxattrValue(MboRemote mbo,
java.lang.String taxattr,
boolean booleanValue,
boolean checkDefaultValue,
long accessModifier)
Set boolean value to all tax related fields.
|
void |
setTaxattrValue(MboRemote mbo,
java.lang.String taxattr,
double doubleValue,
long accessModifier)
Set double value to all tax related fields.
|
void |
setTaxattrValue(MboRemote mbo,
java.lang.String taxattr,
MboRemote mbofrom)
Set value to all tax fields
|
void |
setTaxattrValue(MboRemote mbo,
java.lang.String taxattr,
MboRemote mbofrom,
long accessModifier)
Set value to all tax fields
|
void |
setTaxesReadonly(MboRemote mbo,
java.lang.String taxattr,
boolean readonly)
null all taxcodes
|
void |
setTaxOrder(MboRemote mbo)
Set Tax exampt and tax code hierarchy order.
|
boolean |
taxcodeDefined(MboRemote mbo,
java.lang.String taxattr)
check if all taxcode has empty string
|
void |
zeroAllTaxes(MboRemote mbo,
java.lang.String taxattr)
Zero all taxes
|
void |
zeroAllTaxes(MboRemote mbo,
java.lang.String taxattr,
long accessModifier)
Zero all taxes
|
public static int NUMBEROFTAXCODES
public static boolean refetchNumTax
public static TaxUtility getTaxUtility()
public void refetchNumtax() throws java.rmi.RemoteException
java.rmi.RemoteException
public void setTaxattrValue(MboRemote mbo, java.lang.String taxattr, MboRemote mbofrom) throws MXException, java.rmi.RemoteException
mbo
- need setvalue.taxattr
- taxattr name.mbofrom
- mbo to get valueMXException
java.rmi.RemoteException
public void setTaxattrValue(MboRemote mbo, java.lang.String taxattr, MboRemote mbofrom, long accessModifier) throws MXException, java.rmi.RemoteException
mbo
- need setvalue.taxattr
- taxattr name.mbofrom
- mbo to get valueaccessModifier
- MXException
java.rmi.RemoteException
public void setTaxattrValue(MboRemote mbo, java.lang.String taxattr, boolean booleanValue, boolean checkDefaultValue) throws java.rmi.RemoteException
mbo
- need to set value.taxattr
- Tax attribute name.booleanValue
- Boolean value needs to be set.checkDefaultValue
- Check database default value before setting values.java.rmi.RemoteException
public void setTaxattrValue(MboRemote mbo, java.lang.String taxattr, boolean booleanValue, boolean checkDefaultValue, long accessModifier) throws java.rmi.RemoteException
mbo
- need to set value.taxattr
- Tax attribute name.booleanValue
- Boolean value needs to be set.checkDefaultValue
- Check database default value before setting values.accessModifier
- java.rmi.RemoteException
public void setTaxattrValue(MboRemote mbo, java.lang.String taxattr, double doubleValue, long accessModifier) throws java.rmi.RemoteException
mbo
- need to set value.taxattr
- Tax attribute name.doubleValue
- Double value needs to be set.accessModifier
- java.rmi.RemoteException
public void nullAllTaxcodes(MboRemote mbo, java.lang.String taxattr) throws java.rmi.RemoteException
mbo
- need setvalue.taxattr
- taxcode name.java.rmi.RemoteException
public void nullAllTaxcodes(MboRemote mbo, java.lang.String taxattr, long accessModifier) throws java.rmi.RemoteException
mbo
- need setvalue.taxattr
- taxcode name.accessModifier
- java.rmi.RemoteException
public void setTaxesReadonly(MboRemote mbo, java.lang.String taxattr, boolean readonly) throws java.rmi.RemoteException
mbo
- .taxattr
- taxcode name.java.rmi.RemoteException
public void setBaseTaxes(MboRemote mbofrom, MboRemote mbo, java.lang.String fromTaxAttr, java.lang.String taxAttr, double exchangeRate, long accessModifier) throws java.rmi.RemoteException
mbofrom
- mbo
- fromTaxAttr
- taxAttr
- exchangeRate
- accessModifier
- java.rmi.RemoteException
public void zeroAllTaxes(MboRemote mbo, java.lang.String taxattr) throws java.rmi.RemoteException
mbo
- need setvalue.taxattr
- tax name.java.rmi.RemoteException
public void zeroAllTaxes(MboRemote mbo, java.lang.String taxattr, long accessModifier) throws java.rmi.RemoteException
mbo
- need setvalue.taxattr
- tax name.accessModifier
- Access Modifierjava.rmi.RemoteException
public boolean taxcodeDefined(MboRemote mbo, java.lang.String taxattr) throws java.rmi.RemoteException
taxattr
- java.rmi.RemoteException
public int getNumberofTaxes() throws java.rmi.RemoteException
java.rmi.RemoteException
public boolean compareTaxattrValue(MboRemote firstMbo, java.lang.String taxattr, MboRemote secondMbo) throws MXException, java.rmi.RemoteException
firstMbo
- First MBO that needs to compare value.taxattr
- Tax attribute name.secondMbo
- Second MBO that needs to compare value.MXException
java.rmi.RemoteException
public void setTaxattrFieldFlag(MboRemote mbo, java.lang.String taxattr, long flag, boolean state) throws java.rmi.RemoteException
mbo
- need to set field flag.taxattr
- Tax attribute name.flag
- Action flag.state
- State of the flag.java.rmi.RemoteException
public void resetTaxOrder() throws MXException, java.rmi.RemoteException
mbo
- need to set the order.MXException
java.rmi.RemoteException
public void setTaxOrder(MboRemote mbo) throws MXException, java.rmi.RemoteException
mbo
- need to set the order.MXException
java.rmi.RemoteException
public java.lang.String[] getTaxExemptOrder(MboRemote mbo) throws MXException, java.rmi.RemoteException
mbo
- need to set tax exempt.MXException
java.rmi.RemoteException
public java.lang.String[] getTaxCodeOrder(MboRemote mbo) throws MXException, java.rmi.RemoteException
mbo
- need to set tax code.MXException
java.rmi.RemoteException
public double[] getTaxesArray(MboRemote mbo) throws MXException, java.rmi.RemoteException
mbo
- MBO that needs to get tax.MXException
java.rmi.RemoteException