Ejemplo n.º 1
0
 /**
  * Set Line Net Amt Difference
  *
  * @param diff difference (to be subtracted)
  */
 public void setLineNetAmtDifference(BigDecimal diff) {
   String msg = "Diff=" + diff + " - LineNetAmt=" + m_LineNetAmt;
   m_LineNetAmt = m_LineNetAmt.subtract(diff);
   m_DiscountAmt = m_ListAmt.subtract(m_LineNetAmt);
   setAmount(m_ListAmt, m_DiscountAmt);
   msg += " -> " + m_LineNetAmt;
   log.fine(msg);
 } //	setLineNetAmtDifference
Ejemplo n.º 2
0
  /**
   * Set Product Amounts
   *
   * @param LineNetAmt Line Net Amt
   * @param PriceList Price List
   * @param Qty Qty for discount calc
   */
  public void setAmount(BigDecimal LineNetAmt, BigDecimal PriceList, BigDecimal Qty) {
    m_LineNetAmt = LineNetAmt == null ? Env.ZERO : LineNetAmt;

    if (PriceList != null && Qty != null) m_ListAmt = PriceList.multiply(Qty);
    if (m_ListAmt.compareTo(Env.ZERO) == 0) m_ListAmt = m_LineNetAmt;
    m_DiscountAmt = m_ListAmt.subtract(m_LineNetAmt);
    //
    setAmount(m_ListAmt, m_DiscountAmt);
    //	Log.trace(this,Log.l6_Database, "DocLine_Invoice.setAmount",
    //		"LineNet=" + m_LineNetAmt + ", List=" + m_ListAmt + ", Discount=" + m_DiscountAmt
    //		+ " => Amount=" + getAmount());
  } //  setAmounts