Class MCOFCIBPTax

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, I_COF_C_IBPTax, I_Persistent, Evaluatee

public class MCOFCIBPTax extends X_COF_C_IBPTax
Model for MCOFCIBPTax
Version:
$Id: MCOFCIBPTax.java, v1.0 2016/01/20 10:49:11 AM, muriloht Exp $
Author:
Murilo H. Torquato
See Also:
  • Constructor Details

  • Method Details

    • get

      public static MCOFCIBPTax get(Properties ctx, int C_Region_ID, int LBR_NCM_ID, Timestamp dateTrx, String trxName, int AD_Org_ID)
      Get IBPT
      Parameters:
      ctx -
      LBR_NCM_ID -
      dateTrx -
      trxName -
      Returns:
    • getTaxRate

      public static BigDecimal getTaxRate(Properties ctx, boolean isImport, int LBR_NCM_ID, String trxName)
      Deprecated.
      Buscar alĂ­quota de acordo com a Tabela do IBPT
      Parameters:
      ctx -
      isImport - retornar aliquota importada
      LBR_NCM_ID - ncm
      trxName -
      Returns:
    • getByNCM

      public static MCOFCIBPTax getByNCM(Properties ctx, int C_Region_ID, int LBR_NCM_ID, Timestamp dateTrx, String trxName, int AD_Org_ID)
      Get IBPT (Global Search)
      Parameters:
      ctx -
      LBR_NCM_ID -
      dateTrx -
      trxName -
      Returns:
    • getByNBS

      public static MCOFCIBPTax getByNBS(Properties ctx, int C_Region_ID, int COF_NBS_ID, Timestamp dateTrx, String trxName, int AD_Org_ID)
      Get IBPT (Global Search)
      Parameters:
      ctx -
      LBR_NCM_ID -
      dateTrx -
      trxName -
      Returns:
    • importFromCSV

      public static String importFromCSV(Properties ctx, String filePath, int p_C_Region_ID, boolean p_DeleteOld, String trxName, int p_AD_Org_ID) throws Exception
      Importar arquivo CSV e inserir no BD
      Parameters:
      ctx -
      filePath -
      trxName -
      Returns:
      Throws:
      Exception
    • importFromAPI

      public static String importFromAPI(Properties ctx, String apiKey, String cnpj, int p_C_Region_ID, boolean p_DeleteOld, String trxName, int p_AD_Org_ID) throws Exception
      Importar via API (JSON) e inserir no BD
      Parameters:
      ctx -
      filePath -
      trxName -
      Returns:
      Throws:
      Exception
    • importFromAPI

      public static String importFromAPI(Properties ctx, String apiKey, String cnpj, int p_C_Region_ID, boolean p_DeleteOld, List<MLBRNCM> ncmList, List<MCOFNBS> nbsList, String trxName, int p_AD_Org_ID) throws Exception
      Importar via API (JSON) e inserir no BD
      Parameters:
      ctx -
      region -
      deleteOld -
      NCMs -
      NBSs -
      trxName -
      Returns:
      Throws:
      Exception
    • setData

      public void setData(org.devcoffee.ibpt.bean.IBPTResponse resp, MLBRNCM ncm, MCOFNBS nbs, int p_C_Region_ID) throws Exception
      Adicionar Taxa IBPT
      Parameters:
      ibptTax -
      resp -
      ncm -
      nbs -
      p_C_Region_ID -
      Throws:
      Exception
    • getcof_taxrate

      public BigDecimal getcof_taxrate(boolean imported)
      Get Tax Rate for National and Imported