private void btnCoupon_Click(object sender, EventArgs e)
        {
            ApplyCoupon couponForm = new ApplyCoupon();

            couponForm.MdseDescription = lblDescription.Text;
            CouponData couponDetails = new CouponData();

            couponDetails.CouponType = CouponData.CouponTypes.ITEM;
            couponDetails.ItemAmount = Utilities.GetDecimalValue(txtNegotiatedPrice.Text, 0) *
                                       Utilities.GetIntegerValue(txtQty.Text, 1);
            if (Item.CouponAmount > 0)
            {
                couponDetails.CouponAmount     = Item.CouponAmount;
                couponDetails.CouponCode       = Item.CouponCode;
                couponDetails.CouponPercentage = Item.CouponPercentage;
            }

            couponForm.CouponDetails = couponDetails;
            couponForm.ShowDialog();
            Item.CouponPercentage = couponDetails.CouponPercentage;
            Item.CouponAmount     = Math.Round(couponDetails.CouponAmount, 2);
            Item.CouponCode       = couponDetails.CouponCode;
            RaiseReCalculatePayments();
            SetFormValues();
            OnTotalsChanged(null, null);
        }
        private void customButtonCoupon_Click(object sender, EventArgs e)
        {
            ApplyCoupon couponForm = new ApplyCoupon();

            couponForm.MdseDescription = string.Empty;
            CouponData couponDetails = new CouponData();

            couponDetails.CouponType = CouponData.CouponTypes.TRANSACTION;
            if (CDS.ActiveRetail.CouponAmount > 0)
            {
                couponDetails.CouponAmount     = CDS.ActiveRetail.CouponAmount;
                couponDetails.CouponCode       = CDS.ActiveRetail.CouponCode;
                couponDetails.CouponPercentage = CDS.ActiveRetail.CouponPercentage;
            }
            couponDetails.TransactionAmount = SubTotal;
            couponForm.CouponDetails        = couponDetails;
            couponForm.ShowDialog();
            CDS.ActiveRetail.CouponPercentage = couponDetails.CouponPercentage;
            CDS.ActiveRetail.CouponAmount     = Math.Round(couponDetails.CouponAmount, 2);
            CDS.ActiveRetail.CouponCode       = couponDetails.CouponCode;
            CalculateAllTotals();
        }