Class Doc_Invoice


  • public class Doc_Invoice
    extends Doc
    Post Invoice Documents.
      Table:              C_Invoice (318)
      Document Types:     ARI, ARC, ARF, API, APC
      
    Version:
    $Id: Doc_Invoice.java,v 1.2 2006/07/30 00:53:33 jjanke Exp $
    Author:
    Jorg Janke, Armen Rizal, Goodwill Consulting
  • BF: 2797257 Landed Cost Detail is not using allocation qty
    • Field Detail

      • m_taxes

        protected DocTax[] m_taxes
        Contained Optional Tax Lines
      • m_precision

        protected int m_precision
        Currency Precision
      • m_allLinesService

        protected boolean m_allLinesService
        All lines are Service
      • m_allLinesItem

        protected boolean m_allLinesItem
        All lines are product item
    • Constructor Detail

      • Doc_Invoice

        public Doc_Invoice​(MAcctSchema as,
                           ResultSet rs,
                           String trxName)
        Constructor
        Parameters:
        as - accounting schemata
        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 ARI, ARC, ARF, API, APC.
          ARI, ARF
              Receivables     DR
              Charge                  CR
              TaxDue                  CR
              Revenue                 CR
        
          ARC
              Receivables             CR
              Charge          DR
              TaxDue          DR
              Revenue         RR
        
          API
              Payables                CR
              Charge          DR
              TaxCredit       DR
              Expense         DR
        
          APC
              Payables        DR
              Charge                  CR
              TaxCredit               CR
              Expense                 CR
          
        Specified by:
        createFacts in class Doc
        Parameters:
        as - accounting schema
        Returns:
        Fact
      • createFactCash

        public BigDecimal createFactCash​(MAcctSchema as,
                                         Fact fact,
                                         BigDecimal multiplier)
        Create Fact Cash Based (i.e. only revenue/expense)
        Parameters:
        as - accounting schema
        fact - fact to add lines to
        multiplier - source amount multiplier
        Returns:
        accounted amount
      • landedCost

        protected boolean landedCost​(MAcctSchema as,
                                     Fact fact,
                                     DocLine line,
                                     boolean dr)
        Create Landed Cost accounting and Cost lines
        Parameters:
        as - accounting schema
        fact - fact
        line - document line
        dr - DR entry (normal api)
        Returns:
        true if landed costs were created
      • updateProductPO

        protected void updateProductPO​(MAcctSchema as)
        Update ProductPO PriceLastInv
        Parameters:
        as - accounting schema
      • isConvertible

        public boolean isConvertible​(MAcctSchema acctSchema)
        Description copied from class: Doc
        Is Document convertible to currency and Conversion Type
        Overrides:
        isConvertible in class Doc
        Parameters:
        acctSchema - accounting schema
        Returns:
        true, if convertible to accounting currency