public void BillPaymentAddAsyncTestsUsingoAuth(ServiceContext qboContextoAuth)
        {
            //Creating the BillPayment for Add
            BillPayment entity = QBOHelper.CreateBillPaymentCheck(qboContextoAuth);

            BillPayment added = Helper.AddAsync <BillPayment>(qboContextoAuth, entity);
        }
예제 #2
0
        public int Payment(VendorBillPaymentModel vendorBillPaymentModel)
        {
            int Id = 0;

            _serverContext.Database.BeginTransaction();
            try
            {
                BillPayment billPayment = new BillPayment();
                billPayment.SubsidiaryLedgerAccountId = vendorBillPaymentModel.VendorId;
                billPayment.BillPaymentAmount         = vendorBillPaymentModel.BillAmount;
                billPayment.BillPaymentDate           = vendorBillPaymentModel.PaymentDate;
                billPayment.BillPaymentCreatedDate    = DateTime.Now;
                billPayment.ChartOfAccountId          = vendorBillPaymentModel.ChartOfAccountId;
                _serverContext.BillPayments.Add(billPayment);
                _serverContext.SaveChanges();
                Id = billPayment.Id;
                foreach (VendorBillPostPaymentItemModel item in vendorBillPaymentModel.Items)
                {
                    BillPaymentDetail billPaymentDetail = new BillPaymentDetail();
                    billPaymentDetail.BillPaymentId           = Id;
                    billPaymentDetail.BillPaymentDetailAmount = item.AmountPaid;
                    billPaymentDetail.PurchaseId = item.Id;
                    _serverContext.BillPaymentDetails.Add(billPaymentDetail);
                    _serverContext.SaveChanges();
                }
                _serverContext.Database.CommitTransaction();
            }
            catch (Exception ex)
            {
                _serverContext.Database.RollbackTransaction();
            }
            return(Id);
        }
예제 #3
0
        private static bool ValidatorBillPaymentMessage(BillPayment billPayment)
        {
            List <ValidationItem> inputs = new List <ValidationItem>();

            inputs.Add(new ValidationItem(billPayment.Customer.CPF, "CPF"));
            inputs.Add(new ValidationItem(billPayment.Customer.Name, "Nome"));

            /*inputs.Add(new ValidationItem(billPayment.Customer.RG, "RG"));
             * inputs.Add(new ValidationItem(billPayment.Customer.Gender, "Sexo"));
             * inputs.Add(new ValidationItem(billPayment.Customer.Birthday.ToString(), "Data de Nascimento"));
             * inputs.Add(new ValidationItem(billPayment.Customer.CellPhone, "Celular"));
             * inputs.Add(new ValidationItem(billPayment.Customer.Phone, "Telefone"));
             *
             * inputs.Add(new ValidationItem(billPayment.Customer.Address.Street, "Rua"));
             * inputs.Add(new ValidationItem(billPayment.Customer.Address.Number, "Numero"));
             * inputs.Add(new ValidationItem(billPayment.Customer.Address.Complement, "Complemento"));
             * inputs.Add(new ValidationItem(billPayment.Customer.Address.District, "Bairro"));
             * inputs.Add(new ValidationItem(billPayment.Customer.Address.City, "Cidade"));
             * inputs.Add(new ValidationItem(billPayment.Customer.Address.State, "Estado"));*/

            inputs.Add(new ValidationItem(billPayment.PaymentDate.ToString(), "Data de Pagamento"));

            Validations val = new Validations();

            return(val.ValidationCheck(inputs));
        }
예제 #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="billPayment"></param>
        /// <param name="updatedBillData"></param>
        /// <returns></returns>
        private BillStatusResponse PayAtTableBillPaymentReceived(BillPayment billPayment, string updatedBillData)
        {
            if (!billsStore.ContainsKey(billPayment.BillId))
            {
                // We cannot find this bill.
                return(new BillStatusResponse {
                    Result = BillRetrievalResult.INVALID_BILL_ID
                });
            }

            Console.WriteLine($"# Got a {billPayment.PaymentType} Payment against bill {billPayment.BillId} for table {billPayment.TableId}");
            var bill = billsStore[billPayment.BillId];

            bill.OutstandingAmount -= billPayment.PurchaseAmount;
            bill.TippedAmount      += billPayment.TipAmount;
            bill.SurchargeAmount   += billPayment.SurchargeAmount;
            bill.Locked             = bill.OutstandingAmount == 0 ? false : true;

            Console.WriteLine($"Updated Bill: {bill}");
            Console.Write($"> ");

            // Here you can access other data that you might want to store from this payment, for example the merchant receipt.
            // billPayment.PurchaseResponse.GetMerchantReceipt();

            // It is important that we persist this data on behalf of assembly.
            assemblyBillDataStore[billPayment.BillId] = updatedBillData;

            return(new BillStatusResponse
            {
                Result = BillRetrievalResult.SUCCESS,
                OutstandingAmount = bill.OutstandingAmount,
                TotalAmount = bill.TotalAmount
            });
        }
예제 #5
0
        public IActionResult OnGet(int?id)
        {
            if (id != null)
            {
                bill = _context.BillPayment.FirstOrDefault(b => b.BillId == id);
                transactionHistories.Amount = (decimal)bill.Amount;
                transactionHistories.SavingAccountNumber = bill.BillId;
                bill.Status = "PAID";
                _context.BillPayment.Update(bill);
            }

            if (checkingacct != null)
            {
                checkingacct.Balance -= transactionHistories.Amount;
                _context.CheckingAccounts.Update(checkingacct);
                transactionHistories.CheckingAccountNumber = checkingacct.CheckingAccountNumber;
            }

            transactionHistories.TransactionFee    = 0;
            transactionHistories.TransactionTypeId = 102;

            _context.TransactionHistories.Add(transactionHistories);

            _context.SaveChanges();

            return(Page());
        }
예제 #6
0
        public ActionResult EditPayment(int id, string[] payeeId, string[] sharedPercent, [Bind(Include = "Amount,DatePaid,Payee")] BillPayment billPayment)
        {
            ViewBag.Action = "Edit Payment";
            BillPayment bp = GetBillPayment(id);

            if (bp == null || bp.User.Id != user.Id)
            {
                return(HttpNotFound());
            }
            if (ModelState.IsValid)
            {
                bp.Amount   = billPayment.Amount;
                bp.DatePaid = billPayment.DatePaid;
                bp.Payee    = billPayment.Payee;

                db.Entry(bp).State = EntityState.Modified;
                db.SaveChanges();
                UpdateBillPaymentShared(bp, payeeId, sharedPercent);
                db.SaveChanges();
                return(RedirectToAction("Details", new { id = bp.Bill.ID }));
            }
            ViewBag.Users            = GetAvailableUsers(billPayment.Bill);
            ViewBag.SharedPercentage = Enum.GetValues(typeof(SharedPercentage));
            return(View("Payment", billPayment));
        }
        /// <summary>
        /// Workflow to create Vendor, Bill, VendorCredit, BillPayment
        /// </summary>
        public async Task <ActionResult> BillingWorkflow()
        {
            //Make QBO api calls using .Net SDK
            if (Session["realmId"] != null)
            {
                string realmId = Session["realmId"].ToString();

                try
                {
                    //Initialize OAuth2RequestValidator and ServiceContext
                    ServiceContext serviceContext = base.IntializeContext(realmId);


                    //Create a Vendor
                    Vendor vendor = CreateVendor(serviceContext);
                    //Add Bill for this Vendor
                    Bill bill = CreateBill(serviceContext, vendor);
                    //Add BillPayment for this Vendor
                    BillPayment billPayment = CreateBillPaymentCreditCard(serviceContext, vendor, bill);
                    //Create & Apply Vendor Credit
                    VendorCredit vendorCredit = CreateVendorCredit(serviceContext, vendor);

                    return(View("Index", (object)("QBO API calls Success!")));
                }
                catch (Exception ex)
                {
                    return(View("Index", (object)"QBO API calls Failed!"));
                }
            }
            else
            {
                return(View("Index", (object)"QBO API call Failed!"));
            }
        }
예제 #8
0
        public JsonResult SaveEvent(BillPayment e)
        {
            var status = false;

            using (BillCalendarDatabaseEntities dc = new BillCalendarDatabaseEntities())
            {
                if (e.PaymentId > 0)
                {
                    // Update the event
                    var v = dc.BillPayments.Where(a => a.PaymentId == e.PaymentId).FirstOrDefault();
                    if (v != null)
                    {
                        v.PayeeName     = e.PayeeName;
                        v.PaymentAmount = e.PaymentAmount;
                        v.DueDate       = e.DueDate;
                        v.PaidDate      = e.PaidDate;
                        v.Description   = e.Description;
                        v.Paid          = e.Paid;
                        v.ThemeColor    = e.ThemeColor;
                        v.username      = e.username;
                    }
                }
                else
                {
                    dc.BillPayments.Add(e);
                }

                dc.SaveChanges();
                status = true;
            }
            return(new JsonResult {
                Data = new { status = status }
            });
        }
        public async Task <IActionResult> BillPaymentEdit(int id, [FromBody] BillPayment billPayment)
        {
            if (id != billPayment.Id)
            {
                Console.WriteLine("Không đúng định dạng");
                return(BadRequest());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(billPayment);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!BillPaymentExists(billPayment.Id))
                    {
                        Console.WriteLine("Id không tồn tại");
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
            }
            return(Ok(billPayment));
        }
예제 #10
0
        public async Task <IActionResult> PutBillPayment(int id, BillPayment billPayment)
        {
            if (id != billPayment.Id)
            {
                return(BadRequest());
            }

            _context.Entry(billPayment).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!BillPaymentExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
예제 #11
0
        private BillPayment getBillPayment()
        {
            var segments = extractSegment(ppay.BillPaymentTag);
            if (!segments.Any())
            {
                return null;
            }

            var result = new BillPayment();
            foreach (var item in segments)
            {
                switch (item.Id)
                {
                    case ppay.AIDTag:
                        result.CrossBorderMerchantQR = item.Value == ppay.DomesticMerchant;
                        break;
                    case ppay.BillderIdTag:
                        const int SuffixLength = 2;
                        result.BillerId = item.Value.Substring(0, item.Value.Length - SuffixLength);
                        result.Suffix = item.Value.Substring(item.Value.Length - SuffixLength);
                        break;
                    case ppay.Reference1Tag:
                        result.Reference1 = item.Value;
                        break;
                    case ppay.Reference2Tag:
                        result.Reference2 = item.Value;
                        break;
                    default: break;
                }
            }
            return result;
        }
 public void BillPaymentCreditCardAddTestUsingoAuth(ServiceContext qboContextoAuth)
 {
     //Creating the BillPayment for Add
     BillPayment billPayment = QBOHelper.CreateBillPaymentCreditCard(qboContextoAuth);
     //Adding the BillPayment
     BillPayment added = Helper.Add <BillPayment>(qboContextoAuth, billPayment);
 }
        public int LastInsertedBillNo()
        {
            SqlConnection connection = new SqlConnection(connectionDB);

            string query = "select top 1 BillNo from PatientBillPayment order by BillNo desc";

            SqlCommand command = new SqlCommand(query, connection);

            connection.Open();

            SqlDataReader reader = command.ExecuteReader();

            int lastnsertedBillNo = 0;

            while (reader.Read())
            {
                BillPayment billPayment = new BillPayment();
                billPayment.BillNo = int.Parse(reader["BillNo"].ToString());
                lastnsertedBillNo  = billPayment.BillNo;
            }
            reader.Close();
            connection.Close();

            return(lastnsertedBillNo);
        }
        public BillPayment GetRequestBillInfoByBillNo(int billNo)
        {
            SqlConnection connection = new SqlConnection(connectionDB);

            string query = "select * from PatientBillPayment where BillNo = '" + billNo + "'";

            SqlCommand command = new SqlCommand(query, connection);

            connection.Open();

            SqlDataReader reader = command.ExecuteReader();

            BillPayment billPayment = null;

            while (reader.Read())
            {
                billPayment             = new BillPayment();
                billPayment.TestDate    = Convert.ToDateTime(reader["BillDate"].ToString());
                billPayment.TotalAmount = Convert.ToDouble(reader["TotalAmount"].ToString());
                billPayment.PaidAmount  = Convert.ToDouble(reader["PaidAmount"].ToString());
                billPayment.DueAmount   = Convert.ToDouble(reader["DueAmount"].ToString());
            }

            reader.Close();
            connection.Close();

            return(billPayment);
        }
예제 #15
0
        private void SaveBillAmount()
        {
            BillPayment billPayment = new BillPayment();

            billPayment.TotalAmount   = Convert.ToDouble(totallTextBox.Text);
            billPayment.ContactNumber = mobileNoTextBox.Text;
            billPaymentManager.SaveTotalBill(billPayment);
        }
 public void BillPaymentFindbyIdTestUsingoAuth(ServiceContext qboContextoAuth)
 {
     //Creating the BillPayment for Adding
     BillPayment billPayment = QBOHelper.CreateBillPaymentCheck(qboContextoAuth);
     //Adding the BillPayment
     BillPayment added = Helper.Add <BillPayment>(qboContextoAuth, billPayment);
     BillPayment found = Helper.FindById <BillPayment>(qboContextoAuth, added);
 }
        // will delete bill payment when a bill is deleted
        private void DeleteBillPayment(int BillHeaderId)
        {
            BillPayment Payment = _db.BillPayment.FirstOrDefault(p => p.BillHeaderId == BillHeaderId);

            if (Payment != null)
            {
                _db.BillPayment.Remove(Payment);
            }
        }
예제 #18
0
        public void AddBillPaymentTest_BillPaymentCheck()
        {
            //Creating the BillPayment for Add

            BillPayment billPaymentToAdd = DataServiceTestHelper.CreateBillPayment_CheckPayment();
            BillPayment billPaymentAdded = dataServiceTestCases.AddEntity(billPaymentToAdd) as BillPayment;

            DataServiceTestHelper.VerifyBillPayment_BillPaymentCheck(billPaymentAdded, billPaymentAdded);
        }
예제 #19
0
        [TestMethod][Ignore]   //IgnoreReason: Not Supported
        public void BillPaymentVoidAsyncTestsUsingoAuth()
        {
            //Creating the BillPayment for Adding
            BillPayment entity = QBOHelper.CreateBillPaymentCheck(qboContextoAuth);
            //Adding the BillPayment
            BillPayment added = Helper.Add <BillPayment>(qboContextoAuth, entity);

            Helper.VoidAsync <BillPayment>(qboContextoAuth, added);
        }
예제 #20
0
        public void BillPaymentAddAsyncTestsUsingoAuth()
        {
            //Creating the BillPayment for Add
            BillPayment entity = QBOHelper.CreateBillPaymentCheck(qboContextoAuth);

            BillPayment added = Helper.AddAsync <BillPayment>(qboContextoAuth, entity);

            QBOHelper.VerifyBillPayment(entity, added);
        }
예제 #21
0
        [TestMethod] //[Ignore]  //IgnoreReason: Not Supported
        public void BillPaymentQueryUsingoAuth()
        {
            QueryService <BillPayment> entityQuery = new QueryService <BillPayment>(qboContextoAuth);
            BillPayment existing = Helper.FindOrAdd <BillPayment>(qboContextoAuth, new BillPayment());
            //List<BillPayment> entities = entityQuery.Where(c => c.Id == existing.Id).ToList();
            List <BillPayment> entities = entityQuery.ExecuteIdsQuery("SELECT * FROM BillPayment where Id='" + existing.Id + "'").ToList <BillPayment>();

            Assert.IsTrue(entities.Count() > 0);
        }
예제 #22
0
        public void BillPaymentCreditCardkAddTestUsingoAuth()
        {
            //Creating the BillPayment for Add
            BillPayment billPayment = QBOHelper.CreateBillPaymentCreditCard(qboContextoAuth);
            //Adding the BillPayment
            BillPayment added = Helper.Add <BillPayment>(qboContextoAuth, billPayment);

            //Verify the added BillPayment
            QBOHelper.VerifyBillPayment(billPayment, added);
        }
        public void BillPaymentFindByIdAsyncTestsUsingoAuth(ServiceContext qboContextoAuth)
        {
            //Creating the BillPayment for Adding
            BillPayment entity = QBOHelper.CreateBillPaymentCheck(qboContextoAuth);
            //Adding the BillPayment
            BillPayment added = Helper.Add <BillPayment>(qboContextoAuth, entity);

            //FindById and verify
            Helper.FindByIdAsync <BillPayment>(qboContextoAuth, added);
        }
예제 #24
0
        protected BillPayment GetBillPayment(int?id)
        {
            BillPayment billPayment = db.BillPayments.Find(id);

            if (billPayment == null || billPayment.User.Id != user.Id)
            {
                return(null);
            }
            billPayment.Bill = billPayment.Bill.Populate(billPayment.User);
            return(billPayment);
        }
 public void BillPaymentUpdateTestUsingoAuth(ServiceContext qboContextoAuth)
 {
     //Creating the BillPayment for Adding
     BillPayment billPayment = QBOHelper.CreateBillPaymentCheck(qboContextoAuth);
     //Adding the BillPayment
     BillPayment added = Helper.Add <BillPayment>(qboContextoAuth, billPayment);
     //Change the data of added entity
     BillPayment changed = QBOHelper.UpdateBillPayment(qboContextoAuth, added);
     //Update the returned entity data
     BillPayment updated = Helper.Update <BillPayment>(qboContextoAuth, changed);//Verify the updated BillPayment
 }
예제 #26
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        BillTotal();

        using (DataClassesDataContext dc = new DataClassesDataContext())
        {
            BillPayment bp = new BillPayment();
            // check which site it is coming from
            // get IP Address
            string ipAddress = GetIPAddress();
            //string ipAddress = GetLocalIPAddress();

            // set site venue
            string site = SetVenue(ipAddress);

            if (site.Equals("Check IP Address"))
            {
                alert.DisplayMessage("Check IP Address. Please contact administrator.");
                return;
            }

            bp.Site           = site;
            bp.MemberNo       = Int32.Parse(txtMemberNo.Text);
            bp.FirstName      = txtFirstName.Text;
            bp.LastName       = txtLastName.Text;
            bp.Biller         = txtBiller.Text;
            bp.ConfirmationId = txtConfirmationId.Text;
            bp.Cash           = cash;
            bp.EFTPOS         = eftpos;
            bp.Cheques        = cheques;
            bp.Points         = points;
            bp.Miscellaneous1 = misc1;
            bp.Miscellaneous2 = misc2;
            bp.TotalAmount    = totalAmount;
            bp.StaffId        = Int32.Parse(UserCredentials.StaffId);
            bp.Username       = UserCredentials.Username;
            bp.StaffName      = UserCredentials.DisplayName;
            DateTime currentDate = DateTime.Now, tradingDate = DateTime.Now;
            bp.EnteredDate = currentDate;

            if (currentDate.Hour == 0 || currentDate.Hour == 1 || currentDate.Hour == 2 || currentDate.Hour == 3 ||
                currentDate.Hour == 4 || currentDate.Hour == 5)
            {
                tradingDate = DateTime.Now.AddDays(-1);
            }
            bp.TradingDate = tradingDate;
            dc.BillPayments.InsertOnSubmit(bp);
            dc.SubmitChanges();
        }

        this.BindGrid();
        ResetFields();
    }
        public void BillPaymentUpdatedAsyncTestsUsingoAuth(ServiceContext qboContextoAuth)
        {
            //Creating the BillPayment for Adding
            BillPayment entity = QBOHelper.CreateBillPaymentCheck(qboContextoAuth);
            //Adding the BillPayment
            BillPayment added = Helper.Add <BillPayment>(qboContextoAuth, entity);

            //Update the BillPayment
            BillPayment updated = QBOHelper.UpdateBillPayment(qboContextoAuth, added);
            //Call the service
            BillPayment updatedReturned = Helper.UpdateAsync <BillPayment>(qboContextoAuth, updated);
        }
예제 #28
0
        private void RequestBillInformation()
        {
            int billNo = Convert.ToInt32(billNoTextBox.Text);

            BillPayment billPayment = new BillPayment();

            billPayment = billPaymentManager.GetRequestBillInfoByBillNo(billNo);

            billDateLabel.Text   = billPayment.TestDate.ToString();
            totallFeeLabel.Text  = billPayment.TotalAmount.ToString();
            paidAmountLabel.Text = billPayment.PaidAmount.ToString();
            deuAmountLabel.Text  = billPayment.DueAmount.ToString();
        }
예제 #29
0
        [TestMethod][Ignore]  //IgnoreReason:  Not Supported
        public void BillPaymentSparseUpdateTestUsingoAuth()
        {
            //Creating the BillPayment for Adding
            BillPayment BillPayment = QBOHelper.CreateBillPaymentCheck(qboContextoAuth);
            //Adding the BillPayment
            BillPayment added = Helper.Add <BillPayment>(qboContextoAuth, BillPayment);
            //Change the data of added entity
            BillPayment changed = QBOHelper.UpdateBillPaymentSparse(qboContextoAuth, added.Id, added.SyncToken);
            //Update the returned entity data
            BillPayment updated = Helper.Update <BillPayment>(qboContextoAuth, changed);//Verify the updated BillPayment

            QBOHelper.VerifyBillPaymentSparse(changed, updated);
        }
        // this function will update bill payment table
        private void AddBillPayment(int CustId, int BillHeaderId, double Paid)
        {
            BillPayment NewPayment = new BillPayment
            {
                CustId          = CustId,
                BillHeaderId    = BillHeaderId,
                PaidAmt         = Paid,
                CreatedDateTime = DateTime.Now,
                CreatedById     = GetLoggedInUserId()
            };

            _db.BillPayment.Add(NewPayment);
        }
 public virtual void DeleteBillPayment(BillPayment entity)
 {
     entityDao.DeleteBillPayment(entity);
 }
 public virtual void UpdateBillPayment(BillPayment entity)
 {
     entityDao.UpdateBillPayment(entity);
 }
 public virtual void DeleteBillPayment(BillPayment entity)
 {
     Delete(entity);
 }
 public virtual void UpdateBillPayment(BillPayment entity)
 {
     Update(entity);
 }
 public virtual void CreateBillPayment(BillPayment entity)
 {
     Create(entity);
 }
예제 #36
0
        public void AddBillPayment(string paymentNo, IList<Bill> billList, User user)
        {

            Payment payment = this.LoadPayment(paymentNo);
            decimal bckwashAmount = 0;
            DateTime dateTimeNow = DateTime.Now;
            foreach (Bill bill in billList)
            {
                BillPayment billPayment = new BillPayment();
                Bill oldBill = billMgrE.LoadBill(bill.BillNo);


                if (Math.Round(bill.ThisBackwashAmount,2) > Math.Round(oldBill.NoBackwashAmount, 2))
                {
                    throw new BusinessErrorException("MasterData.Payment.The.Return.Value.Is.Not.Rush.To.Payment", bill.BillNo);
                }

                if (!oldBill.BackwashAmount.HasValue)
                {
                    oldBill.BackwashAmount = 0;
                }

                oldBill.BackwashAmount += bill.ThisBackwashAmount;

                if (oldBill.BackwashAmount != null && oldBill.AmountAfterDiscount != null
                    && oldBill.BackwashAmount.HasValue && oldBill.AmountAfterDiscount.HasValue
                    && Math.Round(oldBill.BackwashAmount.Value, 2) != 0 && Math.Round(oldBill.AmountAfterDiscount.Value, 2) != 0
                    && Math.Round(oldBill.BackwashAmount.Value, 2) == Math.Round(oldBill.AmountAfterDiscount.Value, 2))
                {
                    oldBill.Status = BusinessConstants.CODE_MASTER_STATUS_VALUE_CLOSE;
                }
                else
                {
                    oldBill.Status = BusinessConstants.CODE_MASTER_STATUS_VALUE_SUBMIT;
                }


                oldBill.LastModifyDate = dateTimeNow;
                oldBill.LastModifyUser = user;
                billMgrE.UpdateBill(oldBill);

                billPayment.Bill = oldBill;
                billPayment.BackwashAmount = bill.ThisBackwashAmount;
                bckwashAmount += billPayment.BackwashAmount.Value;

                billPayment.Payment = payment;

                billPayment.LastModifyDate = dateTimeNow;
                billPayment.LastModifyUser = user;
                billPayment.CreateDate = dateTimeNow;
                billPayment.CreateUser = user;
                billPaymentMgrE.CreateBillPayment(billPayment);
            }

            if (Math.Round(bckwashAmount, 2) > Math.Round(payment.NoBackwashAmount, 2))
            {
                throw new BusinessErrorException("MasterData.Payment.Return.Blunt.Amount.Must.Be.Less.Than.Or.Equal.To.Payment");
            }

            if (!payment.BackwashAmount.HasValue)
            {
                payment.BackwashAmount = 0;
            }
            payment.BackwashAmount += bckwashAmount;

            this.UpdatePayment(payment, user);
        }
 public virtual void CreateBillPayment(BillPayment entity)
 {
     entityDao.CreateBillPayment(entity);
 }