Class DocManager

java.lang.Object
org.compiere.acct.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
  • Field Details

  • Constructor Details

    • DocManager

      public DocManager()
  • Method Details

    • getDocumentsTableID

      public static int[] getDocumentsTableID()
      Array of table ids with Posted column
    • getDocumentsTableName

      public static String[] getDocumentsTableName()
      Array of table names with Posted column
    • 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 or null
      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