Class 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 Code
      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. 
      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.
    • Constructor Detail

      • Tax

        public 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 - context
        M_Product_ID - product
        C_Charge_ID - product
        billDate - invoice date
        shipDate - ship date (ignored)
        AD_Org_ID - org
        M_Warehouse_ID - warehouse (ignored)
        billC_BPartner_Location_ID - invoice location
        shipC_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 - context
        C_Charge_ID - product
        billDate - invoice date
        shipDate - ship date (ignored)
        AD_Org_ID - org
        M_Warehouse_ID - warehouse (ignored)
        billC_BPartner_Location_ID - invoice location
        shipC_BPartner_Location_ID - ship location (ignored)
        IsSOTrx - is a sales trx
        Returns:
        C_Tax_ID
        Throws:
        TaxForChangeNotFoundException - if criteria not found for given change
        TaxCriteriaNotFoundException - 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 - context
        M_Product_ID - product
        billDate - invoice date
        shipDate - ship date (ignored)
        AD_Org_ID - org
        M_Warehouse_ID - warehouse (ignored)
        billC_BPartner_Location_ID - invoice location
        shipC_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 - context
        AD_Org_ID - org to find client
        trxName - 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 - context
        C_TaxCategory_ID - tax category
        IsSOTrx - Sales Order Trx
        shipDate - ship date (ignored)
        shipFromC_Location_ID - ship from (ignored)
        shipToC_Location_ID - ship to (ignored)
        billDate - invoice date
        billFromC_Location_ID - invoice from
        billToC_Location_ID - invoice to
        trxName - Transaction
        Returns:
        C_Tax_ID
        Throws:
        TaxNotFoundException - if no tax found for given criteria