/// <summary> /// /财务状态 /// </summary> /// <param name="status"></param> /// <returns></returns> protected bool GetFinStatus(EyouSoft.Model.EnumType.FinStructure.FinStatus status) { bool result = false; if (status != EyouSoft.Model.EnumType.FinStructure.FinStatus.账务待支付 && status != EyouSoft.Model.EnumType.FinStructure.FinStatus.账务已支付 && _isPlaner) { result = true; } return(result); }
/// <summary> /// 其它收入 /// </summary> /// <param name="status"></param> /// <returns></returns> protected bool GetOutFreeStatus(EyouSoft.Model.EnumType.FinStructure.FinStatus status) { bool result = true; if (IsSubmit == false || status == EyouSoft.Model.EnumType.FinStructure.FinStatus.账务待支付) { result = false; } return(result); }
/// <summary> /// 预付申请 销售确认 计调确认 /// </summary> /// <param name="RegisterId">登记id</param> /// <param name="tourID">团号</param> /// <param name="planID">计调id</param> /// <returns></returns> protected string PageSaveSellConfirm(EyouSoft.Model.EnumType.FinStructure.FinStatus status) { string setErorMsg = string.Empty; string msg = string.Empty; string tourID = Utils.GetQueryStringValue("tourId"); string planID = Utils.GetQueryStringValue("PlanId"); decimal prepaidPrices = Utils.GetDecimal(Utils.GetFormValue(this.txtPrepaidPrices.UniqueID)); DateTime?dtPayDate = Utils.GetDateTimeNullable(Utils.GetFormValue(this.txtPayDate.UniqueID)); if (prepaidPrices <= 0) { msg += "请输入预付金额!<br/>"; } if (dtPayDate == null) { msg += "请选择最晚付款日期!<br/>"; } if (!string.IsNullOrEmpty(msg)) { setErorMsg = "{\"result\":\"0\",\"msg\":\"" + msg + "\"}"; return(setErorMsg); } EyouSoft.Model.FinStructure.MRegister registerM = new EyouSoft.Model.FinStructure.MRegister(); registerM.CompanyId = this.SiteUserInfo.CompanyId; registerM.Deadline = Utils.GetDateTimeNullable(Utils.GetFormValue(this.txtPayDate.UniqueID)); //付款人 if (!string.IsNullOrEmpty(tourID)) { EyouSoft.Model.TourStructure.MTourBaseInfo tourInfo = new EyouSoft.BLL.TourStructure.BTour().GetTourInfo(tourID); if (tourInfo != null) { this.litTourCode.Text = tourInfo.TourCode; if (tourInfo.SaleInfo != null) { this.litSellers.Text = tourInfo.SaleInfo.Name; registerM.Dealer = tourInfo.SaleInfo.Name; registerM.DealerDeptId = tourInfo.SaleInfo.DeptId; registerM.DealerId = tourInfo.SaleInfo.SellerId; } } } registerM.IsPrepaid = true; registerM.IssueTime = System.DateTime.Now; registerM.PaymentAmount = Utils.GetDecimal(Utils.GetFormValue(this.txtPrepaidPrices.UniqueID)); registerM.PlanId = planID; registerM.Remark = Utils.GetFormValue(this.txtUseInterpret.UniqueID); registerM.TourId = tourID; registerM.OperatorId = this.SiteUserInfo.UserId; registerM.Operator = this.SiteUserInfo.Name; registerM.DeptId = this.SiteUserInfo.DeptId; registerM.Status = status; if (string.IsNullOrEmpty(Utils.GetQueryStringValue("ID"))) { var intRtn = new EyouSoft.BLL.FinStructure.BFinance().AddRegister(registerM); switch (intRtn) { case 0: AjaxResponse(UtilsCommons.AjaxReturnJson("0", "确认失败!")); break; case -1: AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "超额付款!")); break; default: AjaxResponse(UtilsCommons.AjaxReturnJson("1", "确认成功")); break; } } else { registerM.RegisterId = Utils.GetInt(Utils.GetQueryStringValue("ID")); var intRtn = new EyouSoft.BLL.FinStructure.BFinance().UpdRegister(registerM); switch (intRtn) { case 0: AjaxResponse(UtilsCommons.AjaxReturnJson("0", "确认失败!")); break; case -1: AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "超额付款!")); break; default: AjaxResponse(UtilsCommons.AjaxReturnJson("1", "确认成功")); break; } } return(setErorMsg); }