Class Doc_Order


  • public class Doc_Order
    extends Doc
    Post Order Documents.
      Table:              C_Order (259)
      Document Types:     SOO, POO
      
    Version:
    $Id: Doc_Order.java,v 1.3 2006/07/30 00:53:33 jjanke Exp $
    Author:
    Jorg Janke
    • Constructor Detail

      • Doc_Order

        public Doc_Order​(MAcctSchema as,
                         ResultSet rs,
                         String trxName)
        Constructor
        Parameters:
        as - accounting schema
        rs - record
        trxName - trx
    • Method Detail

      • loadDocumentDetails

        protected String loadDocumentDetails()
        Load Specific Document Details
        Specified by:
        loadDocumentDetails in class Doc
        Returns:
        error message or null
      • getBalance

        public BigDecimal getBalance()
        Get Source Currency Balance - subtracts line and tax amounts from total - no rounding
        Specified by:
        getBalance in class Doc
        Returns:
        positive amount, if total invoice is bigger than lines
      • createFacts

        public ArrayList<Fact> createFacts​(MAcctSchema as)
        Create Facts (the accounting logic) for SOO, POO.
          Reservation (release)
                        Expense                 DR
                        Offset                                  CR
          Commitment
          (to be released by Invoice Matching)
                        Expense                                 CR
                        Offset                  DR
          
        Specified by:
        createFacts in class Doc
        Parameters:
        as - accounting schema
        Returns:
        Fact
      • getCommitments

        protected static DocLine[] getCommitments​(Doc doc,
                                                  BigDecimal maxQty,
                                                  int C_InvoiceLine_ID)
        Get Commitments
        Parameters:
        doc - document
        maxQty - Qty invoiced/matched
        C_InvoiceLine_ID - invoice line
        Returns:
        commitments (order lines)
      • getCommitmentRelease

        protected static Fact getCommitmentRelease​(MAcctSchema as,
                                                   Doc doc,
                                                   BigDecimal Qty,
                                                   int C_InvoiceLine_ID,
                                                   BigDecimal multiplier)
        Get Commitment Release. Called from MatchInv for accrual and Allocation for Cash Based
        Parameters:
        as - accounting schema
        doc - doc
        Qty - qty invoiced/matched
        C_InvoiceLine_ID - line
        multiplier - 1 for accrual
        Returns:
        Fact
      • getCommitmentsSales

        protected static DocLine[] getCommitmentsSales​(Doc doc,
                                                       BigDecimal maxQty,
                                                       int M_InOutLine_ID)
        Get Commitments Sales
        Parameters:
        doc - document
        maxQty - Qty invoiced/matched
        M_InOutLine_ID - invoice line
        Returns:
        commitments (order lines)
      • getCommitmentSalesRelease

        public static Fact getCommitmentSalesRelease​(MAcctSchema as,
                                                     Doc doc,
                                                     BigDecimal Qty,
                                                     int M_InOutLine_ID,
                                                     BigDecimal multiplier)
        Get Commitment Sales Release. Called from InOut
        Parameters:
        as - accounting schema
        doc - doc
        Qty - qty invoiced/matched
        M_InOutLine_ID - line
        multiplier - 1 for accrual
        Returns:
        Fact