/// <summary> /// 导游借款 /// </summary> /// <param name="tourId">团队编号</param> private void Debit(string tourId) { IList <MDebit> ls = new EyouSoft.BLL.FinStructure.BFinance().GetDebitLstByTourId(tourId, true); if (ls != null && ls.Count > 0) { pan_DebitMsg.Visible = false; this.rpt_Debit.DataSource = ls; this.rpt_Debit.DataBind(); } }
/// <summary> /// 利润分配 /// </summary> /// <param name="tourId">团队编号</param> private void MoneyDistribute(string tourId) { IList <EyouSoft.Model.FinStructure.MProfitDistribute> ls = new EyouSoft.BLL.FinStructure.BFinance().GetProfitDistribute(tourId); if (ls != null && ls.Count > 0) { pan_mongyAllotMsg.Visible = false; rpt_mongyAllot.DataSource = ls; rpt_mongyAllot.DataBind(); //团队订单分配利润 ls = ls.Where(item => item.OrderId != null && item.OrderId.Length > 0).ToList(); if (ls != null && ls.Count > 0) { DisOrderProfit.Value = ls.Sum(item => item.Amount).ToString(); } ls = ls.Where(item => item.OrderId == null || item.OrderId.Length <= 0).ToList(); if (ls != null && ls.Count > 0) { DisTourProfit.Value = ls.Sum(item => item.Amount).ToString(); } } }
protected void InitPage(string tourId) { //核算单 MTourBaseInfo model = new BTour().GetTourInfo(tourId); if (model != null) { this.lbRouteName.Text = model.RouteName; this.lbTourCode.Text = model.TourCode; this.lbLDate.Text = model.LDate.HasValue ? model.LDate.Value.ToString("yyyy-MM-dd") : ""; this.lbTourDays.Text = model.TourDays.ToString(); this.lbPersonNum.Text = string.Format("<b class=fontblue>{0}</b><sup class=fontred>+{1}</sup>", model.Adults, model.Childs); this.lbSeller.Text = model.SaleInfo.Name; if (model.GuideList != null && model.GuideList.Count > 0) { this.lbGuid.Text = UtilsCommons.PingGuide(model.GuideList); } if (model.TourPlaner != null && model.TourPlaner.Count > 0) { this.lbTourPlaner.Text = UtilsCommons.PingPlaner(model.TourPlaner); } } //团款收入 EyouSoft.Model.TourStructure.MOrderSum orders = new EyouSoft.Model.TourStructure.MOrderSum(); IList <EyouSoft.Model.TourStructure.MTourOrder> tourOrder = new EyouSoft.BLL.TourStructure.BTourOrder().GetTourOrderListById(ref orders, tourId); if (tourOrder != null && tourOrder.Count > 0) { this.rpt_tuankuan.DataSource = tourOrder; this.rpt_tuankuan.DataBind(); this.lbConfirmMoneyCount.Text = UtilsCommons.GetMoneyString(orders.ConfirmMoney, ProviderToMoney); this.lbSettlementMoneyCount.Text = UtilsCommons.GetMoneyString(orders.ConfirmSettlementMoney, ProviderToMoney); this.lbGuideIncomeCount.Text = UtilsCommons.GetMoneyString(orders.GuideRealIncome, ProviderToMoney); this.lbCheckMoneyCount.Text = UtilsCommons.GetMoneyString(orders.ConfirmMoney - orders.GuideRealIncome, ProviderToMoney); this.lbProfitCount.Text = UtilsCommons.GetMoneyString(orders.Profit, ProviderToMoney); } else { this.ph_tuankuan.Visible = false; } //其他收入 IList <MOtherFeeInOut> otherList = new EyouSoft.BLL.PlanStructure.BPlan().GetOtherIncome(tourId); if (otherList != null && otherList.Count > 0) { this.rpt_qita.DataSource = otherList; this.rpt_qita.DataBind(); } else { this.ph_qita.Visible = false; } //团队支出 IList <EyouSoft.Model.PlanStructure.MPlanBaseInfo> payList = new EyouSoft.BLL.PlanStructure.BPlan().GetList(tourId); if (payList != null && payList.Count > 0) { this.rpt_zhichu.DataSource = payList; this.rpt_zhichu.DataBind(); int Count = 0; decimal TotalMoney = 0; foreach (var item in payList) { Count += item.Num; TotalMoney += item.Confirmation; } //this.lbNumCount.Text = Count.ToString(); this.lbSettlementMoney.Text = UtilsCommons.GetMoneyString(TotalMoney, ProviderToMoney); } else { this.ph_zhichu.Visible = false; } //利润分配 IList <MProfitDistribute> profitList = new EyouSoft.BLL.FinStructure.BFinance().GetProfitDistribute(tourId); if (profitList != null && profitList.Count > 0) { this.rpt_lirun.DataSource = profitList; this.rpt_lirun.DataBind(); } else { this.ph_lirun.Visible = false; } //报帐汇总 MBZHZ BZmodel = new EyouSoft.BLL.PlanStructure.BPlan().GetBZHZ(tourId); if (model != null) { this.lb_guidesIncome.Text = UtilsCommons.GetMoneyString(BZmodel.GuideIncome, ProviderToMoney); this.lb_guidesBorrower.Text = UtilsCommons.GetMoneyString(BZmodel.GuideBorrow, ProviderToMoney); this.lb_guidesSpending.Text = UtilsCommons.GetMoneyString(BZmodel.GuideOutlay, ProviderToMoney); this.lb_replacementOrReturn.Text = UtilsCommons.GetMoneyString(BZmodel.GuideMoneyRtn, ProviderToMoney); this.lb_RCSN.Text = BZmodel.GuideRelSign.ToString(); this.lb_HUSN.Text = BZmodel.GuideUsed.ToString(); this.lb_RSN.Text = BZmodel.GuideSignRtn.ToString(); } //团队汇总信息 EyouSoft.Model.PlanStructure.MTourTotalInOut tourModel = new EyouSoft.BLL.PlanStructure.BPlan().GetTourTotalInOut(tourId); /*团队收入*/ this.lb_tourMoneyIn.Text = UtilsCommons.GetMoneyString(tourModel.TourIncome + tourModel.QiTaShouRu, ProviderToMoney); /*团队支出*/ this.lb_tourMoneyOut.Text = UtilsCommons.GetMoneyString(tourModel.TourOutlay, ProviderToMoney); /*团队利润*/ this.lb_tourMoney.Text = UtilsCommons.GetMoneyString(tourModel.TourProfit, ProviderToMoney); /*团队利润率*/ this.lb_tourMoneyRate.Text = tourModel.TourProRate.ToString("F2") + "%"; }