Class MJournalBatch

    • Field Detail

      • m_processMsg

        protected String m_processMsg
        Process Message
      • m_justPrepared

        protected boolean m_justPrepared
        Just Prepared Flag
    • Constructor Detail

      • MJournalBatch

        public MJournalBatch​(Properties ctx,
                             int GL_JournalBatch_ID,
                             String trxName)
        Standard Construvtore
        Parameters:
        ctx - context
        GL_JournalBatch_ID - id if 0 - create actual batch
        trxName - transaction
      • MJournalBatch

        public MJournalBatch​(Properties ctx,
                             ResultSet rs,
                             String trxName)
        Load Constructor
        Parameters:
        ctx - context
        rs - result set
        trxName - transaction
      • MJournalBatch

        public MJournalBatch​(MJournalBatch original)
        Copy Constructor. Dos not copy: Dates/Period
        Parameters:
        original - original
    • Method Detail

      • copyFrom

        public static MJournalBatch copyFrom​(Properties ctx,
                                             int GL_JournalBatch_ID,
                                             Timestamp dateDoc,
                                             String trxName)
        Create new Journal Batch by copying
        Parameters:
        ctx - context
        GL_JournalBatch_ID - journal batch
        dateDoc - date of the document date
        trxName - transaction
        Returns:
        Journal Batch
      • setClientOrg

        public void setClientOrg​(int AD_Client_ID,
                                 int AD_Org_ID)
        Overwrite Client/Org if required
        Overrides:
        setClientOrg in class PO
        Parameters:
        AD_Client_ID - client
        AD_Org_ID - org
      • getJournals

        public MJournal[] getJournals​(boolean requery)
        Get Journal Lines
        Parameters:
        requery - requery
        Returns:
        Array of lines
      • copyDetailsFrom

        public int copyDetailsFrom​(MJournalBatch jb)
        Copy Journal/Lines from other Journal Batch
        Parameters:
        jb - Journal Batch
        Returns:
        number of journals + lines copied
      • 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
      • invalidateIt

        public boolean invalidateIt()
        Invalidate Document
        Specified by:
        invalidateIt in interface DocAction
        Returns:
        true if success
      • prepareIt

        public String prepareIt()
        Prepare Document
        Specified by:
        prepareIt in interface DocAction
        Returns:
        new status (In Progress or Invalid)
      • approveIt

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

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

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

        protected void setDefiniteDocumentNo()
        Set the definite document number after completed
      • voidIt

        public boolean voidIt()
        Void Document.
        Specified by:
        voidIt in interface DocAction
        Returns:
        false
      • closeIt

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

        public boolean reverseCorrectIt()
        Reverse Correction. As if nothing happened - same date
        Specified by:
        reverseCorrectIt in interface DocAction
        Returns:
        true if success
      • reverseAccrualIt

        public boolean reverseAccrualIt()
        Reverse Accrual. Flip Dr/Cr - Use Today's date
        Specified by:
        reverseAccrualIt in interface DocAction
        Returns:
        true if success
      • reActivateIt

        public boolean reActivateIt()
        Re-activate - same as reverse correct
        Specified by:
        reActivateIt in interface DocAction
        Returns:
        true if success
      • getSummary

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

        public String getDocumentInfo()
        Get Document Info
        Specified by:
        getDocumentInfo in interface DocAction
        Returns:
        document info (untranslated)
      • createPDF

        public File createPDF()
        Create PDF
        Specified by:
        createPDF in interface DocAction
        Returns:
        File or null
      • createPDF

        public File createPDF​(File file)
        Create PDF file
        Parameters:
        file - output file
        Returns:
        file if success
      • getProcessMsg

        public String getProcessMsg()
        Get Process Message
        Specified by:
        getProcessMsg in interface DocAction
        Returns:
        clear text error message
      • getDoc_User_ID

        public int getDoc_User_ID()
        Get Document Owner (Responsible)
        Specified by:
        getDoc_User_ID in interface DocAction
        Returns:
        AD_User_ID (Created By)
      • addDescription

        public void addDescription​(String description)
      • beforeSave

        protected boolean beforeSave​(boolean newRecord)
        Before Save
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - new
        Returns:
        true
      • isComplete

        public boolean isComplete()
        Document Status is Complete or Closed
        Returns:
        true if CO, CL or RE