Class MCTECTe

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, I_CTE_CTe, I_Persistent, DocAction, DocOptions, Evaluatee

public class MCTECTe extends X_CTE_CTe implements DocAction, DocOptions
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getCTe

      public static MCTECTe getCTe(String identificador, String trxName)
    • getMCTEAutXMLList

      public List<MCTEAutXML> getMCTEAutXMLList()
    • getMCTECobrDupList

      public List<MCTECobrDup> getMCTECobrDupList()
    • getMCTECTeList

      public List<MCTECTe> getMCTECTeList()
    • getMCTEInfCargaInfQList

      public List<MCTEInfCargaInfQ> getMCTEInfCargaInfQList()
    • getMCTEInfDocInfNFList

      public List<MCTEInfDocInfNF> getMCTEInfDocInfNFList()
    • getMCTEInfDocInfNFeList

      public List<MCTEInfDocInfNFe> getMCTEInfDocInfNFeList()
    • getMCTEInfDocInfOutrosList

      public List<MCTEInfDocInfOutros> getMCTEInfDocInfOutrosList()
    • getMCOFCTeidDocAntEleList

      public List<MCOFCTeidDocAntEle> getMCOFCTeidDocAntEleList(MCOFCTeemitDocAnt mDocAnt)
    • getMCOFCTeemitDocAntList

      public List<MCOFCTeemitDocAnt> getMCOFCTeemitDocAntList()
    • getMCTERodoOccList

      public List<MCTERodoOcc> getMCTERodoOccList()
    • getMCTEvPrestCompList

      public List<MCTEvPrestComp> getMCTEvPrestCompList()
    • customizeValidActions

      public int customizeValidActions(String docStatus, Object processing, String orderType, String isSOTrx, int AD_Table_ID, String[] docAction, String[] options, int index)
      Description copied from interface: DocOptions
      Customize Valid Document Actions
      Specified by:
      customizeValidActions in interface DocOptions
      Returns:
      End index of valid options[] (exclusive)
    • setInvoice

      public void setInvoice(MInvoice inv, boolean force) throws Exception
      Set Invoice
      Parameters:
      inv -
      Throws:
      Exception
    • setComponenteImposto

      public void setComponenteImposto(MInvoiceLine[] lines)
    • beforeSave

      protected boolean beforeSave(boolean newRecord)
      Description copied from class: PO
      Called before Save for Pre-Save Operation.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      beforeSave in class PO
      Parameters:
      newRecord - true if it is a new record
      Returns:
      true if record can be saved
    • processIt

      public boolean processIt(String processAction)
      Process document
      Specified by:
      processIt in interface DocAction
      Parameters:
      processAction - document action
      Returns:
      true if performed
    • unlockIt

      public boolean unlockIt()
      Unlock Document.
      Specified by:
      unlockIt in interface DocAction
      Returns:
      true if success
    • prepareIt

      public String prepareIt()
      Description copied from interface: DocAction
      Prepare Document for a document action
      Specified by:
      prepareIt in interface DocAction
      Returns:
      new status (In Progress or Invalid)
    • approveIt

      public boolean approveIt()
      Description copied from interface: DocAction
      Approve Document
      Specified by:
      approveIt in interface DocAction
      Returns:
      true if success
    • rejectIt

      public boolean rejectIt()
      Description copied from interface: DocAction
      Reject Approval
      Specified by:
      rejectIt in interface DocAction
      Returns:
      true if success
    • completeIt

      public String completeIt()
      Description copied from interface: DocAction
      Complete Document
      Specified by:
      completeIt in interface DocAction
      Returns:
      new status (Complete, In Progress, Invalid, Waiting ..)
    • closeIt

      public boolean closeIt()
      Description copied from interface: DocAction
      Close Document
      Specified by:
      closeIt in interface DocAction
      Returns:
      true if success
    • reverseCorrectIt

      public boolean reverseCorrectIt()
      Description copied from interface: DocAction
      Reverse Correction
      Specified by:
      reverseCorrectIt in interface DocAction
      Returns:
      true if success
    • reverseAccrualIt

      public boolean reverseAccrualIt()
      Description copied from interface: DocAction
      Reverse Accrual
      Specified by:
      reverseAccrualIt in interface DocAction
      Returns:
      true if success
    • invalidateIt

      public boolean invalidateIt()
      Description copied from interface: DocAction
      Invalidate Document
      Specified by:
      invalidateIt in interface DocAction
      Returns:
      true if success
    • reActivateIt

      public boolean reActivateIt()
      Description copied from interface: DocAction
      Re-activate (typically from Complete to In Progress)
      Specified by:
      reActivateIt in interface DocAction
      Returns:
      true if success
    • getSummary

      public String getSummary()
      Description copied from interface: DocAction
      Get Summary
      Specified by:
      getSummary in interface DocAction
      Returns:
      Summary of Document
    • getDocumentInfo

      public String getDocumentInfo()
      Description copied from interface: DocAction
      Get Document Info
      Specified by:
      getDocumentInfo in interface DocAction
      Returns:
      Type and Document No
    • createPDF

      public File createPDF()
      Description copied from interface: DocAction
      Create PDF
      Specified by:
      createPDF in interface DocAction
      Returns:
      file
    • getProcessMsg

      public String getProcessMsg()
      Description copied from interface: DocAction
      Get Process Message from last execution of a document action
      Specified by:
      getProcessMsg in interface DocAction
      Returns:
      clear text message
    • voidIt

      public boolean voidIt()
      Description copied from interface: DocAction
      Void Document
      Specified by:
      voidIt in interface DocAction
      Returns:
      true if success
    • getDoc_User_ID

      public int getDoc_User_ID()
      Description copied from interface: DocAction
      Get Document Owner
      Specified by:
      getDoc_User_ID in interface DocAction
      Returns:
      AD_User_ID
    • getApprovalAmt

      public BigDecimal getApprovalAmt()
      Description copied from interface: DocAction
      Get Document Approval Amount
      Specified by:
      getApprovalAmt in interface DocAction
      Returns:
      amount
    • setC_DocTypeTarget_ID

      public void setC_DocTypeTarget_ID(MInvoice inv)
      Ajusta o Tipo de Documento correto para a NF de acordo com a Organização ou pela Fatura
    • setIsCancelled

      public void setIsCancelled(MCTEEvento evento, String dhRegEvento, String xMotivo)
    • appendCTeDesc

      public void appendCTeDesc(String cteDesc)
      Adiciona uma novo texto antes da descrição atual
      Parameters:
      cteDesc -
    • podeInserirNoLote

      public boolean podeInserirNoLote()
    • getDocStatusName

      public String getDocStatusName()
      Get Document Status
      Returns:
      Document Status Clear Text
    • getForSped

      public static List<MCTECTe> getForSped(Properties ctx, Timestamp DateFrom, Timestamp DateTo, Integer[] orgs_ID, Boolean IsSOTrx, String trxName, boolean efd) throws Exception
      Throws:
      Exception
    • criarRegistroCTe

      public static MCTECTe.CTE criarRegistroCTe(br.com.swconsultoria.cte.schema_400.procCTe.CteProc cteProc, File file, MInvoice inv)
    • getide_tpNF

      public String getide_tpNF()
    • islbr_IsOwnDocument

      public boolean islbr_IsOwnDocument()
    • getIND_EMIT

      public String getIND_EMIT()
    • setCTE_ICMS_ICMSSN_IndSN

      public void setCTE_ICMS_ICMSSN_IndSN(String CTE_ICMS_ICMSSN_IndSN)
      Description copied from class: X_CTE_CTe
      Set Contribuinte Simples Nacional.
      Specified by:
      setCTE_ICMS_ICMSSN_IndSN in interface I_CTE_CTe
      Overrides:
      setCTE_ICMS_ICMSSN_IndSN in class X_CTE_CTe
      Parameters:
      CTE_ICMS_ICMSSN_IndSN - Contribuinte Simples Nacional