Esempio n. 1
0
 /**
  *  Set Price
  */
 public void SetPrice()
 {
     try
     {
         if (GetC_Charge_ID() != 0)
         {
             MCharge charge = MCharge.Get(GetCtx(), GetC_Charge_ID());
             SetPriceActual(charge.GetChargeAmt());
         }
         if (GetM_Product_ID() == 0)
         {
             return;
         }
         if (_M_PriceList_ID == 0)
         {
             _M_PriceList_ID = GetParent().GetM_PriceList_ID();
         }
         if (_M_PriceList_ID == 0)
         {
             log.Log(Level.SEVERE, "PriceList unknown!");
             return;
         }
         SetPrice(_M_PriceList_ID);
     }
     catch (Exception e)
     {
         log.Severe("SetPrice" + e.Message);
     }
 }
        /**
         *  Set Charge - Callout
         *	@param oldC_Charge_ID old value
         *	@param newC_Charge_ID new value
         *	@param windowNo window
         *	@throws Exception
         */
        //@UICallout
        public void SetC_Charge_ID(String oldC_Charge_ID,
                                   String newC_Charge_ID, int windowNo)
        {
            if (newC_Charge_ID == null || newC_Charge_ID.Length == 0)
            {
                return;
            }
            int C_Charge_ID = int.Parse(newC_Charge_ID);

            base.SetC_Charge_ID(C_Charge_ID);

            MCharge charge = MCharge.Get(GetCtx(), C_Charge_ID);

            SetPriceEntered(charge.GetChargeAmt());
            SetTax(windowNo, "C_Charge_ID");
        }       //	setC_Charge_ID