/// <summary> /// 生成退款账单 /// </summary> internal PostponeRefundRoleBill MakeRefundBill(PostponePayRoleBill payBill) { var bill = new PostponeRefundRoleBill(this) { PayRoleBill = payBill, Source = new PostponeRefundRoleBillSource { Details = payBill.Source.Details.Select(makeRefundDetailBill).ToList() } }; return(bill); }
private decimal getPremiumProfit(IEnumerable <PostponeRefundRoleBill> tradeRoleBills, PostponeRefundRoleBill deductionBill) { decimal tradeRoleBalance = 0; if (tradeRoleBills != null) { var userRoleBalance = tradeRoleBills.Sum(item => item.Source.Anticipation); var platformDeduction = deductionBill == null ? 0 : deductionBill.Source.Anticipation; tradeRoleBalance = userRoleBalance + platformDeduction; } return(tradeRoleBalance * -1); }