示例#1
0
        private void AddManualPayment()
        {
            if (!Page.IsValid)
            {
                return;
            }

            try
            {
                decimal totalAmount = ctlManualPayment.TotalAmount;
                if (totalAmount == 0)
                {
                    totalAmount = CustomerInvoice.Total;
                }

                int result = StorehouseHelper.AddCustomerPayment(CustomerInvoice.ContractId, CustomerInvoice.InvoiceId,
                                                                 ctlManualPayment.TransactionId, totalAmount, ctlManualPayment.Currency,
                                                                 ctlManualPayment.SelectedMethod, ctlManualPayment.TranStatus);

                if (result < 0)
                {
                    ShowResultMessage(result);
                    return;
                }
                //
                RedirectToBrowsePage();
            }
            catch (Exception ex)
            {
                ShowErrorMessage("ADD_INVOICE_PAYMENT", ex);
            }
        }