Class MRMALine

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

public class MRMALine extends X_M_RMALine
RMA Line Model
Version:
$Id: MRMALine.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $
Author:
Jorg Janke
See Also:
  • Field Details

    • m_ioLine

      protected MInOutLine m_ioLine
      Shipment Line
    • m_product

      protected MProduct m_product
      Product
    • m_charge

      protected MCharge m_charge
      Charge
    • m_tax

      protected MTax m_tax
      Tax
    • m_parent

      protected MRMA m_parent
      Parent
    • precision

      protected int precision
    • unitAmount

      protected BigDecimal unitAmount
    • originalQty

      protected BigDecimal originalQty
    • taxId

      protected int taxId
  • Constructor Details

    • MRMALine

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

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

      public MRMALine(Properties ctx, int M_RMALine_ID, String trxName, String... virtualColumns)
      Parameters:
      ctx -
      M_RMALine_ID -
      trxName -
      virtualColumns -
    • MRMALine

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

    • init

      protected void init()
      Initialise precision, unitAmount, originalQty and taxId
    • getParent

      public MRMA getParent()
      Get Parent
      Returns:
      parent
    • setM_InOutLine_ID

      public void setM_InOutLine_ID(int M_InOutLine_ID)
      Set M_InOutLine_ID
      Specified by:
      setM_InOutLine_ID in interface I_M_RMALine
      Overrides:
      setM_InOutLine_ID in class X_M_RMALine
      Parameters:
      M_InOutLine_ID -
    • getShipLine

      public MInOutLine getShipLine()
      Get Shipment Line
      Returns:
      shipment line
    • getInvoiceLineId

      protected int getInvoiceLineId()
      Retrieves the invoiceLine Id associated with the Shipment/Receipt Line
      Returns:
      Invoice Line ID
    • getUnitAmt

      public BigDecimal getUnitAmt()
      Get unit amount for product/charge
      Returns:
      Unit Amount
    • getTotalAmt

      public BigDecimal getTotalAmt()
      Get Total Amount for the line including tax
      Returns:
      total amount
    • isShipLineInvoiced

      public boolean isShipLineInvoiced()
      Get whether the Ship line has been invoiced
      Returns:
      true if invoiced
    • beforeSave

      protected boolean beforeSave(boolean newRecord)
      Description copied from class: PO
      Called before Save for Pre-Save Operation.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      beforeSave in class PO
      Parameters:
      newRecord - true if it is a new record
      Returns:
      true if record can be saved
    • checkQty

      public boolean checkQty()
      Validate that line quantity is <= MInOutLine quantity
      Returns:
      true if pass validation
    • updateOrderTax

      protected boolean updateOrderTax(boolean oldTax)
      Update RMA tax
      Parameters:
      oldTax - true if the old C_Tax_ID should be used
      Returns:
      true if success, false otherwise
    • afterSave

      protected boolean afterSave(boolean newRecord, boolean success)
      Description copied from class: PO
      Called after Save for Post-Save Operation.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      afterSave in class PO
      Parameters:
      newRecord - true if it is a new record
      success - true if save operation was success
      Returns:
      if save was a success
    • afterDelete

      protected boolean afterDelete(boolean success)
      Description copied from class: PO
      Execute after Delete operations.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      afterDelete in class PO
      Parameters:
      success - true if record deleted
      Returns:
      true if delete is a success
    • updateHeaderAmt

      public boolean updateHeaderAmt()
      Update Amount on Header
      Returns:
      true if header updated
    • addDescription

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

      public int getPrecision()
      Get precision. Based on Invoice if the shipment was invoiced, on Order otherwise.
    • getC_UOM_ID

      public int getC_UOM_ID()
      Get UOM
      Returns:
      C_UOM_ID
      - if shipment line exists, from shipment line
      - otherwise return 100 (Each) for charge line or product UOM for product line
    • getProduct

      public MProduct getProduct()
      Get Product
      Returns:
      product or null
    • getCharge

      public MCharge getCharge()
      Get Charge
      Returns:
      charge or null
    • getTax

      protected MTax getTax()
      Get Tax (immutable)
      Returns:
      tax
    • getC_Project_ID

      public int getC_Project_ID()
      Get Project
      Returns:
      If based on shipment line, return C_Project_ID from shipment line. Otherwise, return 0
    • getC_ProjectPhase_ID

      public int getC_ProjectPhase_ID()
      Get Project Phase
      Returns:
      If based on shipment line, return C_ProjectPhase_ID from shipment line. Otherwise, return 0
    • getC_ProjectTask_ID

      public int getC_ProjectTask_ID()
      Get Project Task
      Returns:
      If based on shipment line, return C_ProjectTask_ID from shipment line. Otherwise, return 0
    • getC_Activity_ID

      public int getC_Activity_ID()
      Get Activity
      Returns:
      If based on shipment line, return C_Activity_ID from shipment line. Otherwise, return 0
    • getC_Campaign_ID

      public int getC_Campaign_ID()
      Get Campaign
      Returns:
      If based on shipment line, return C_Campaign_ID from shipment line. Otherwise, return 0
    • getAD_OrgTrx_ID

      public int getAD_OrgTrx_ID()
      Get Org Trx
      Returns:
      If based on shipment line, return AD_OrgTrx_ID from shipment line. Otherwise, return 0
    • getUser1_ID

      public int getUser1_ID()
      Get User1
      Returns:
      If based on shipment line, return User1_ID from shipment line. Otherwise, return 0
    • getUser2_ID

      public int getUser2_ID()
      Get User2
      Returns:
      If based on shipment line, return User2_ID from shipment line. Otherwise, return 0
    • getM_AttributeSetInstance_ID

      public int getM_AttributeSetInstance_ID()
      Get Attribute Set Instance
      Returns:
      If based on shipment line, return M_AttributeSetInstance_ID from shipment line. Otherwise, return 0
    • getM_Locator_ID

      public int getM_Locator_ID()
      Get Locator
      Returns:
      M_Locator_ID
      - if based on shipment line, return M_Locator_ID from shipment line
      - otherwise, return 0 for charge line or default locator for product line
    • clearParent

      public void clearParent()
      Reset m_parent to null