public FEE_SETTING_UPFRONT_CHANNEL NewChannel() { FEE_SETTING_UPFRONT_CHANNEL NewData = new FEE_SETTING_UPFRONT_CHANNEL(); NewData.FUF_ID = this.FUF_ID; NewData.OfUpFront = this; NewData.DataStatus = EnumDataStatus.NewData; this.Channels.Add(NewData); return(NewData); }
/// <summary> /// คำนวนค่า fee up front /// </summary> /// <returns></returns> public decimal CalculateFee() { var setting = this.OfMarketingFee.OnDateAgentFee.SettingOwner; if (setting != null) { FEE_SETTING_UPFRONT_CHANNEL settingUpFront = setting.GetUpFrontSettingByCondition(this.OfMarketingFee.FEE_DATE, this.CHANNEL); if (settingUpFront != null) { this.RATE_USED = settingUpFront.RateMktCalculated; this.FEE = ((decimal)(this.TOTAL_MONEY * this.RATE_USED)).WithoutRounding(); } else { // ไม่เจอการตั้งค่า ไม่มีค่า fee this.FEE = 0; } } return(this.FEE); }