Example #1
0
 private void ReloadData(string orderId)
 {
     try
     {
         soPayForm = icommodity.SOGetPayInfo(orderId);
     }
     catch
     {
         soPayForm = null;
     }
 }
Example #2
0
        public SOPayFormEntity SOGetPayInfo(string strSaleOrderID)
        {
            SOPayFormEntity soPayFormEntity = new SOPayFormEntity();
            SaleParent saleParent;
            List<SalePayment> salePaymentList;

            saleParent = this.SOGetParentInfoById(strSaleOrderID);
            salePaymentList = this.GetSalePayList(strSaleOrderID);

            //应付
            soPayFormEntity.AmountDuePay = saleParent.DuePay;
            //已付
            foreach (SalePayment salePayment in salePaymentList)
            {
                soPayFormEntity.AmountPaid += salePayment.PaymentAmount;
            }
            //本次支付
            soPayFormEntity.AmountPaying = soPayFormEntity.AmountDuePay - soPayFormEntity.AmountPaid;

            soPayFormEntity.SaleParent = saleParent;
            soPayFormEntity.PayList = salePaymentList;

            return soPayFormEntity;
        }