Beispiel #1
0
 protected void BeforeLoan(CostReportInfo model)
 {
     if (model.IsSystem)
     {
         model.State = (int)CostReportState.AlreadyAuditing;//状态:待付款
     }
     else
     {
         //查询没有付款的票据
         var isPayList = CostReportBillInfoList.Where(p => !p.IsPay);
         if (isPayList.Any())                               //有没有付款的票据
         {
             model.State = (int)CostReportState.NoAuditing; //状态:票据待受理
         }
         else
         {
             if (model.IsLastTime)
             {
                 if (CostReportTravelInfoList.Any() || CostReportTerminiInfoList.Any() || !string.IsNullOrEmpty(model.GoodsCode) || !model.InvoiceId.Equals(Guid.Empty))
                 {
                     model.State = (int)CostReportState.NoAuditing;//状态:票据待受理
                 }
                 else
                 {
                     model.State = (int)CostReportState.AlreadyAuditing;//状态:待付款
                 }
             }
             else
             {
                 model.State = (int)CostReportState.AlreadyAuditing;//状态:待付款
             }
         }
     }
     model.Memo = WebControl.RetrunUserAndTime("[【审核】:审核通过;审核说明:" + (string.IsNullOrEmpty(txt_AuditingMemo.Text) ? "暂无说明" : txt_AuditingMemo.Text) + ";]");
 }
 protected void BeforeLoan(CostReportInfo model)
 {
     if (model.IsSystem)
     {
         model.State = (int)CostReportState.AlreadyAuditing;//状态:待付款
     }
     else
     {
         //获取票据
         CostReportBillInfoList = _costReportBill.Getlmshop_CostReportBillByReportId(model.ReportId);
         //查询没有付款的票据
         var isPayList = CostReportBillInfoList.Where(p => !p.IsPay);
         if (isPayList.Any())                               //有没有付款的票据
         {
             model.State = (int)CostReportState.NoAuditing; //状态:票据待受理
         }
         else
         {
             if (model.IsLastTime)
             {
                 //获取差旅费
                 CostReportTravelInfoList = _costReportTravel.GetlmShop_CostReportTravelByReportId(model.ReportId);
                 //获取起讫
                 CostReportTerminiInfoList = _costReportTermini.GetmShop_CostReportTerminiByReportId(model.ReportId);
                 if (CostReportTravelInfoList.Any() || CostReportTerminiInfoList.Any() || !string.IsNullOrEmpty(model.GoodsCode) || !model.InvoiceId.Equals(Guid.Empty))
                 {
                     model.State = (int)CostReportState.NoAuditing;//状态:票据待受理
                 }
                 else
                 {
                     model.State = (int)CostReportState.AlreadyAuditing;//状态:待付款
                 }
             }
             else
             {
                 model.State = (int)CostReportState.AlreadyAuditing;//状态:待付款
             }
         }
     }
     model.Memo = ERP.UI.Web.Common.WebControl.RetrunUserAndTime("[【审核】:审核通过;]");
 }