Class MRMA

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, I_M_RMA, I_Persistent, DocAction, Evaluatee

public class MRMA extends X_M_RMA implements DocAction
RMA Model
Version:
$Id: MRMA.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $ Modifications: Completed RMA functionality (Ashley Ramdass)
Author:
Jorg Janke
See Also:
  • Field Details

    • m_lines

      protected MRMALine[] m_lines
      Lines
    • m_taxes

      protected MRMATax[] m_taxes
      Tax Lines
    • m_inout

      protected MInOut m_inout
      The Shipment
    • m_processMsg

      protected String m_processMsg
      Process Message
    • m_justPrepared

      protected boolean m_justPrepared
      Just Prepared Flag
  • Constructor Details

    • MRMA

      public MRMA(Properties ctx, String M_RMA_UU, String trxName)
      UUID based Constructor
      Parameters:
      ctx - Context
      M_RMA_UU - UUID key
      trxName - Transaction
    • MRMA

      public MRMA(Properties ctx, int M_RMA_ID, String trxName)
      Standard Constructor
      Parameters:
      ctx - context
      M_RMA_ID - id
      trxName - transaction
    • MRMA

      public MRMA(Properties ctx, ResultSet rs, String trxName)
      Load Constructor
      Parameters:
      ctx - context
      rs - result set
      trxName - transaction
  • Method Details

    • getLines

      public MRMALine[] getLines(boolean requery)
      Get RMA Lines
      Parameters:
      requery - true to re-query from DB
      Returns:
      RMA lines
    • getTaxes

      public MRMATax[] getTaxes(boolean requery)
      Get RMA Tax Lines
      Parameters:
      requery - true to re-query from DB
      Returns:
      array of RMA tax lines
    • getShipment

      public MInOut getShipment()
      Get Shipment
      Returns:
      shipment
    • getOriginalOrder

      public MOrder getOriginalOrder()
      Get the original order on which the shipment/receipt defined is based upon.
      Returns:
      order
    • getOriginalInvoice

      public MInvoice getOriginalInvoice()
      Get the original invoice on which the shipment/receipt defined is based upon.
      Returns:
      invoice
    • setM_InOut_ID

      public void setM_InOut_ID(int M_InOut_ID)
      Set M_InOut_ID
      Parameters:
      M_InOut_ID - id
    • getDocumentInfo

      public String getDocumentInfo()
      Get Document Info
      Specified by:
      getDocumentInfo in interface DocAction
      Returns:
      document info (untranslated)
    • createPDF

      public File createPDF()
      Create PDF
      Specified by:
      createPDF in interface DocAction
      Returns:
      not implemented, always return null
    • createPDF

      public File createPDF(File file)
      Create PDF file
      Parameters:
      file - output file
      Returns:
      not implemented, always return null
    • beforeSave

      protected boolean beforeSave(boolean newRecord)
      Before Save Set BPartner, Currency
      Overrides:
      beforeSave in class PO
      Parameters:
      newRecord - new
      Returns:
      true
    • processIt

      public boolean processIt(String processAction)
      Process document
      Specified by:
      processIt in interface DocAction
      Parameters:
      processAction - document action
      Returns:
      true if performed
    • unlockIt

      public boolean unlockIt()
      Unlock Document.
      Specified by:
      unlockIt in interface DocAction
      Returns:
      true if success
    • invalidateIt

      public boolean invalidateIt()
      Invalidate Document
      Specified by:
      invalidateIt in interface DocAction
      Returns:
      true if success
    • prepareIt

      public String prepareIt()
      Prepare Document
      Specified by:
      prepareIt in interface DocAction
      Returns:
      new status (In Progress or Invalid)
    • calculateTaxTotal

      public boolean calculateTaxTotal()
      Calculate Tax and Total
      Returns:
      true if tax total calculated
    • approveIt

      public boolean approveIt()
      Approve Document
      Specified by:
      approveIt in interface DocAction
      Returns:
      true if success
    • rejectIt

      public boolean rejectIt()
      Reject Approval
      Specified by:
      rejectIt in interface DocAction
      Returns:
      true if success
    • completeIt

      public String completeIt()
      Complete Document
      Specified by:
      completeIt in interface DocAction
      Returns:
      new status (Complete, In Progress, Invalid, Waiting ..)
    • setDefiniteDocumentNo

      protected void setDefiniteDocumentNo()
      Set the definite document number after completed
    • createCounterDoc

      protected MRMA createCounterDoc()
      Create Counter Document
      Returns:
      MRMA
    • copyFrom

      public static MRMA copyFrom(MRMA from, int C_DocType_ID, boolean isSOTrx, boolean counter, String trxName)
      Create and save new RMA by copying from another RMA document
      Parameters:
      from - RMA to copy from
      C_DocType_ID - doc type
      isSOTrx - sales trx flag
      counter - create counter links
      trxName - trx
      Returns:
      new MRMA
    • copyLinesFrom

      public int copyLinesFrom(MRMA otherRMA, boolean counter)
      Copy Lines From other RMA
      Parameters:
      otherRMA - RMA to copy lines from
      counter - set counter info
      Returns:
      number of lines copied
    • voidIt

      public boolean voidIt()
      Void Document.
      Specified by:
      voidIt in interface DocAction
      Returns:
      true if success
    • closeIt

      public boolean closeIt()
      Close Document. Cancel not delivered Quantities.
      Specified by:
      closeIt in interface DocAction
      Returns:
      true if success
    • reverseCorrectIt

      public boolean reverseCorrectIt()
      Reverse Correction
      Specified by:
      reverseCorrectIt in interface DocAction
      Returns:
      not implemented, always return false
    • reverseAccrualIt

      public boolean reverseAccrualIt()
      Reverse Accrual
      Specified by:
      reverseAccrualIt in interface DocAction
      Returns:
      not implemented, always return false
    • reActivateIt

      public boolean reActivateIt()
      Re-activate
      Specified by:
      reActivateIt in interface DocAction
      Returns:
      not implemented, always return false
    • getPrecision

      public int getPrecision()
      Get Currency Precision
      Returns:
      precision
    • setProcessed

      public void setProcessed(boolean processed)
      Set Processed. Propagate to Lines.
      Specified by:
      setProcessed in interface I_M_RMA
      Overrides:
      setProcessed in class X_M_RMA
      Parameters:
      processed - processed
    • addDescription

      public void addDescription(String description)
      Add to Description
      Parameters:
      description - text
    • getSummary

      public String getSummary()
      Get Summary
      Specified by:
      getSummary in interface DocAction
      Returns:
      Summary of Document
    • getChargeLines

      public MRMALine[] getChargeLines()
      Retrieves all the charge lines that is present on the document
      Returns:
      RMA Lines with Charge
    • isTaxIncluded

      public boolean isTaxIncluded()
      Get whether Tax is included (based on the original order)
      Returns:
      True if tax is included
    • getProcessMsg

      public String getProcessMsg()
      Get Process Message
      Specified by:
      getProcessMsg in interface DocAction
      Returns:
      clear text error message
    • getDoc_User_ID

      public int getDoc_User_ID()
      Get Document Owner (Responsible)
      Specified by:
      getDoc_User_ID in interface DocAction
      Returns:
      AD_User_ID
    • getApprovalAmt

      public BigDecimal getApprovalAmt()
      Get Document Approval Amount
      Specified by:
      getApprovalAmt in interface DocAction
      Returns:
      amount
    • isComplete

      public boolean isComplete()
      Document Status is Complete, Closed or Reverse
      Returns:
      true if CO, CL or RE
    • setProcessMessage

      public void setProcessMessage(String processMsg)
      Set process message
      Parameters:
      processMsg -
    • getTaxProviders

      public MTaxProvider[] getTaxProviders()
      Get tax providers
      Returns:
      array of tax provider
    • createLineFrom

      public void createLineFrom(int M_InOutLine_ID, BigDecimal MovementQty, String Description)
      Create and save RMA Line from inout line
      Parameters:
      M_InOutLine_ID -
      MovementQty -
      Description -