Beispiel #1
0
 /**
  *  Parent Constructor
  *	@param req requisition
  */
 public MRequisitionLine(MRequisition req)
     : this(req.GetCtx(), 0, req.Get_TrxName())
 {
     try
     {
         SetClientOrg(req);
         SetM_Requisition_ID(req.GetM_Requisition_ID());
         _M_PriceList_ID = req.GetM_PriceList_ID();
         _parent         = req;
     }
     catch
     {
     }
 }
Beispiel #2
0
 /**
  *  Get Parent
  *	@return parent
  */
 public MRequisition GetParent()
 {
     try
     {
         if (_parent == null)
         {
             _parent = new MRequisition(GetCtx(), GetM_Requisition_ID(), Get_TrxName());
         }
     }
     catch
     {
     }
     return(_parent);
 }
Beispiel #3
0
        /**
         *  Update Header
         *	@return header updated
         */
        private bool UpdateHeader()
        {
            log.Fine("");
            String sql = "UPDATE M_Requisition r"
                         + " SET TotalLines="
                         + "(SELECT COALESCE(SUM(LineNetAmt),0) FROM M_RequisitionLine rl "
                         + "WHERE r.M_Requisition_ID=rl.M_Requisition_ID) "
                         + "WHERE M_Requisition_ID=" + GetM_Requisition_ID();
            int no = Convert.ToInt32(DataBase.DB.ExecuteQuery(sql, null, Get_TrxName()));

            if (no != 1)
            {
                log.Log(Level.SEVERE, "Header update #" + no);
            }
            _parent = null;
            return(no == 1);
        }