Class Doc_MatchInv

java.lang.Object
org.compiere.acct.Doc
org.compiere.acct.Doc_MatchInv

public class Doc_MatchInv extends Doc
Post MatchInv Documents.
  Table:              M_MatchInv (472)
  Document Types:     MXI
  
Update Costing Records
Version:
$Id: Doc_MatchInv.java,v 1.3 2006/07/30 00:53:33 jjanke Exp $ FR [ 1840016 ] Avoid usage of clearing accounts - subject to C_AcctSchema.IsPostIfClearingEqual Avoid posting if both accounts Not Invoiced Receipts and Inventory Clearing are equal BF [ 2789949 ] Multicurrency in matching posting
Author:
Jorg Janke
  • Constructor Details

    • Doc_MatchInv

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

    • 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:
      Zero (always balanced)
    • createFacts

      public ArrayList<Fact> createFacts(MAcctSchema as)
      Create Facts (the accounting logic) for MXI. (single line)
            NotInvoicedReceipts     DR                        (Receipt Org)
            InventoryClearing               CR
            InvoicePV               DR      CR  (difference)
        Commitment
                      Expense                                                 CR
                      Offset                                  DR
        
      Specified by:
      createFacts in class Doc
      Parameters:
      as - accounting schema
      Returns:
      Fact
    • processInvoicePriceVariance

      protected void processInvoicePriceVariance(MAcctSchema as, Fact fact, BigDecimal ipv, BigDecimal ipvSource)
      Parameters:
      as -
      fact -
      ipv -
    • createCreditMemoFacts

      public ArrayList<Fact> createCreditMemoFacts(MAcctSchema as)
      Create Facts for credit memo
      Parameters:
      as - accounting schema
      Returns:
      Fact
    • updateFactLine

      protected void updateFactLine(FactLine factLine)
      Update fact line with invoice line details (qty and accounting dimension)
      Parameters:
      factLine -
    • updateFactLineAmtSource

      protected void updateFactLineAmtSource(FactLine factLine, BigDecimal ipvSource)
      Invoice currency & acct schema currency are not same then update AmtSource value to avoid source not balanced error/ignore suspense balancing.
      Parameters:
      factLine -
      ipvSource -