Package org.compiere.model
Class Tax
- java.lang.Object
-
- org.compiere.model.Tax
-
public class Tax extends Object
Tax Handling- Version:
- $Id: Tax.java,v 1.3 2006/07/30 00:51:02 jjanke Exp $
- Author:
- Jorg Janke, Teo Sarca, www.arhipac.ro
- FR [ 2758097 ] Implement TaxNotFoundException
-
-
Constructor Summary
Constructors Constructor Description Tax()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static int
get(Properties ctx, int C_TaxCategory_ID, boolean IsSOTrx, Timestamp shipDate, int shipFromC_Location_ID, int shipToC_Location_ID, Timestamp billDate, int billFromC_Location_ID, int billToC_Location_ID, String trxName)
Get Tax ID (Detail).static int
get(Properties ctx, int M_Product_ID, int C_Charge_ID, Timestamp billDate, Timestamp shipDate, int AD_Org_ID, int M_Warehouse_ID, int billC_BPartner_Location_ID, int shipC_BPartner_Location_ID, boolean IsSOTrx)
Deprecated.static int
get(Properties ctx, int M_Product_ID, int C_Charge_ID, Timestamp billDate, Timestamp shipDate, int AD_Org_ID, int M_Warehouse_ID, int billC_BPartner_Location_ID, int shipC_BPartner_Location_ID, boolean IsSOTrx, String trxName)
Get Tax ID - converts parameters to call Get Tax.static int
getCharge(Properties ctx, int C_Charge_ID, Timestamp billDate, Timestamp shipDate, int AD_Org_ID, int M_Warehouse_ID, int billC_BPartner_Location_ID, int shipC_BPartner_Location_ID, boolean IsSOTrx)
Deprecated.static int
getCharge(Properties ctx, int C_Charge_ID, Timestamp billDate, Timestamp shipDate, int AD_Org_ID, int M_Warehouse_ID, int billC_BPartner_Location_ID, int shipC_BPartner_Location_ID, boolean IsSOTrx, String trxName)
Get Tax ID - converts parameters to call Get Tax.static int
getExemptTax(Properties ctx, int AD_Org_ID, String trxName)
Get Exempt Tax Codestatic int
getProduct(Properties ctx, int M_Product_ID, Timestamp billDate, Timestamp shipDate, int AD_Org_ID, int M_Warehouse_ID, int billC_BPartner_Location_ID, int shipC_BPartner_Location_ID, boolean IsSOTrx)
Deprecated.static int
getProduct(Properties ctx, int M_Product_ID, Timestamp billDate, Timestamp shipDate, int AD_Org_ID, int M_Warehouse_ID, int billC_BPartner_Location_ID, int shipC_BPartner_Location_ID, boolean IsSOTrx, String trxName)
Get Tax ID - converts parameters to call Get Tax.
-
-
-
Method Detail
-
get
public static int get(Properties ctx, int M_Product_ID, int C_Charge_ID, Timestamp billDate, Timestamp shipDate, int AD_Org_ID, int M_Warehouse_ID, int billC_BPartner_Location_ID, int shipC_BPartner_Location_ID, boolean IsSOTrx)
Deprecated.- Parameters:
ctx
-M_Product_ID
-C_Charge_ID
-billDate
-shipDate
-AD_Org_ID
-M_Warehouse_ID
-billC_BPartner_Location_ID
-shipC_BPartner_Location_ID
-IsSOTrx
-- Returns:
-
get
public static int get(Properties ctx, int M_Product_ID, int C_Charge_ID, Timestamp billDate, Timestamp shipDate, int AD_Org_ID, int M_Warehouse_ID, int billC_BPartner_Location_ID, int shipC_BPartner_Location_ID, boolean IsSOTrx, String trxName)
Get Tax ID - converts parameters to call Get Tax.M_Product_ID/C_Charge_ID -> C_TaxCategory_ID billDate, shipDate -> billDate, shipDate AD_Org_ID -> billFromC_Location_ID M_Warehouse_ID -> shipFromC_Location_ID billC_BPartner_Location_ID -> billToC_Location_ID shipC_BPartner_Location_ID -> shipToC_Location_ID if IsSOTrx is false, bill and ship are reversed
- Parameters:
ctx
- contextM_Product_ID
- productC_Charge_ID
- productbillDate
- invoice dateshipDate
- ship date (ignored)AD_Org_ID
- orgM_Warehouse_ID
- warehouse (ignored)billC_BPartner_Location_ID
- invoice locationshipC_BPartner_Location_ID
- ship location (ignored)IsSOTrx
- is a sales trx- Returns:
- C_Tax_ID
- Throws:
TaxCriteriaNotFoundException
- if a criteria was not found
-
getCharge
public static int getCharge(Properties ctx, int C_Charge_ID, Timestamp billDate, Timestamp shipDate, int AD_Org_ID, int M_Warehouse_ID, int billC_BPartner_Location_ID, int shipC_BPartner_Location_ID, boolean IsSOTrx)
Deprecated.- Parameters:
ctx
-C_Charge_ID
-billDate
-shipDate
-AD_Org_ID
-M_Warehouse_ID
-billC_BPartner_Location_ID
-shipC_BPartner_Location_ID
-IsSOTrx
-- Returns:
-
getCharge
public static int getCharge(Properties ctx, int C_Charge_ID, Timestamp billDate, Timestamp shipDate, int AD_Org_ID, int M_Warehouse_ID, int billC_BPartner_Location_ID, int shipC_BPartner_Location_ID, boolean IsSOTrx, String trxName)
Get Tax ID - converts parameters to call Get Tax.C_Charge_ID -> C_TaxCategory_ID billDate -> billDate shipDate -> shipDate (ignored) AD_Org_ID -> billFromC_Location_ID M_Warehouse_ID -> shipFromC_Location_ID (ignored) billC_BPartner_Location_ID -> billToC_Location_ID shipC_BPartner_Location_ID -> shipToC_Location_ID (ignored) if IsSOTrx is false, bill and ship are reversed
- Parameters:
ctx
- contextC_Charge_ID
- productbillDate
- invoice dateshipDate
- ship date (ignored)AD_Org_ID
- orgM_Warehouse_ID
- warehouse (ignored)billC_BPartner_Location_ID
- invoice locationshipC_BPartner_Location_ID
- ship location (ignored)IsSOTrx
- is a sales trx- Returns:
- C_Tax_ID
- Throws:
TaxForChangeNotFoundException
- if criteria not found for given changeTaxCriteriaNotFoundException
- if a criteria was not found
-
getProduct
public static int getProduct(Properties ctx, int M_Product_ID, Timestamp billDate, Timestamp shipDate, int AD_Org_ID, int M_Warehouse_ID, int billC_BPartner_Location_ID, int shipC_BPartner_Location_ID, boolean IsSOTrx)
Deprecated.- Parameters:
ctx
-M_Product_ID
-billDate
-shipDate
-AD_Org_ID
-M_Warehouse_ID
-billC_BPartner_Location_ID
-shipC_BPartner_Location_ID
-IsSOTrx
-- Returns:
-
getProduct
public static int getProduct(Properties ctx, int M_Product_ID, Timestamp billDate, Timestamp shipDate, int AD_Org_ID, int M_Warehouse_ID, int billC_BPartner_Location_ID, int shipC_BPartner_Location_ID, boolean IsSOTrx, String trxName)
Get Tax ID - converts parameters to call Get Tax.M_Product_ID -> C_TaxCategory_ID billDate -> billDate shipDate -> shipDate (ignored) AD_Org_ID -> billFromC_Location_ID M_Warehouse_ID -> shipFromC_Location_ID (ignored) billC_BPartner_Location_ID -> billToC_Location_ID shipC_BPartner_Location_ID -> shipToC_Location_ID (ignored) if IsSOTrx is false, bill and ship are reversed
- Parameters:
ctx
- contextM_Product_ID
- productbillDate
- invoice dateshipDate
- ship date (ignored)AD_Org_ID
- orgM_Warehouse_ID
- warehouse (ignored)billC_BPartner_Location_ID
- invoice locationshipC_BPartner_Location_ID
- ship location (ignored)IsSOTrx
- is a sales trx- Returns:
- C_Tax_ID If error it returns 0 and sets error log (TaxCriteriaNotFound)
-
getExemptTax
public static int getExemptTax(Properties ctx, int AD_Org_ID, String trxName)
Get Exempt Tax Code- Parameters:
ctx
- contextAD_Org_ID
- org to find clienttrxName
- Transaction- Returns:
- C_Tax_ID
- Throws:
TaxNoExemptFoundException
- if no tax exempt found
-
get
public static int get(Properties ctx, int C_TaxCategory_ID, boolean IsSOTrx, Timestamp shipDate, int shipFromC_Location_ID, int shipToC_Location_ID, Timestamp billDate, int billFromC_Location_ID, int billToC_Location_ID, String trxName)
Get Tax ID (Detail).- Parameters:
ctx
- contextC_TaxCategory_ID
- tax categoryIsSOTrx
- Sales Order TrxshipDate
- ship date (ignored)shipFromC_Location_ID
- ship from (ignored)shipToC_Location_ID
- ship to (ignored)billDate
- invoice datebillFromC_Location_ID
- invoice frombillToC_Location_ID
- invoice totrxName
- Transaction- Returns:
- C_Tax_ID
- Throws:
TaxNotFoundException
- if no tax found for given criteria
-
-