Example #1
0
 /// <summary>
 /// Parent Constructor.
 /// Also creates qtys if RfQ Qty
 /// Is saved if there are qtys(!)
 /// </summary>
 /// <param name="response">response</param>
 /// <param name="line">line</param>
 public MRfQResponseLine(MRfQResponse response, MRfQLine line)
     : base(response.GetCtx(), 0, response.Get_TrxName())
 {
     SetClientOrg(response);
     SetC_RfQResponse_ID(response.GetC_RfQResponse_ID());
     //
     SetC_RfQLine_ID(line.GetC_RfQLine_ID());
     //
     SetIsSelectedWinner(false);
     SetIsSelfService(false);
     //
     MRfQLineQty[] qtys = line.GetQtys();
     for (int i = 0; i < qtys.Length; i++)
     {
         if (qtys[i].IsActive() && qtys[i].IsRfQQty())
         {
             if (Get_ID() == 0)  //	save this line
             {
                 Save();
             }
             MRfQResponseLineQty qty = new MRfQResponseLineQty(this, qtys[i]);
             qty.Save();
         }
     }
 }
Example #2
0
        /// <summary>
        /// Is "Quote Total Amt Only" Valid
        /// </summary>
        /// <returns>null or error message</returns>
        public String CheckQuoteTotalAmtOnly()
        {
            if (!IsQuoteTotalAmtOnly())
            {
                return(null);
            }
            //	Need to check Line Qty
            MRfQLine[] lines = GetLines();
            for (int i = 0; i < lines.Length; i++)
            {
                MRfQLine      line = lines[i];
                MRfQLineQty[] qtys = line.GetQtys();
                if (qtys.Length > 1)
                {
                    log.Warning("isQuoteTotalAmtOnlyValid - #" + qtys.Length + " - " + line);

                    String msg = "@Line@ " + line.GetLine()
                                 + ": #@C_RfQLineQty@=" + qtys.Length + " - @IsQuoteTotalAmt@";
                    return(msg);
                }
            }
            return(null);
        }