BudgetAnalyser.LedgerBook.LedgerTransactionsController.OnZeroNetAmountCommandExecuted C# (CSharp) Метод

OnZeroNetAmountCommandExecuted() приватный Метод

private OnZeroNetAmountCommandExecuted ( ) : void
Результат void
        private void OnZeroNetAmountCommandExecuted()
        {
            if (LedgerEntry == null)
            {
                return;
            }

            if (LedgerEntry.NetAmount == 0)
            {
                return;
            }

            if (LedgerEntry.NetAmount > 0)
            {
                NewTransactionNarrative = "Zero the remainder - don't accumulate credits";
                NewTransactionAmount = LedgerEntry.NetAmount;
            }
            else
            {
                NewTransactionNarrative = "Zero the remainder - supplement shortfall from surplus";
                NewTransactionAmount = -LedgerEntry.NetAmount;
            }
        }