void UpdateMaster()
        {
            dgAccountsTransGrid.UpdateMaster(master);
            bool RoundTo100;
            var  Comp = api.CompanyEntity;

            if (Comp.SameCurrency(master._Currency))
            {
                RoundTo100 = Comp.RoundTo100;
            }
            else
            {
                ShowCurrency = true;
                RoundTo100   = !CurrencyUtil.HasDecimals(master._Currency);
            }
            if (RoundTo100)
            {
                Debit.HasDecimals = Credit.HasDecimals = Amount.HasDecimals = Total.HasDecimals = false;
            }

            if (!Comp._UseVatOperation)
            {
                VatOperation.Visible = false;
            }
        }
        public BankStLines(UnicontaBaseEntity sourceData)
            : base(sourceData)
        {
            InitializeComponent();
            this.DataContext = this;

            master = sourceData as BankStatement;
            if (fromDate == DateTime.MinValue)
            {
                DateTime date            = GetSystemDefaultDate();
                var      firstDayOfMonth = new DateTime(date.Year, date.Month, 1);
                var      lastDayOfMonth  = firstDayOfMonth.AddMonths(1).AddDays(-1);
                fromDate = firstDayOfMonth;
                toDate   = lastDayOfMonth;
            }

            bool RoundTo100;
            var  Comp = api.CompanyEntity;

            if (Comp.SameCurrency(master._Currency))
            {
                RoundTo100 = Comp.RoundTo100;
            }
            else
            {
                RoundTo100 = !CurrencyUtil.HasDecimals(master._Currency);
            }
            if (RoundTo100)
            {
                Debit.HasDecimals = Credit.HasDecimals = Amount.HasDecimals = Total.HasDecimals = false;
            }

            if (!Comp._UseVatOperation)
            {
                VatOperation.Visible = false;
            }

            dgBankStatementLine.api = api;
            bankTransApi            = new BankStatementAPI(api);
            SetRibbonControl(localMenu, dgBankStatementLine);
            dgBankStatementLine.UpdateMaster(master);
            dgBankStatementLine.BusyIndicator = busyIndicator;
            localMenu.OnItemClicked          += localMenu_OnItemClicked;
        }
        public BankStLines(UnicontaBaseEntity sourceData)
            : base(sourceData)
        {
            InitializeComponent();
            this.DataContext = this;

            master = sourceData as BankStatement;

            bool RoundTo100;
            var  Comp = api.CompanyEntity;

            if (Comp.SameCurrency(master._Currency))
            {
                RoundTo100 = Comp.RoundTo100;
            }
            else
            {
                RoundTo100 = !CurrencyUtil.HasDecimals(master._Currency);
            }
            if (RoundTo100)
            {
                Debit.HasDecimals = Credit.HasDecimals = Amount.HasDecimals = Total.HasDecimals = false;
            }

            if (!Comp._UseVatOperation)
            {
                VatOperation.Visible = false;
            }

            dgBankStatementLine.api = api;
            bankTransApi            = new BankStatementAPI(api);
            SetRibbonControl(localMenu, dgBankStatementLine);
            dgBankStatementLine.UpdateMaster(master);
            dgBankStatementLine.BusyIndicator = busyIndicator;
            localMenu.OnItemClicked          += localMenu_OnItemClicked;
        }