public void ClearPayment() { IsCleared = Date.Date <= DateTime.Today.Date; ChargedAccount.AddPaymentAmount(this); if (Type == PaymentType.Transfer) { TargetAccount.AddPaymentAmount(this); } }
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(); }