Class DocManager


  • public class DocManager
    extends Object
    This class contains methods to manage the posting of financial document. Most of the code is adapted from the legacy code in Doc.java
    Author:
    Jorg Janke, hengsin
    • Constructor Detail

      • DocManager

        public DocManager()
    • Method Detail

      • getDocumentsTableID

        public static int[] getDocumentsTableID()
      • getDocumentsTableName

        public static String[] getDocumentsTableName()
      • getDocument

        public static Doc getDocument​(MAcctSchema as,
                                      int AD_Table_ID,
                                      int Record_ID,
                                      String trxName)
        Create Posting document
        Parameters:
        as - accounting schema
        AD_Table_ID - Table ID of Documents
        Record_ID - record ID to load
        trxName - transaction name
        Returns:
        Document or null
      • getDocument

        public static Doc getDocument​(MAcctSchema as,
                                      int AD_Table_ID,
                                      ResultSet rs,
                                      String trxName)
        Create Posting document
        Parameters:
        as - accounting schema
        AD_Table_ID - Table ID of Documents
        rs - ResultSet
        trxName - transaction name
        Returns:
        Document
        Throws:
        AdempiereUserError
      • postDocument

        public static String postDocument​(MAcctSchema[] ass,
                                          int AD_Table_ID,
                                          int Record_ID,
                                          boolean force,
                                          boolean repost,
                                          String trxName)
        Post Document
        Parameters:
        ass - accounting schema
        AD_Table_ID - Transaction table
        Record_ID - Record ID of this document
        force - force posting
        repost - Repost document
        trxName - transaction
        Returns:
        null if the document was posted or error message
      • postDocument

        public static String postDocument​(MAcctSchema[] ass,
                                          int AD_Table_ID,
                                          ResultSet rs,
                                          boolean force,
                                          boolean repost,
                                          String trxName)
        Post Document
        Parameters:
        ass - accounting schema
        AD_Table_ID - Transaction table
        rs - Result set
        force - force posting
        repost - Repost document
        trxName - transaction
        Returns:
        null if the document was posted or error message