Пример #1
0
        public void ClearPayment()
        {
            IsCleared = Date.Date <= DateTime.Today.Date;
            ChargedAccount.AddPaymentAmount(this);

            if (Type == PaymentType.Transfer)
            {
                TargetAccount.AddPaymentAmount(this);
            }
        }
Пример #2
0
        public void UpdatePayment(DateTime date,
                                  decimal amount,
                                  PaymentType type,
                                  Account chargedAccount,
                                  Account targetAccount = null,
                                  Category category     = null,
                                  string note           = "")
        {
            ChargedAccount.RemovePaymentAmount(this);
            TargetAccount?.RemovePaymentAmount(this);

            AssignValues(date, amount, type, chargedAccount, targetAccount, category, note);

            ClearPayment();
        }