Package org.compiere.model
Class Tax
java.lang.Object
org.compiere.model.Tax
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
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
get
(Properties ctx, int C_TaxCategory_ID, boolean IsSOTrx, Timestamp shipDate, int shipFromC_Location_ID, int shipToC_Location_ID, int dropshipC_Location_ID, Timestamp billDate, int billFromC_Location_ID, int billToC_Location_ID, String trxName) Get Tax ID (Detail).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 deliveryViaRule, String trxName) Get Tax ID - converts parameters to call Get Tax.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, int dropshipC_BPartner_Location_ID, boolean IsSOTrx, String trxName) Get Tax ID - converts parameters to call Get Tax.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, int dropshipC_BPartner_Location_ID, boolean IsSOTrx, String deliveryViaRule, 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
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, int dropshipC_BPartner_Location_ID, boolean IsSOTrx, String deliveryViaRule, 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.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, int dropshipC_BPartner_Location_ID, boolean IsSOTrx, String deliveryViaRule, String trxName) Get Tax ID - converts parameters to call Get Tax.
-
Constructor Details
-
Tax
public Tax()
-
-
Method Details
-
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, int dropshipC_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)dropshipC_BPartner_Location_ID
- ship location (ignored)IsSOTrx
- is a sales trxtrxName
-- Returns:
- C_Tax_ID
- Throws:
TaxCriteriaNotFoundException
- if a criteria was not found
-
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 deliveryViaRule, 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 trxdeliveryViaRule
- if Delivery Via Rule is PickUp, use Warehouse Location instead of Billing Location as Tax Location totrxName
-- Returns:
- C_Tax_ID
- Throws:
TaxCriteriaNotFoundException
- if a criteria was not found
-
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, int dropshipC_BPartner_Location_ID, boolean IsSOTrx, String deliveryViaRule, 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)dropshipC_BPartner_Location_ID
- dropship locationIsSOTrx
- is a sales trxdeliveryViaRule
- if Delivery Via Rule is PickUp, use Warehouse Location instead of Billing Location as Tax Location totrxName
-- 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 trxtrxName
-- Returns:
- C_Tax_ID
- Throws:
TaxForChangeNotFoundException
- if criteria not found for given changeTaxCriteriaNotFoundException
- 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, int dropshipC_BPartner_Location_ID, boolean IsSOTrx, String deliveryViaRule, 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)dropshipC_BPartner_Location_ID
-IsSOTrx
- is a sales trxdeliveryViaRule
- if Delivery Via Rule is PickUp, use Warehouse Location instead of Billing Location as Tax Location totrxName
-- 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 trxtrxName
-- Returns:
- C_Tax_ID If error it returns 0 and sets error log (TaxCriteriaNotFound)
-
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, int dropshipC_BPartner_Location_ID, boolean IsSOTrx, String deliveryViaRule, 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)dropshipC_BPartner_Location_ID
-IsSOTrx
- is a sales trxdeliveryViaRule
- if Delivery Via Rule is PickUp, use Warehouse Location instead of Billing Location as Tax Location totrxName
-- Returns:
- C_Tax_ID If error it returns 0 and sets error log (TaxCriteriaNotFound)
-
getExemptTax
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 from (Tax Location from)billToC_Location_ID
- invoice to (Tax Location to)trxName
- Transaction- Returns:
- C_Tax_ID
- Throws:
TaxNotFoundException
- if no tax found for given criteria
-
get
public static int get(Properties ctx, int C_TaxCategory_ID, boolean IsSOTrx, Timestamp shipDate, int shipFromC_Location_ID, int shipToC_Location_ID, int dropshipC_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)dropshipC_Location_ID
-billDate
- invoice datebillFromC_Location_ID
- invoice from (Tax Location from)billToC_Location_ID
- invoice to (Tax Location to)trxName
- Transaction- Returns:
- C_Tax_ID
- Throws:
TaxNotFoundException
- if no tax found for given criteria
-