Пример #1
0
		private void ShowCreditCardPaymentWindow()
		{
            CreditCardPaymentWnd clsCreditCardPaymentWnd = new CreditCardPaymentWnd();
            clsCreditCardPaymentWnd.TerminalDetails = mclsTerminalDetails;
            clsCreditCardPaymentWnd.SalesTransactionDetails = mclsSalesTransactionDetails;
            clsCreditCardPaymentWnd.BalanceAmount = Convert.ToDecimal(lblBalance.Text);
            clsCreditCardPaymentWnd.ShowDialog(this);
            DialogResult result = clsCreditCardPaymentWnd.Result;
            Data.CreditCardPaymentDetails creditcardDetails = clsCreditCardPaymentWnd.Details;
            clsCreditCardPaymentWnd.Close();
            clsCreditCardPaymentWnd.Dispose();

			if (result == DialogResult.OK)
			{
				lblAmountPaid.Text = Convert.ToDecimal(Convert.ToDecimal(lblAmountPaid.Text) + creditcardDetails.Amount).ToString("#,##0.#0");
				marrCreditCardPaymentDetails.Add(creditcardDetails);
				ComputePayments();
				lblCreditCard.Tag = Convert.ToDecimal(Convert.ToDecimal(lblCreditCard.Tag) + creditcardDetails.Amount - Convert.ToDecimal(lblChange.Text)).ToString("#,##0.#0");

				if (mPaymentType == PaymentTypes.NotYetAssigned)
					mPaymentType = PaymentTypes.CreditCard;
				else
					mPaymentType = PaymentTypes.Combination;

			}
			
		}
Пример #2
0
		private void ShowCreditCardPaymentWindow(string sender = "f3")
		{
            CreditCardPaymentWnd clsCreditCardPaymentWnd = new CreditCardPaymentWnd();
            clsCreditCardPaymentWnd.IsCreditChargeExcluded = mboIsCreditChargeExcluded;
            clsCreditCardPaymentWnd.TerminalDetails = TerminalDetails;
            clsCreditCardPaymentWnd.SysConfigDetails = SysConfigDetails;
            clsCreditCardPaymentWnd.OfflineProduct = OfflineProductDesc;
            clsCreditCardPaymentWnd.SalesTransactionDetails = mclsSalesTransactionDetails;
            if (sender == "f4") clsCreditCardPaymentWnd.CreditorDetails = mclsCustomerDetails;
            clsCreditCardPaymentWnd.arrCreditCardPaymentDetails = marrCreditCardPaymentDetails;
            clsCreditCardPaymentWnd.IsRefund = mboIsRefund;
            clsCreditCardPaymentWnd.BalanceAmount = Convert.ToDecimal(lblBalance.Text);
            clsCreditCardPaymentWnd.ShowDialog(this);
            DialogResult result = clsCreditCardPaymentWnd.Result;
            Data.CreditCardPaymentDetails creditcardDetails = clsCreditCardPaymentWnd.Details;
            mclsCreditorDetails = clsCreditCardPaymentWnd.CreditorDetails;
            clsCreditCardPaymentWnd.Close();
            clsCreditCardPaymentWnd.Dispose();

			if (result == DialogResult.OK)
			{
                // set the credit card charges for inhouse credit cards
                if (creditcardDetails.AdditionalCharge != 0)
                {
                    lblCharge.Text = (decimal.Parse(lblCharge.Text) + creditcardDetails.AdditionalCharge).ToString("#,##0.#0");
                    mclsSalesTransactionDetails.CreditChargeAmount = creditcardDetails.AdditionalCharge;
                }

				lblAmountPaid.Text = Convert.ToDecimal(Convert.ToDecimal(lblAmountPaid.Text) + creditcardDetails.Amount).ToString("#,##0.#0");
				marrCreditCardPaymentDetails.Add(creditcardDetails);
				ComputePayments();
				lblCreditCard.Tag = Convert.ToDecimal(Convert.ToDecimal(lblCreditCard.Tag) + creditcardDetails.Amount - Convert.ToDecimal(lblChange.Text)).ToString("#,##0.#0");

				if (mPaymentType == PaymentTypes.NotYetAssigned)
					mPaymentType = PaymentTypes.CreditCard;
				else
					mPaymentType = PaymentTypes.Combination;
			}
		}