예제 #1
0
파일: TradeRole.cs 프로젝트: 842549829/Pool
        /// <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);
        }
예제 #2
0
        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);
        }