Esempio n. 1
0
 private static void calcMoney(Customer customerInfo, TransactionLog localItem)
 {
     if (localItem.isValid != 1) return;
     if (customerInfo.IsFengDing && null == customerInfo.fengding) throw new Exception("封顶机没配置封顶金额");
     decimal tixianfei = customerInfo.tixianfei.Value;
     if (true) tixianfei += customerInfo.tixianfeiEles.Value;//节假日多收手续费
     localItem.discountMoney = Math.Round(localItem.tradeMoney.Value * customerInfo.discount.Value * 0.01m, 2);
     if (!customerInfo.IsFengDing || localItem.discountMoney < customerInfo.fengding)
     {
         //pos ji
         localItem.discountMoney = Math.Round(localItem.tradeMoney.Value * customerInfo.discount.Value * 0.01m, 2);
         decimal totalSxf = Math.Round(localItem.tradeMoney.Value * (customerInfo.discount.Value + tixianfei) * 0.01m, 2);
         //t0
         localItem.tixianfeiMoney = totalSxf - localItem.discountMoney.Value;
     }
     else
     {
         //feng ding
         localItem.discountMoney = customerInfo.fengding;
         localItem.tixianfeiMoney = Math.Round(localItem.tradeMoney.Value * tixianfei * 0.01m, 2);
     }
     //代付手续费
     if (customerInfo.daifufei != null && customerInfo.daifufei.Value > 0)
     {
         localItem.tixianfeiMoney += customerInfo.daifufei.Value;
     }
     localItem.finallyMoney = localItem.tradeMoney.Value - localItem.discountMoney.Value - localItem.tixianfeiMoney.Value;
 }
Esempio n. 2
0
 public void AddCustomer(Customer addThis)
 {
     Customers.Add(Customers.Count, addThis.Clone());
 }
Esempio n. 3
0
 public Customer Clone()
 {
     Customer tmp = new Customer(this.Name, this.CustomerId, this.Modules);
     return tmp;
 }