示例#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();
        }